Nix command/log

From NixOS Wiki
Jump to: navigation, search

This article is about the nix log subcommand.


Show the build log of the specified packages or paths, if available.




  • --arg NAME EXPR argument to be passed to Nix functions
  • --argstr NAME STRING string-valued argument to be passed to Nix functions
  • --commit-lock-file commit changes to the lock file
  • --expr EXPR evaluate attributes from EXPR
  • -f, --file FILE evaluate FILE rather than the default
  • --impure allow access to mutable paths and repositories
  • -I, --include PATH add a path to the list of locations used to look up <...> file names
  • --no-registries don't use flake registries
  • --no-update-lock-file do not allow any updates to the lock file
  • --no-write-lock-file do not write the newly generated lock file
  • --override-flake ORIGINAL-REF RESOLVED-REF override a flake registry value
  • --override-input INPUT-PATH FLAKE-URL override a specific flake input (e.g. 'dwarffs/nixpkgs')
  • --recreate-lock-file recreate lock file from scratch
  • --update-input INPUT-PATH update a specific flake input


To get the build log of GNU Hello:

$ nix log 'nixpkgs#hello'

To get the build log of a specific path:

$ nix log /nix/store/lmngj4wcm9rkv3w4dfhzhcyij3195hiq-thunderbird-52.2.1

To get a build log from a specific binary cache:

$ nix log --store 'nixpkgs#hello'

See also