From 4d1e04c00fe2ab1dd485ae198be56f97b7fff41f Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 25 Jul 2022 22:30:16 +0700 Subject: [PATCH] go_1_18: backport CL417615 Upstream reverted cmd/compile: revert "fix missing dict pass for type assertions", as it's causing compilation errors in programs like gopass - see https://github.com/gopasspw/gopass/issues/2280 and https://github.com/NixOS/nixpkgs/issues/182440. The revert has already been cherry-picked to HEAD, but there's no backport release yet. This can be reverted once there's a new release with that commit. --- pkgs/development/compilers/go/1.18.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/go/1.18.nix b/pkgs/development/compilers/go/1.18.nix index 05c40b689370..f21ee87ad4c4 100644 --- a/pkgs/development/compilers/go/1.18.nix +++ b/pkgs/development/compilers/go/1.18.nix @@ -1,5 +1,6 @@ { lib , stdenv +, fetchpatch , fetchurl , tzdata , iana-etc @@ -172,7 +173,11 @@ stdenv.mkDerivation rec { touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd ''; - patches = [ + patches = let + fetchBase64Patch = args: (fetchpatch args).overrideAttrs (o: { + postFetch = "mv $out p; base64 -d p > $out; " + o.postFetch; + }); + in [ ./remove-tools-1.11.patch ./ssl-cert-file-1.16.patch ./remove-test-pie-1.15.patch @@ -182,6 +187,12 @@ stdenv.mkDerivation rec { ./skip-nohup-tests.patch ./skip-cgo-tests-1.15.patch ./go_no_vendor_checks-1.16.patch + + # 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="; + }) ]; postPatch = ''