From 0a6cc48ca9863a26a3049bcd25f61c6bf9dd4a65 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Thu, 22 Jan 2026 00:40:39 +0800 Subject: [PATCH] ghostty: update themes dependency, fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See ghostty-org/ghostty#9606, #467368 Since a 1.2.4 release is somewhat unlikely, with the 1.3.0 release scheduled in 6–7 weeks, let's patch this now so that people who don't use `cache.nixos.org` (or mirrors thereof) aren't stuck with a broken build or being forced to use the flake. --- pkgs/by-name/gh/ghostty/deps.nix | 6 +++--- pkgs/by-name/gh/ghostty/package.nix | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gh/ghostty/deps.nix b/pkgs/by-name/gh/ghostty/deps.nix index eee5fe335be8..502370ea9f37 100644 --- a/pkgs/by-name/gh/ghostty/deps.nix +++ b/pkgs/by-name/gh/ghostty/deps.nix @@ -169,11 +169,11 @@ linkFarm name [ }; } { - name = "N-V-__8AALIsAwDyo88G5mGJGN2lSVmmFMx4YePfUvp_2o3Y"; + name = "N-V-__8AAIdIAwDt5PxH-cwCxEcTfw4jBV8sR6fZ_XLh-cR7"; path = fetchZigArtifact { name = "iterm2_themes"; - url = "https://github.com/mbadolato/iTerm2-Color-Schemes/releases/download/release-20251002-142451-4a5043e/ghostty-themes.tgz"; - hash = "sha256-GsEWVt4wMzp6+7N5I+QVuhCVJ70cFrdADwUds59AKnw="; + url = "https://github.com/mbadolato/iTerm2-Color-Schemes/releases/download/release-20260112-150707-28c8f5b/ghostty-themes.tgz"; + hash = "sha256-NIqF12KqXhIrP+LyBtg6WtkHxNUdWOyziAdq8S45RrU="; }; } { diff --git a/pkgs/by-name/gh/ghostty/package.nix b/pkgs/by-name/gh/ghostty/package.nix index 2baa4e26ffc2..41833530c66e 100644 --- a/pkgs/by-name/gh/ghostty/package.nix +++ b/pkgs/by-name/gh/ghostty/package.nix @@ -5,6 +5,7 @@ bzip2, callPackage, fetchFromGitHub, + fetchpatch2, fontconfig, freetype, glib, @@ -48,6 +49,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-0tmLOJCrrEnVc/ZCp/e646DTddXjv249QcSwkaukL30="; }; + # Replace the defunct iTerm2 themes dependency with a newer version + # Remove when 1.2.4 or 1.3.0 is released + patches = [ + (fetchpatch2 { + name = "fix-iterm2-themes-ref.patch"; + url = "https://github.com/pluiedev/ghostty/commit/dc51adc52661bbcacebe5e70b62b5041e3ee56a5.patch"; + hash = "sha256-0DrP4zN26pjeBawoi9U8y6VM/NlfhPmo27Iy5OsMj0s="; + }) + ]; + deps = callPackage ./deps.nix { name = "${finalAttrs.pname}-cache-${finalAttrs.version}"; };