Why doesn't develop or shell have a pure mode?

I use to like entering a nix-shell --pure to verify that a package was pure and included all it’s required runtime dependencies.

How can I do this with the new nix commands?
nix develop or nix shell don’t seem to have anything similar except for --ignore-environment which is way more austere.

6 Likes

I saw @tomberek post `nix develop --pure` is not valid (nor is `nix shell --pure`) · Issue #4359 · NixOS/nix · GitHub
the discrepancy between the the facility of nix-shell --pure and what I can do here with nix develop or nix shell is surprising.

How else can I test that my runtime dependencies are all satisfied and correct?

3 Likes

I found nix shell --unset PATH not a bad solution.

4 Likes

Note that nix shell will not execute shellHooks, so if you’re making use of pkg-config, python packages, or anything else that really relies on hooks, then you’re SOL.

4 Likes