forked from lix-project/lix
Add 'nix log' manpage
This commit is contained in:
parent
6ce393392b
commit
58bacc85e7
|
@ -13,22 +13,11 @@ struct CmdLog : InstallableCommand
|
|||
return "show the build log of the specified packages or paths, if available";
|
||||
}
|
||||
|
||||
Examples examples() override
|
||||
std::string doc() override
|
||||
{
|
||||
return {
|
||||
Example{
|
||||
"To get the build log of GNU Hello:",
|
||||
"nix log nixpkgs#hello"
|
||||
},
|
||||
Example{
|
||||
"To get the build log of a specific path:",
|
||||
"nix log /nix/store/lmngj4wcm9rkv3w4dfhzhcyij3195hiq-thunderbird-52.2.1"
|
||||
},
|
||||
Example{
|
||||
"To get a build log from a specific binary cache:",
|
||||
"nix log --store https://cache.nixos.org nixpkgs#hello"
|
||||
},
|
||||
};
|
||||
return
|
||||
#include "log.md"
|
||||
;
|
||||
}
|
||||
|
||||
Category category() override { return catSecondary; }
|
||||
|
|
40
src/nix/log.md
Normal file
40
src/nix/log.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
R""(
|
||||
|
||||
# Examples
|
||||
|
||||
* Get the build log of GNU Hello:
|
||||
|
||||
```console
|
||||
# nix log nixpkgs#hello
|
||||
```
|
||||
|
||||
* Get the build log of a specific store path:
|
||||
|
||||
```console
|
||||
# nix log /nix/store/lmngj4wcm9rkv3w4dfhzhcyij3195hiq-thunderbird-52.2.1
|
||||
```
|
||||
|
||||
* Get a build log from a specific binary cache:
|
||||
|
||||
```console
|
||||
# nix log --store https://cache.nixos.org nixpkgs#hello
|
||||
```
|
||||
|
||||
# Description
|
||||
|
||||
This command prints the log of a previous build of a derivation on
|
||||
standard output.
|
||||
|
||||
Nix looks for build logs in two places:
|
||||
|
||||
* In the directory `/nix/var/log/nix/drvs`, which contains logs for
|
||||
locally built derivations.
|
||||
|
||||
* In the binary caches listed in the `substituters` setting. Logs
|
||||
should be named `<cache>/log/<base-name-of-store-path>`, where
|
||||
`store-path` is a derivation,
|
||||
e.g. `https://cache.nixos.org/log/dvmig8jgrdapvbyxb1rprckdmdqx08kv-hello-2.10.drv`.
|
||||
For non-derivation store paths, Nix will first try to determine the
|
||||
deriver by fetching the `.narinfo` file for this store path.
|
||||
|
||||
)""
|
Loading…
Reference in a new issue