aboutsummaryrefslogtreecommitdiff
path: root/src/nix/run.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-10-09 18:26:47 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-10-09 18:26:47 +0000
commit39de73550dd5579c2b3f14f7ce669d3f8ed85689 (patch)
tree79194a4ed21a04ebca269005d2e188532e460fab /src/nix/run.cc
parentcfe791a638a3fdf53a2608f885c407bafc238094 (diff)
parente845d19ae368cb9ee6371c4b2fdbdc86a110d893 (diff)
Merge remote-tracking branch 'upstream/master' into fix-and-ci-static-builds
Diffstat (limited to 'src/nix/run.cc')
-rw-r--r--src/nix/run.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc
index cbaba9d90..790784382 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -140,7 +140,7 @@ struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
}
};
-static auto r1 = registerCommand<CmdShell>("shell");
+static auto rCmdShell = registerCommand<CmdShell>("shell");
struct CmdRun : InstallableCommand, RunCommon
{
@@ -167,6 +167,14 @@ struct CmdRun : InstallableCommand, RunCommon
"To run Blender:",
"nix run blender-bin"
},
+ Example{
+ "To run vim from nixpkgs:",
+ "nix run nixpkgs#vim"
+ },
+ Example{
+ "To run vim from nixpkgs with arguments:",
+ "nix run nixpkgs#vim -- --help"
+ },
};
}
@@ -201,7 +209,7 @@ struct CmdRun : InstallableCommand, RunCommon
}
};
-static auto r2 = registerCommand<CmdRun>("run");
+static auto rCmdRun = registerCommand<CmdRun>("run");
void chrootHelper(int argc, char * * argv)
{