`nix log --last`
Is your feature request related to a problem? Please describe. Common workflow is
$ nix build
[error, read derivation path]
For full logs, run 'nix-store -l /nix/store/abcdef.....
$ nix log /nix/store/abcdef...[TAB]
Describe the solution you'd like
nix log --last
jumping to the last failed build. No need to type the first letters of the failed build's path.
Or perhaps, even shorter:
nix log
Describe alternatives you've considered
Additional context
Priorities
Add :+1: to issues you find important.
Ideas to consider
- current behavior is for
nix logto interpret no argument as the "default installable", the current directory flake. So in many cases this will accidentally be the right thing, but then again, often not. - with
NIX_CONFIG = log-location = .logs, thennix buildwould create a symlink. Subsequentnix logwithout any installable would, by default, look in the log-location. NIX_LOG_DIR has - a
nix logcan do something like this just looking for the latest log on the computer
bzcat $(find /nix/var/log/nix/drvs -type f -printf '%C@ %p\n' | awk '$1>a{a=$1;b=$2}END{print b}' )
- NIX_LOG_DIR can be used, but this is a daemon setting, we'd want to avoid writing files/directories by root permissions requested by untrusted user... ew.
attn: @jeremiahsecrist
current behavior is for nix log to interpret no argument as the "default installable", the current directory flake. So in many cases this will accidentally be the right thing, but then again, often not.
LoL, I didn't actually know that nix log is sufficient (for me, in a Flake) - Thank You for mentioning this here.
IMHO the UX for Noobs would already be greatly improved if only a nix build or nix run would simply say:
For full logs, run: nix log
instead of the current:
For full logs, run:
nix log /nix/store/v6ilgq22107mhqlcbsqj72klqmfrxnyb-enola-4c02203.drv
Just my 2 cents.