Nixpkgs: Does stdenv need to be a derivation?

Created on 6 Jul 2017  路  6Comments  路  Source: NixOS/nixpkgs

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.

enhancement question stale community feedback

Most helpful comment

It would be nice to programmatically get the build-time dependencies of a derivation, perhaps.

Indeed! https://github.com/NixOS/nix/issues/1245

All 6 comments

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.

Indeed! https://github.com/NixOS/nix/issues/1245

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:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

domenkozar picture domenkozar  路  3Comments

ob7 picture ob7  路  3Comments

yawnt picture yawnt  路  3Comments

sid-kap picture sid-kap  路  3Comments

vaibhavsagar picture vaibhavsagar  路  3Comments