Closed xzfc closed 1 year ago
https://github.com/jacereda/fsatrace has a similar implementation and supports macOS (more or less)
Bump. I would need this for darwin but I am not familiar with rust at all.
Bump on this one
I think this project could be combined with https://github.com/numtide/nix-eval-cache which is a bit more generic
It sounds a bit fragile to be based on timestamps of nix files only, no?
It's a trade-off. It's quite rare for files to change and not their metadata. A more precise model would be to hash the content of the files, but that makes the check even more expensive.
Took a shot at it: https://github.com/xzfc/cached-nix-shell/pull/25
It can be done by adapting
trace-nix.c
to useDYLD_INSERT_LIBRARIES
instead ofLD_PRELOAD
.Alternative solutions: adding tracing support to nix itself or adopting logged-evaluation.nix from lorri.