diff options
Diffstat (limited to 'nix/buildGo/default.nix')
-rw-r--r-- | nix/buildGo/default.nix | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/nix/buildGo/default.nix b/nix/buildGo/default.nix index 03c0b2bc4b9d..5346b06ebd73 100644 --- a/nix/buildGo/default.nix +++ b/nix/buildGo/default.nix @@ -82,13 +82,19 @@ let asmPack = ifAsm '' ${go}/bin/go tool pack r $out/${path}.a ./asm.o ''; - in (runCommand "golib-${name}" {} '' - mkdir -p $out/${path} - ${srcList path (map (s: "${s}") srcs)} - ${asmBuild} - ${go}/bin/go tool compile -pack ${asmLink} -o $out/${path}.a -trimpath=$PWD -trimpath=${go} -p ${path} ${includeSources uniqueDeps} ${spaceOut srcs} - ${asmPack} - '') // { goDeps = uniqueDeps; goImportPath = path; }; + + gopkg = (runCommand "golib-${name}" {} '' + mkdir -p $out/${path} + ${srcList path (map (s: "${s}") srcs)} + ${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; + }; + in gopkg; # Build a tree of Go libraries out of an external Go source # directory that follows the standard Go layout and was not built |