aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-10-21 17:58:17 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-10-21 17:58:17 +0200
commite68736936a11c76725915e628b8d41d9351bbcf2 (patch)
tree02e2fbf570fb00896b7243d86eff5419e0401768 /src/nix
parentd77970fde7fac66cf8c5cdb7688906ba2f5d5362 (diff)
nix make-content-addressable: Add examples
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/make-content-addressable.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/nix/make-content-addressable.cc b/src/nix/make-content-addressable.cc
index 14ed06413..16344ee14 100644
--- a/src/nix/make-content-addressable.cc
+++ b/src/nix/make-content-addressable.cc
@@ -18,9 +18,22 @@ struct CmdMakeContentAddressable : StorePathsCommand
std::string description() override
{
- return "test";
+ return "rewrite a path or closure to content-addressable form";
}
+ Examples examples() override
+ {
+ return {
+ Example{
+ "To create a content-addressable representation of GNU Hello (but not its dependencies):",
+ "nix make-content-addressable nixpkgs.hello"
+ },
+ Example{
+ "To compute a content-addressable representation of the current NixOS system closure:",
+ "nix make-content-addressable -r /run/current-system"
+ },
+ };
+ }
void run(ref<Store> store, Paths storePaths) override
{
auto paths = store->topoSortPaths(PathSet(storePaths.begin(), storePaths.end()));