From 6d7ef7de57e6967e73ce146ae402d70660ea91a0 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 9 Aug 2023 02:51:03 +0100 Subject: [PATCH] 3p: patch go so that things work again --- third_party/default.nix | 21 +++++++++++++++++++++ third_party/tvl/nix/buildGo/default.nix | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/third_party/default.nix b/third_party/default.nix index c9a75f2733..da2bb90e80 100644 --- a/third_party/default.nix +++ b/third_party/default.nix @@ -31,6 +31,27 @@ let nixpkgs = import ./nixpkgs { inherit system; config = nixpkgsConfig; + overlays = [(final: prev: { + go_1_20_socket = prev.go_1_20.overrideAttrs (old: { + patches = old.patches ++ [(final.fetchpatch { + url = "https://go.googlesource.com/go/+/ad087ee2804b7ce088161df04403c93ddc623888%5E%21?format=TEXT"; + sha256 = "14z1rgn2qhmzhk9b8iksdknzrf0fbbhabqngcz5jlskc8vwdd14v"; + decode = "base64 -d"; + })]; + }); + vault = prev.vault.override { + buildGoModule = prev.buildGoModule.override { + go = final.go_1_20_socket; + }; + }; + go_1_19_socket = prev.go_1_19.overrideAttrs (old: { + patches = old.patches ++ [(final.fetchpatch { + url = "https://go.googlesource.com/go/+/ad087ee2804b7ce088161df04403c93ddc623888%5E%21?format=TEXT"; + sha256 = "14z1rgn2qhmzhk9b8iksdknzrf0fbbhabqngcz5jlskc8vwdd14v"; + decode = "base64 -d"; + })]; + }); + })]; }; crate2nixSrc = nixpkgs.fetchFromGitHub { owner = "kolloch"; diff --git a/third_party/tvl/nix/buildGo/default.nix b/third_party/tvl/nix/buildGo/default.nix index b96ba86574..6c8dc83bcc 100644 --- a/third_party/tvl/nix/buildGo/default.nix +++ b/third_party/tvl/nix/buildGo/default.nix @@ -24,7 +24,7 @@ let toString; inherit (pkgs) lib runCommand runCommandCC fetchFromGitHub protobuf symlinkJoin; - go = pkgs.go_1_19; + go = pkgs.go_1_19_socket; # Helpers for low-level Go compiler invocations spaceOut = lib.concatStringsSep " ";