about summary refs log tree commit diff
path: root/nix/buildGo
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-02-02T10·24+0300
committertazjin <tazjin@tvl.su>2022-02-02T13·36+0000
commita49358d8aa1cb444503bbe1e104adf94c17d3425 (patch)
treefc84202c12ba02846cd029b616c05cba774cae03 /nix/buildGo
parentcd2262c874cae891856f984b66db42399891b75f (diff)
fix(nix/buildGo): Use overrideAttrs to add metadata r/3740
Required for using overrideAttrs in readTree (cl/5186). Since this
uses pkgs.runCommand we know that overrideAttrs is available.

Change-Id: I18fdcc34cc79872834052caf4bf74555fdb766ce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5187
Tested-by: BuildkiteCI
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'nix/buildGo')
-rw-r--r--nix/buildGo/default.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/nix/buildGo/default.nix b/nix/buildGo/default.nix
index 0126a93d1621..92951b3cb213 100644
--- a/nix/buildGo/default.nix
+++ b/nix/buildGo/default.nix
@@ -90,11 +90,13 @@ let
         ${asmBuild}
         ${go}/bin/go tool compile -pack ${asmLink} -o $out/${path}.a -trimpath=$PWD -trimpath=${go} -p ${path} ${includeSources uniqueDeps} ${spaceOut srcs}
         ${asmPack}
-      '') // {
-        inherit gopkg;
-        goDeps = uniqueDeps;
-        goImportPath = path;
-      };
+      '').overrideAttrs (_: {
+        passthru = {
+          inherit gopkg;
+          goDeps = uniqueDeps;
+          goImportPath = path;
+        };
+      });
     in
     gopkg;