buildGoPackage: do not remove Go references if allowGoReferences is true

allowGoReference was only checked for disallowedReferences definition,
but the fixup of all output binaries removing references to the compiler
did not take this setting into account.
This commit is contained in:
Valérian Galliat 2016-02-28 00:12:55 -05:00
parent bc4dbca2b3
commit 37d1dcd12d

View File

@ -30,7 +30,7 @@ if disabled then throw "${name} not supported for go ${go.meta.branch}" else
let
args = lib.filterAttrs (name: _: name != "extraSrcs") args';
removeReferences = [ go ];
removeReferences = [ ] ++ lib.optional (!allowGoReference) go;
removeExpr = refs: lib.flip lib.concatMapStrings refs (ref: ''
| sed "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \