diff --git a/doc/manual/writing-nix-expressions.xml b/doc/manual/writing-nix-expressions.xml index 01194d4c6a..b83f46899d 100644 --- a/doc/manual/writing-nix-expressions.xml +++ b/doc/manual/writing-nix-expressions.xml @@ -1,4 +1,4 @@ - @@ -526,7 +526,16 @@ genericBuild bin subdirectory, it's added to PATH; if it has a include subdirectory, it's added to GCC's header search path; and so - on. + on. + How does it work? setup tries sourcing + $out/nix-support/setup-hook of all dependencies + thereby defining environment variables. + If you have A depending on B depending on C + you can force the setup-hooks of C beeing sourced when evaluating + expression A by using + propagatedBuildInputs=[ C ]; + instead of buildInputs when defining derivation B. + @@ -535,7 +544,7 @@ genericBuild The function genericBuild is defined in the file $stdenv/setup. - + looks for a file nix-support/setup-hook within the derivation path.