mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 23:27:17 +02:00
nix make-content-addressable: Add examples
This commit is contained in:
parent
d77970fde7
commit
e68736936a
1 changed files with 14 additions and 1 deletions
|
@ -18,9 +18,22 @@ struct CmdMakeContentAddressable : StorePathsCommand
|
||||||
|
|
||||||
std::string description() override
|
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
|
void run(ref<Store> store, Paths storePaths) override
|
||||||
{
|
{
|
||||||
auto paths = store->topoSortPaths(PathSet(storePaths.begin(), storePaths.end()));
|
auto paths = store->topoSortPaths(PathSet(storePaths.begin(), storePaths.end()));
|
||||||
|
|
Loading…
Add table
Reference in a new issue