Skip to content
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

Set GCROOT to store path to prevent garbage collection #3542

Merged
merged 3 commits into from Apr 28, 2020

Conversation

mkenigs
Copy link
Contributor

@mkenigs mkenigs commented Apr 27, 2020

Running nix-collect-garbage messes up a nix dev-shell. For example in nix dev-shell nixpkgs.hello, patchelf is gone after garbage collection.

nix-shell leaves buildInputs in an environment variable, which prevents garbage collection. nix-store --gc --print-roots shows /proc/*/environ

This PR adds something similar for dev-shell

@edolstra
Copy link
Member

Can you rename this to NIX_GCROOT? Otherwise looks good.

@mkenigs
Copy link
Contributor Author

mkenigs commented Apr 28, 2020

Done

@edolstra edolstra merged commit 06849c3 into NixOS:master Apr 28, 2020
@mkenigs mkenigs deleted the gcroots branch April 28, 2020 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants