diff options
author | Artturin <Artturin@artturin.com> | 2023-07-11 21:16:30 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2023-07-14 00:18:06 +0300 |
commit | 1c29673fcce3aecd0cb4f30058c266ea5480c8a3 (patch) | |
tree | 342dbdf9d35bb9fb4290aeb99fecde1762f0b097 /pkgs/build-support/go/module.nix | |
parent | 9caab144be31e088bfd3468de2f26e5c08b0f4fa (diff) | |
download | nixpkgs-1c29673fcce3aecd0cb4f30058c266ea5480c8a3.tar nixpkgs-1c29673fcce3aecd0cb4f30058c266ea5480c8a3.tar.gz nixpkgs-1c29673fcce3aecd0cb4f30058c266ea5480c8a3.tar.bz2 nixpkgs-1c29673fcce3aecd0cb4f30058c266ea5480c8a3.tar.lz nixpkgs-1c29673fcce3aecd0cb4f30058c266ea5480c8a3.tar.xz nixpkgs-1c29673fcce3aecd0cb4f30058c266ea5480c8a3.tar.zst nixpkgs-1c29673fcce3aecd0cb4f30058c266ea5480c8a3.zip |
treewide: go-modules -> goModules
In 787af0f79f128cb21b113d2eb37e64d913f18aae I had to change ${go-modules} to $goModules to allow overrideAttrs to work; However, env vars cannot contain -, so i had to change go-modules too. This in turn broke nix-update because it uses the go-modules attr. Instead of making nix-update more complicated, make go-modules naming match cargoDeps. `fd --type f | xargs sd '\bgo-modules\b' 'goModules'` and revert change to pkgs/applications/misc/dstask/default.nix and pkgs/servers/http/dave/default.nix and pkgs/os-specific/darwin/plistwatch/default.nix release note added
Diffstat (limited to 'pkgs/build-support/go/module.nix')
-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 61abd040a46..ced7873e6a2 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 |