1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

Update release notes

Also add some examples to nix --help.
This commit is contained in:
Eelco Dolstra 2018-02-19 20:38:06 +01:00
parent a6c0b773b7
commit 70eb64147e
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 801 additions and 310 deletions

View file

@ -90,6 +90,16 @@ struct CmdLsStore : StoreCommand, MixLs
expectArg("path", &path);
}
Examples examples() override
{
return {
Example{
"To list the contents of a store path in a binary cache:",
"nix ls-store --store https://cache.nixos.org/ -lR /nix/store/0i2jd68mp5g6h2sa5k9c85rb80sn8hi9-hello-2.10"
},
};
}
std::string name() override
{
return "ls-store";
@ -116,6 +126,16 @@ struct CmdLsNar : Command, MixLs
expectArg("path", &path);
}
Examples examples() override
{
return {
Example{
"To list a specific file in a NAR:",
"nix ls-nar -l hello.nar /bin/hello"
},
};
}
std::string name() override
{
return "ls-nar";

View file

@ -85,6 +85,10 @@ struct CmdRun : InstallablesCommand
"To run GNU Hello:",
"nix run nixpkgs.hello -c hello --greeting 'Hi everybody!'"
},
Example{
"To run GNU Hello in a chroot store:",
"nix run --store ~/my-nix nixpkgs.hello -c hello"
},
};
}