diff options
author | aszlig <aszlig@nix.build> | 2020-12-10 02:30:45 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2020-12-10 02:53:01 +0100 |
commit | ceab386076cc98ac447c8bbc768691bce5bf8ac6 (patch) | |
tree | c5067439353482f4b158937e4809a5dffa00384d /pkgs/games/gog/graveyard-keeper.nix | |
parent | e0cf8a362d95a7094adec78d11bbf8d4b7d7b547 (diff) |
profiles/base: Add helper for showing last Nix log
This is a common pattern I encounter on a daily basis, which involves copy & pasting the store path of a failed build to "nix log". Now the same is just a matter of running "nlast" and we get rid of the useless copy & paste. The way we do this does have a small goof: Using mtime (or really any time, other than atime, which commonly is disabled) is not going to work if we *repeat* an older Nix build, since this will only change the log file but the prefix directory will be unchanged. Since addressing this goof would most likely result in iterating through *all* log files, I'm not doing it since I think it doesn't occur very often in practice. If I happen to be wrong on that, we could still go for the heavyweight solution. Also, I went for implementing this in Python instead of a shell script, because the latter would not only be less readable but also way slower since we need to either fork out for every stat command or use ls and head to figure out the newest file. Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/games/gog/graveyard-keeper.nix')
0 files changed, 0 insertions, 0 deletions