lix/src/nix/log.md
Valentin Gagarin 2af9fd20c6 clarify definition of "installable"
the term was hard to discover, as its definition and explanation were in
a very long document lacking an overview section.
search did not help because it occurs so often.

- clarify wording in the definition
- add an overview of installable types
- add "installable" to glossary
- link to definition from occurrences of the term
- be more precise about where store derivation outputs are processed
- installable Nix expressions must evaluate to a derivation

Co-authored-by: Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com>
2023-03-05 01:46:17 +01:00

1 KiB

R""(

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.

)""