Skip to content
Snippets Groups Projects
Commit 2e9b7c4c authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

nix run: Add some examples

parent dff440aa
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment