aboutsummaryrefslogtreecommitdiff
path: root/src/nix/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-23 21:10:32 +0100
committerGitHub <noreply@github.com>2020-12-23 21:10:32 +0100
commita93916b1905cd7b968e92cd94a3e4a595bff2e0f (patch)
tree178e04a23a35b9a4ede224bdcb903e75c188a304 /src/nix/build.cc
parent8927cba62f5afb33b01016d5c4f7f8b7d0adde3c (diff)
parent5178211e963fa111f84c4881b22cc506d5254fde (diff)
Merge pull request #4336 from NixOS/manpages
Documentation for nix subcommands
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