Skip to content

Set GCROOT to store path to prevent garbage collection#3542

Merged
edolstra merged 3 commits intoNixOS:masterfrom
mkenigs:gcroots
Apr 28, 2020
Merged

Set GCROOT to store path to prevent garbage collection#3542
edolstra merged 3 commits intoNixOS:masterfrom
mkenigs:gcroots

Conversation

@mkenigs
Copy link
Copy Markdown
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
Copy Markdown
Member

Can you rename this to NIX_GCROOT? Otherwise looks good.

@mkenigs
Copy link
Copy Markdown
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.

2 participants