aboutsummaryrefslogtreecommitdiff
path: root/src/nix/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-08 14:19:36 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-12-21 13:32:27 +0100
commitae7351dbeed3d03087b6b56d23b4b3942de1507d (patch)
treefcfa1fb4f51756f7d15648ffa58b873a56349e95 /src/nix/build.cc
parent346baec783a7423aa5b6cacaf7eebb8d22d4ce79 (diff)
Add 'nix build' manpage
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r--src/nix/build.cc19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc
index 67be4024b..c2974d983 100644
--- a/src/nix/build.cc
+++ b/src/nix/build.cc
@@ -43,22 +43,11 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
return "build a derivation or fetch a store path";
}
- Examples examples() override
+ std::string doc() 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"
- },
- Example{
- "To make a profile point at GNU Hello:",
- "nix build --profile /tmp/profile nixpkgs#hello"
- },
- };
+ return
+ #include "build.md"
+ ;
}
void run(ref<Store> store) override