From a49358d8aa1cb444503bbe1e104adf94c17d3425 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 2 Feb 2022 13:24:37 +0300 Subject: fix(nix/buildGo): Use overrideAttrs to add metadata 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 Autosubmit: tazjin --- nix/buildGo/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'nix/buildGo') diff --git a/nix/buildGo/default.nix b/nix/buildGo/default.nix index 0126a93d16..92951b3cb2 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; -- cgit 1.4.1