[Nix-dev] truly persistent nix-shell

Andreas Herrmann andreash87 at gmx.ch
Sun Nov 20 20:30:07 CET 2016


On Sunday 20 November 2016 15:00:55 Ruben Astudillo wrote:
> [...] they
> provide the following answer [3]
> 
>         $ cd <my-project>
>         $ mkdir gcroots
>         $ nix-shell ./shell.nix --pure --indirect --add-root gcroots/dep
>         $ exit
>         $ nix-collect-garbage
>         $ nix-shell ./shell.nix
>
> [3]: https://github.com/NixOS/nixpkgs/issues/5623#issuecomment-74048047

Thank you for pointing me there. I never knew that `nix-shell` accepts these flags.
You actually don't even need to create the `gcroots` directory before. `nix-shell` will create it if necessary


> So this maybe makes you command redundant (although less obsucure than
> this commands). Maybe is worthwhile document this behaviour & simplify
> the flags to nix-shell to obtain this result?

Documenting it would probably already go a long way.
Is there any reason why it is not mentioned in the man-page, yet?


Best, Andreas


More information about the nix-dev mailing list