nixpkgs/pkgs/stdenv
John Ericson 7f3ca3e21a stdenv: Fix handling of dependencies and hooks
4 far-reaching changes: Smaller PATH, New vars, different propagation
logic, and different hook logic

Smaller PATH
------------

`buildInputs` no longer go on the PATH at build time, as they cannot be
run when cross compiling and we don't want to special case. Simply make
a `nativeBuildInput` too if one needs them on the PATH. Fixes #21191.

Many new depedendency variables
-------------------------------

See the stdenv chapter of the nixpkgs manual. I pulled out the existing
documentation of dependency specification into a new section, and added
language for these two (and their propagated equivalents) along side
the others'.

More complex propagation logic
------------------------------

Before a propagated*XXX*Input always acted as if it was specified
directly as a *XXX*Input downstream. That's simple enough, but violates
the intended roles of each sort of dep, which has functional and not
just stylistic consequences.

The new algorithm is detailed in the manual, and ensures everything
ends up in the right place. I tried to give both an informal and formal
description, but I suspect in practice it will not make much sense
until one tries cross compiling, after which it will immediately make
sense as the only sane option.

Simplified hook logic
---------------------

Rather than `envHook` and `crossEnvHook`, whose behavior differs
depending on whether we are cross compiling or not, there is now one
hook per sort (or rather non-propagated and propagated pair of sorts)
of dependency. These new hooks have the same meaning regardless of
cross compilation. See the setup hook section of stdenv chapter of the
Nixpkgs manual for more details.
2017-12-30 22:04:21 -05:00
..
cross all-packages: Remove gccCrossStageFinal; any gcc will not work 2017-09-21 15:49:18 -04:00
custom top-level: {build,host,target}Platform are defined in the stdenv instead 2017-07-07 12:55:02 -04:00
cygwin cygwin: rebase fixes 2017-06-26 09:26:10 -03:00
darwin darwin stdenv: Make stdenv.cc, not stdenv, bring in libcxx 2017-12-25 19:32:07 -05:00
freebsd cc-wrapper: Use stdenvNoCC to build 2017-09-26 14:08:21 -04:00
generic stdenv: Fix handling of dependencies and hooks 2017-12-30 22:04:21 -05:00
linux bintools-wrapper: Import separately from cc-wrapper 2017-12-13 16:08:18 -05:00
native cc-wrapper: Use stdenvNoCC to build 2017-09-26 14:08:21 -04:00
nix cc-wrapper: Use stdenvNoCC to build 2017-09-26 14:08:21 -04:00
adapters.nix stdenv cross adapter: Get rid of extra propagatation of buildInputs 2017-12-29 17:32:28 -05:00
booter.nix treewide: Depend on targetPackages.stdenv.cc.bintools instead of binutils directly 2017-11-05 17:10:53 -05:00
common-path.nix
default.nix