3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Daiderd Jordan 2019-01-06 15:40:11 +01:00
parent 9ee8cf5177
commit e279767d69
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -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