xzfc / cached-nix-shell

Instant startup time for nix-shell
https://xzfc.github.io/cached-nix-shell/cached-nix-shell.1
The Unlicense
195 stars 16 forks source link

macOS support #1

Closed xzfc closed 1 year ago

xzfc commented 4 years ago

It can be done by adapting trace-nix.c to use DYLD_INSERT_LIBRARIES instead of LD_PRELOAD.

Alternative solutions: adding tracing support to nix itself or adopting logged-evaluation.nix from lorri.

zimbatm commented 4 years ago

https://github.com/jacereda/fsatrace has a similar implementation and supports macOS (more or less)

SuperSandro2000 commented 3 years ago

Bump. I would need this for darwin but I am not familiar with rust at all.

olebedev commented 2 years ago

Bump on this one

zimbatm commented 2 years ago

I think this project could be combined with https://github.com/numtide/nix-eval-cache which is a bit more generic

olebedev commented 2 years ago

It sounds a bit fragile to be based on timestamps of nix files only, no?

zimbatm commented 2 years ago

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.

uri-canva commented 1 year ago

Took a shot at it: https://github.com/xzfc/cached-nix-shell/pull/25