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.
commit37d1dcd12d1367a9b0be23947ffe8a0539c2f2b7
authorValérian Galliat <val@codejam.info>
dateSun 28 Feb 2016, 00:12 (11 years ago)
parentbc4dbca
pkgs/development/go-modules/generic/default.nix+1−1
@@ -30,7 +30,7 @@ if disabled then throw "${name} not supported for go ${go.meta.branch}" else
3030let
3131 args = lib.filterAttrs (name: _: name != "extraSrcs") args';
3232
33− removeReferences = [ go ];
33+ removeReferences = [ ] ++ lib.optional (!allowGoReference) go;
3434
3535 removeExpr = refs: lib.flip lib.concatMapStrings refs (ref: ''
3636 | sed "s,${ref},$(echo "${ref}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \