From e279767d6927d2077255db3bf39c40030ba3791e Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 6 Jan 2019 15:40:11 +0100 Subject: [PATCH] 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. --- doc/stdenv.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 564471bbbbc6..ac0d84b90f96 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -1279,7 +1279,9 @@ makeFlags = [ "PREFIX=$(out)" ]; make. You must use this instead of makeFlags if the arguments contain spaces, e.g. -makeFlagsArray=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar") +preBuild = '' + makeFlagsArray+=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar") +''; Note that shell arrays cannot be passed through environment variables, so you cannot set makeFlagsArray in a derivation