From f529a3be8a1c1eab6af06171c498f38508e7a729 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Mon, 22 Oct 2007 01:10:19 +0000 Subject: [PATCH] Added comment telling about setup-hook and propagatedBuildInputs --- doc/manual/writing-nix-expressions.xml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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.