lix/src/nix/log.md
Qyriad 194ba8a02f docs: guide to installables docs in installable commands' docs
The installables syntax is not documented in any of the man pages or
docbook pages for any of those individual commands. And while these
commands really should at least peripherally individually document how
installables work, in the meantime we can at least direct people to the
right place.

This commit also clarifies the unexpected fact that `nix profile remove`
and `nix profile upgrade` do *not* take installables.

Change-Id: I3b1453cb197a613bbab639c66a466365c3592c6d
2024-04-29 08:06:05 -06:00

1.2 KiB

R""(

Note: this command's interface is based heavily around installables, which you may want to read about first (nix --help).

Examples

  • Get the build log of GNU Hello:

    # nix log nixpkgs#hello
    
  • Get the build log of a specific store path:

    # nix log /nix/store/lmngj4wcm9rkv3w4dfhzhcyij3195hiq-thunderbird-52.2.1
    
  • Get a build log from a specific binary cache:

    # nix log --store https://cache.nixos.org nixpkgs#hello
    

Description

This command prints the log of a previous build of the installable 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.

)""