I'm not quite sure why stdenv is a derivation. I think it would be cleaner for it to just be an attribute set. This might mean migrating some logic from bash in setup.sh to Nix expressions, but that is probably a good thing anyways.
Historically stdenv has been an installable package that propagates the stdenv tools (e.g. gcc). So it was a convenient way to replicate stdenv in shells, predating nix-shell.
However this appears to be broken at the moment (nix-support/propagated-user-env-packages is empty).
@edolstra Interesting; thanks for the history lesson. Sounds like there is no more need with nix-shell, then?
It's also used in a few places to include stdenv in VM tests that need to perform a build, e.g.
nixos/tests/containers-ipv4.nix: virtualisation.pathsInNixDB = [ pkgs.stdenv ];
@edolstra any idea of a work around? It would be nice to programmatically get the build-time dependencies of a derivation, perhaps.
It would be nice to programmatically get the build-time dependencies of a derivation, perhaps.
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Most helpful comment
Indeed! https://github.com/NixOS/nix/issues/1245