summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2019-01-06 15:40:11 +0100
committerDaiderd Jordan <daiderd@gmail.com>2019-01-06 15:40:11 +0100
commite279767d6927d2077255db3bf39c40030ba3791e (patch)
tree02332f78b172feebbe2eec5ff54cc4252af4d459 /doc
parent9ee8cf517713135cfe395a56fd59d107fda0103b (diff)
downloadnixpkgs-e279767d6927d2077255db3bf39c40030ba3791e.tar
nixpkgs-e279767d6927d2077255db3bf39c40030ba3791e.tar.gz
nixpkgs-e279767d6927d2077255db3bf39c40030ba3791e.tar.bz2
nixpkgs-e279767d6927d2077255db3bf39c40030ba3791e.tar.lz
nixpkgs-e279767d6927d2077255db3bf39c40030ba3791e.tar.xz
nixpkgs-e279767d6927d2077255db3bf39c40030ba3791e.tar.zst
nixpkgs-e279767d6927d2077255db3bf39c40030ba3791e.zip
doc: don't overwrite makeFlagsArray in the example
Arrays like these should be appended to instead of overwritten in almost
every case to avoid loosing the existing flags.
Diffstat (limited to 'doc')
-rw-r--r--doc/stdenv.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 564471bbbbc..ac0d84b90f9 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -1279,7 +1279,9 @@ makeFlags = [ "PREFIX=$(out)" ];
        <command>make</command>. You must use this instead of
        <varname>makeFlags</varname> if the arguments contain spaces, e.g.
 <programlisting>
-makeFlagsArray=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
+preBuild = ''
+  makeFlagsArray+=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
+'';
 </programlisting>
        Note that shell arrays cannot be passed through environment variables,
        so you cannot set <varname>makeFlagsArray</varname> in a derivation