diff options
author | Artturi <Artturin@artturin.com> | 2023-07-14 01:36:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 01:36:16 +0300 |
commit | c831e7939fef65faf780b02ef978dda5b3c05a16 (patch) | |
tree | db61939e3c5d7d3af1065f20b9d20db9001f4700 /pkgs/build-support | |
parent | 3020304ac52f07e3d314e3a339fc73cc94079b7c (diff) | |
parent | 1c29673fcce3aecd0cb4f30058c266ea5480c8a3 (diff) |
Merge pull request #242905 from Artturin/gomodu1
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/go/module.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix index 61abd040a46fb..ced7873e6a2b2 100644 --- a/pkgs/build-support/go/module.nix +++ b/pkgs/build-support/go/module.nix @@ -6,7 +6,7 @@ , passthru ? { } , patches ? [ ] - # A function to override the go-modules derivation + # A function to override the goModules derivation , overrideModAttrs ? (_oldAttrs: { }) # path to go.mod and go.sum directory @@ -52,9 +52,9 @@ assert (args' ? vendorHash && args' ? vendorSha256) -> throw "both `vendorHash` let args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ]; - go-modules = if (vendorHash == null) then "" else + goModules = if (vendorHash == null) then "" else (stdenv.mkDerivation { - name = "${name}-go-modules"; + name = "${name}-goModules"; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ go git cacert ]; @@ -163,10 +163,10 @@ let cd "$modRoot" '' + lib.optionalString (vendorHash != null) '' ${if proxyVendor then '' - export GOPROXY=file://${go-modules} + export GOPROXY=file://${goModules} '' else '' rm -rf vendor - cp -r --reflink=auto ${go-modules} vendor + cp -r --reflink=auto ${goModules} vendor ''} '' + '' @@ -288,7 +288,7 @@ let disallowedReferences = lib.optional (!allowGoReference) go; - passthru = passthru // { inherit go go-modules vendorHash; } // { inherit (args') vendorSha256; }; + passthru = passthru // { inherit go goModules vendorHash; } // { inherit (args') vendorSha256; }; meta = { # Add default meta information |