From 07a564964c0dfb1fa15f9be701b2fba55b252a9d Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sun, 14 Aug 2022 12:40:39 -0700 Subject: [PATCH] git-team: fix build on aarch64-darwin Upstream has dependency updates that fix this build with Go 1.18 on aarch64-darwin but is not close to cutting a new release, so we can instead pull in a minimal set of patches to fix this. --- .../git-and-tools/git-team/default.nix | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git-team/default.nix b/pkgs/applications/version-management/git-and-tools/git-team/default.nix index 3fac0dc9791b..6ec4589f570e 100644 --- a/pkgs/applications/version-management/git-and-tools/git-team/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-team/default.nix @@ -1,4 +1,10 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: +{ lib +, buildGoModule +, fetchFromGitHub +, fetchpatch +, installShellFiles +}: + buildGoModule rec { pname = "git-team"; version = "1.7.0"; @@ -7,10 +13,28 @@ buildGoModule rec { owner = "hekmekk"; repo = "git-team"; rev = "v${version}"; - sha256 = "0nl5j64b61jw4bkf29y51svjbndmqqrqx96yaip4vjzj2dx9ywm4"; + hash = "sha256-pHKfehPyy01uVN6kjjPGtdkltw7FJ+HmIlwGs4iRhVo="; }; - vendorSha256 = "sha256-xJMWPDuqoNtCCUnKuUvwlYztyrej1uZttC0NsDvYnXI="; + patches = [ + (fetchpatch { + name = "1-update-dependencies-for-go-1.18.patch"; + url = "https://github.com/hekmekk/git-team/commit/d8632d9938379293521f9b3f2a93df680dd13a31.patch"; + hash = "sha256-hlmjPf3qp8WPNSH+GgkqATDiKIRzo+t81Npkptw8vgI="; + }) + (fetchpatch { + name = "2-update-dependencies-for-go-1.18.patch"; + url = "https://github.com/hekmekk/git-team/commit/f6acc96c2ffe76c527f2f2897b368cbb631d738c.patch"; + hash = "sha256-Pe+UAK9N1NpXhFGYv9l1iZ1/fCCqnT8OSgKdt/vUqO4="; + }) + (fetchpatch { + name = "3-update-dependencies-for-go-1.18.patch"; + url = "https://github.com/hekmekk/git-team/commit/2f38137298e4749a8dfe37e085015360949e73ad.patch"; + hash = "sha256-+6C8jp/qwYVmbL+SpV9FJIVyBRvX4tXBcoHMB//nNTk="; + }) + ]; + + vendorSha256 = "sha256-GdwksPmYEGTq/FkG/rvn3o0zMKU1cSkpgZ+GrfVgLWM="; nativeBuildInputs = [ installShellFiles ];