git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commite279767d6927d2077255db3bf39c40030ba3791e authorDaiderd Jordan <daiderd@gmail.com> dateSun 6 Jan 2019, 15:40 (8 years ago) parent9ee8cf5
1 file changed+3−1
doc/stdenv.xml+3−1
doc/stdenv.xml+3−1
@@ -1279,7 +1279,9 @@ makeFlags = [ "PREFIX=$(out)" ];
12791279 <command>make</command>. You must use this instead of
12801280 <varname>makeFlags</varname> if the arguments contain spaces, e.g.
12811281<programlisting>
1282−makeFlagsArray=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
1282+preBuild = ''
1283+ makeFlagsArray+=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
1284+'';
12831285</programlisting>
12841286 Note that shell arrays cannot be passed through environment variables,
12851287 so you cannot set <varname>makeFlagsArray</varname> in a derivation