From 20e10bbc9e7c5a7fff86b698db5cb93832e96a3b Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Mon, 8 Jul 2024 21:39:25 +0000 Subject: [PATCH] gitFull: add patch to workaround gitk issue in Darwin (#325645) Without this patch gitk just show an empty window. --- pkgs/applications/version-management/git/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/version-management/git/default.nix b/pkgs/applications/version-management/git/default.nix index f0386bd4a273..f6c10a7a34db 100644 --- a/pkgs/applications/version-management/git/default.nix +++ b/pkgs/applications/version-management/git/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, lib, stdenv, buildPackages +{ fetchurl, fetchpatch, lib, stdenv, buildPackages , curl, openssl, zlib, expat, perlPackages, python3, gettext, cpio , gnugrep, gnused, gawk, coreutils # needed at runtime by git-filter-branch etc , openssh, pcre2, bash @@ -59,6 +59,15 @@ stdenv.mkDerivation (finalAttrs: { ./installCheck-path.patch ] ++ lib.optionals withSsh [ ./ssh-path.patch + ] ++ lib.optionals (guiSupport && stdenv.isDarwin) [ + # Needed to workaround an issue in macOS where gitk shows a empty window + # https://github.com/Homebrew/homebrew-core/issues/68798 + # https://github.com/git/git/pull/944 + (fetchpatch { + name = "gitk_check_main_window_visibility_before_waiting_for_it_to_show.patch"; + url = "https://github.com/git/git/commit/1db62e44b7ec93b6654271ef34065b31496cd02e.patch"; + hash = "sha256-ntvnrYFFsJ1Ebzc6vM9/AMFLHMS1THts73PIOG5DkQo="; + }) ]; postPatch = ''