diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/build.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc index 4240f06ade7d..42b3e42c69e1 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -35,6 +35,20 @@ struct CmdBuild : MixDryRun, InstallablesCommand return "build a derivation or fetch a store path"; } + Examples examples() override + { + return { + Example{ + "To build and run GNU Hello from NixOS 17.03:", + "nix build -f channel:nixos-17.03 hello; ./result/bin/hello" + }, + Example{ + "To build the build.x86_64-linux attribute from release.nix:", + "nix build -f release.nix build.x86_64-linux" + }, + }; + } + void run(ref<Store> store) override { auto buildables = toBuildables(store, dryRun ? DryRun : Build); |