From 37d1dcd12d1367a9b0be23947ffe8a0539c2f2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Galliat?= Date: Sun, 28 Feb 2016 00:12:55 -0500 Subject: [PATCH] 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. --- pkgs/development/go-modules/generic/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 260e8d66c58..15b729173c6 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -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" \