overlay: patch bug in go 1.18.5

This commit is contained in:
Jez Cope 2022-07-25 21:55:38 +01:00
parent f561e525f3
commit f7ebbf6dde
1 changed files with 37 additions and 1 deletions

View File

@ -1,5 +1,41 @@
final: prev:
let inherit (final) callPackage;
let
inherit (final) callPackage fetchpatch buildPackages;
# 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 prev.buildGo118Module.override {
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=";
})
];
});
};
in {
gopass = prev.gopass.override { buildGoModule = __buildGo118ModuleCL417615; };
gopass-hibp =
prev.gopass-hibp.override { buildGoModule = __buildGo118ModuleCL417615; };
gopass-jsonapi = prev.gopass-jsonapi.override {
buildGoModule = __buildGo118ModuleCL417615;
};
git-credential-gopass = prev.git-credential-gopass.override {
buildGoModule = __buildGo118ModuleCL417615;
};
gopass-summon-provider = prev.gopass-summon-provider.override {
buildGoModule = __buildGo118ModuleCL417615;
};
}