Add 'nix bundle' manpage

Fixes #4375.
This commit is contained in:
Eelco Dolstra 2020-12-17 11:45:59 +01:00
parent f4e9d4fcb3
commit 0c09f63de8
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 36 additions and 7 deletions

View file

@ -40,14 +40,11 @@ struct CmdBundle : InstallableCommand
return "bundle an application so that it works outside of the Nix store"; return "bundle an application so that it works outside of the Nix store";
} }
Examples examples() override std::string doc() override
{ {
return { return
Example{ #include "bundle.md"
"To bundle Hello:", ;
"nix bundle hello"
},
};
} }
Category category() override { return catSecondary; } Category category() override { return catSecondary; }

32
src/nix/bundle.md Normal file
View file

@ -0,0 +1,32 @@
R""(
# Examples
* Bundle Hello:
```console
# nix bundle nixpkgs#hello
# ./hello
Hello, world!
```
* Bundle a specific version of Nix:
```console
# nix bundle github:NixOS/nix/e3ddffb27e5fc37a209cfd843c6f7f6a9460a8ec
# ./nix --version
nix (Nix) 2.4pre20201215_e3ddffb
```
# Description
`nix bundle` packs the closure of the [Nix app](./nix3-run.md)
*installable* into a single self-extracting executable. See the
[`nix-bundle` homepage](https://github.com/matthewbauer/nix-bundle)
for more details.
> **Note**
>
> This command only works on Linux.
)""