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

File diff suppressed because it is too large Load diff

View file

@ -96,7 +96,6 @@ div.example
margin-right: 1.5em; margin-right: 1.5em;
background: #f4f4f8; background: #f4f4f8;
border-radius: 0.4em; border-radius: 0.4em;
box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
} }
div.example p.title div.example p.title
@ -106,7 +105,6 @@ div.example p.title
div.example pre div.example pre
{ {
box-shadow: none;
} }
@ -116,15 +114,12 @@ div.example pre
pre.screen, pre.programlisting pre.screen, pre.programlisting
{ {
border: 1px solid #b0b0b0; padding: 6px 6px;
padding: 3px 3px;
margin-left: 1.5em; margin-left: 1.5em;
margin-right: 1.5em; margin-right: 1.5em;
color: #600000; color: #600000;
background: #f4f4f8; background: #f4f4f8;
font-family: monospace; font-family: monospace;
border-radius: 0.4em;
box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
} }
div.example pre.programlisting div.example pre.programlisting
@ -149,7 +144,6 @@ div.example pre.programlisting
padding: 0.3em 0.3em 0.3em 0.3em; padding: 0.3em 0.3em 0.3em 0.3em;
background: #fffff5; background: #fffff5;
border-radius: 0.4em; border-radius: 0.4em;
box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
} }
div.note, div.warning div.note, div.warning
@ -256,13 +250,11 @@ span.command strong
div.calloutlist table div.calloutlist table
{ {
box-shadow: none;
} }
table table
{ {
border-collapse: collapse; border-collapse: collapse;
box-shadow: 0.4em 0.4em 0.5em #e0e0e0;
} }
div.affiliation div.affiliation

View file

@ -90,6 +90,16 @@ struct CmdLsStore : StoreCommand, MixLs
expectArg("path", &path); 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 std::string name() override
{ {
return "ls-store"; return "ls-store";
@ -116,6 +126,16 @@ struct CmdLsNar : Command, MixLs
expectArg("path", &path); 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 std::string name() override
{ {
return "ls-nar"; return "ls-nar";

View file

@ -85,6 +85,10 @@ struct CmdRun : InstallablesCommand
"To run GNU Hello:", "To run GNU Hello:",
"nix run nixpkgs.hello -c hello --greeting 'Hi everybody!'" "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"
},
}; };
} }