devshell
devshell copied to clipboard
When used in conjunction with nix-direnv, build dependencies are not protected from garbage collection.
Normally, when I use mkShell, nix-direnv will symlink the resulting derivation into gcroots
, preventing it from being garbage collected, but this functionality seems to be absent when using devshell.
I had a quick look at the implementation but it's hard to know what didn't work. The pinning logic over here should work all of the same: https://github.com/nix-community/nix-direnv/blob/52996098653a97b2ed2dbcccb191e9ed38505a47/direnvrc#L199