Merge pull request #182784 from flokli/gopass-fix-go-1.18.3

gopass*: build with Go with CL417615
This commit is contained in:
Florian Klink 2022-07-25 17:39:40 +07:00 committed by GitHub
commit a8a4f3dafa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2601,15 +2601,44 @@ with pkgs;
go-audit = callPackage ../tools/system/go-audit { };
gopass = callPackage ../tools/security/gopass { };
gopass = callPackage ../tools/security/gopass {
buildGoModule = __buildGo118ModuleCL417615;
};
gopass-hibp = callPackage ../tools/security/gopass/hibp.nix { };
gopass-hibp = callPackage ../tools/security/gopass/hibp.nix {
buildGoModule = __buildGo118ModuleCL417615;
};
gopass-jsonapi = callPackage ../tools/security/gopass/jsonapi.nix { };
gopass-jsonapi = callPackage ../tools/security/gopass/jsonapi.nix {
buildGoModule = __buildGo118ModuleCL417615;
};
git-credential-gopass = callPackage ../tools/security/gopass/git-credential.nix { };
git-credential-gopass = callPackage ../tools/security/gopass/git-credential.nix {
buildGoModule = __buildGo118ModuleCL417615;
};
gopass-summon-provider = callPackage ../tools/security/gopass/summon.nix { };
gopass-summon-provider = callPackage ../tools/security/gopass/summon.nix {
buildGoModule = __buildGo118ModuleCL417615;
};
# custom override for go 1.18 including the revert of CL411617, CL417615.
# Can be dropped if/once go 1.18.5 is released with CL417615.
# or when staging go 1.18.4 includes the revert.
__buildGo118ModuleCL417615 = let
fetchBase64Patch = args: (fetchpatch args).overrideAttrs (o: {
postFetch = "mv $out p; base64 -d p > $out; " + o.postFetch;
});
in darwin.apple_sdk_11_0.callPackage ../development/go-modules/generic {
go = buildPackages.go_1_18.overrideAttrs (oldAttrs: rec {
patches = oldAttrs.patches or [] ++ [
# https://go-review.googlesource.com/c/go/+/417615/
(fetchBase64Patch {
url = "https://go-review.googlesource.com/changes/go~417615/revisions/3/patch";
sha256 = "sha256-Gu5eZUwGGch7et75A/BNynbs4VlQUBClVUxjxPkdjOs=";
})
];
});
};
gosh = callPackage ../tools/security/gosh { };