diff options
author | Marc Weber <marco-oweber@gmx.de> | 2007-10-22T01·10+0000 |
---|---|---|
committer | Marc Weber <marco-oweber@gmx.de> | 2007-10-22T01·10+0000 |
commit | f529a3be8a1c1eab6af06171c498f38508e7a729 (patch) | |
tree | 57019bd98b2aed86c9ef1f01caf4c7e11d91c596 /doc/manual/writing-nix-expressions.xml | |
parent | 14e47e9c2caa7bec5778dd740ebb4a200b2b5c2a (diff) |
Added comment telling about setup-hook and propagatedBuildInputs
Diffstat (limited to 'doc/manual/writing-nix-expressions.xml')
-rw-r--r-- | doc/manual/writing-nix-expressions.xml | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/manual/writing-nix-expressions.xml b/doc/manual/writing-nix-expressions.xml index 01194d4c6a54..b83f46899dde 100644 --- a/doc/manual/writing-nix-expressions.xml +++ b/doc/manual/writing-nix-expressions.xml @@ -1,4 +1,4 @@ -<chapter xmlns="http://docbook.org/ns/docbook" +chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id='chap-writing-nix-expressions'> @@ -526,7 +526,16 @@ genericBuild <co xml:id='ex-hello-builder2-co-3' /></programlisting> <filename>bin</filename> subdirectory, it's added to <envar>PATH</envar>; if it has a <filename>include</filename> subdirectory, it's added to GCC's header search path; and so - on.</para> + on. + <footnote><para>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 + <programlisting>propagatedBuildInputs=[ C ];</programlisting> + instead of buildInputs when defining derivation B. + </para></footnote></para> </callout> @@ -535,7 +544,7 @@ genericBuild <co xml:id='ex-hello-builder2-co-3' /></programlisting> <para>The function <function>genericBuild</function> is defined in the file <literal>$stdenv/setup</literal>.</para> - </callout> + </callout> looks for a file nix-support/setup-hook within the derivation path. <callout arearefs='ex-hello-builder2-co-3'> |