NixOS/nixpkgs — pull request #3847 by vcunat (2014-08-29 08:10:48+00:00)
Title: stdenv modularization

I think we should **not merge** this or any non-essential big changes until we stabilize the current staging branch and merge into master. There are still those new security updates in staging.

This is @edolstra's branch moving some parts from setup.sh. IMHO even after that the file was too big and difficult to comprehend by those not knowing it, so I split it even more in 7b2c0e3a61.

Now the script is a concatenation of 16 scripts by default, referenced from https://github.com/vcunat/nixpkgs/blob/7b2c0e3a612a0325e4fad3989727f5f1b7be51f4/pkgs/stdenv/generic/default.nix, and those default scripts are located in the generic stdenv definition instead of the location for optional setup hooks.

- This change is *not* needed for the multiple-output stuff, in case you dislike the splitting in general.
- I found a ``$_PATH`` reference which seems an unneeded leftover, but kept it for now. https://github.com/vcunat/nixpkgs/blob/7b2c0e3a612a0325e4fad3989727f5f1b7be51f4/pkgs/stdenv/generic/default-builder/setup.sh#L60
- I tested this by rebuilding the whole stdenv to guard against typos.