mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
nix run: Add some examples
This commit is contained in:
parent
dff440aab3
commit
2e9b7c4cb2
1 changed files with 18 additions and 0 deletions
|
@ -70,6 +70,24 @@ struct CmdRun : InstallablesCommand
|
|||
return "run a shell in which the specified packages are available";
|
||||
}
|
||||
|
||||
Examples examples() override
|
||||
{
|
||||
return {
|
||||
Example{
|
||||
"To start a shell providing GNU Hello from NixOS 17.03:",
|
||||
"nix run -f channel:nixos-17.03 hello"
|
||||
},
|
||||
Example{
|
||||
"To start a shell providing youtube-dl from your 'nixpkgs' channel:",
|
||||
"nix run nixpkgs.youtube-dl"
|
||||
},
|
||||
Example{
|
||||
"To run GNU Hello:",
|
||||
"nix run nixpkgs.hello -c hello --greeting 'Hi everybody!'"
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
void run(ref<Store> store) override
|
||||
{
|
||||
auto outPaths = toStorePaths(store, Build);
|
||||
|
|
Loading…
Reference in a new issue