-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix print-dev-env --profile should include flake inputs #3913
Comments
I marked this as stale due to inactivity. → More info |
I sort of fixed this for nix-direnv: nix-community/nix-direnv@763d572 |
I marked this as stale due to inactivity. → More info |
Still an issue. Only with |
I marked this as stale due to inactivity. → More info |
Perhaps to make this more general, and because I have a few flakes where even nix-direnv doesn't seem to cache all flake inputs. Much better if nix was internally aware of what was required to fetch to build something and include all of that in the profile closure |
Unfortunately it is impossible to guarantee that required flake inputs are included in the profile closure until we have a solution for NixOS/nix#3913 Until that time, we can build the entire devshell package and add it as a root as this ensures more of the dependencies of the build are kept in the profile gc root. Also add `--keep-outputs` for the same reason.
Is your feature request related to a problem? Please describe.
When using
nix print-dev-env
in tools like direnv the nix shell is cached and--profile
adds a gc root to prevent garbage collection. However all inputs are still garbage collected every 15 minutes (?), which makes working with bad/no internet harder/impossible.Describe the solution you'd like
the
--profile
parameter should also add a garbage collection root for all (evaluated?) flake inputs.Describe alternatives you've considered
Do it manually using some script doing:
nix flake archive --json | grep -P -o -m1 '(?<="path":")/nix/store[^"]+'
and then add a gc root for all inputs.The text was updated successfully, but these errors were encountered: