From 6e53451c2f3c82b07cdceae66d46a3f4bca83da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sat, 24 Jan 2026 00:34:07 +0100 Subject: [PATCH] overlays/ghostty-dev: patch version when using npins --- nix/overlays/ghostty-dev.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/nix/overlays/ghostty-dev.nix b/nix/overlays/ghostty-dev.nix index 599c6542..153bf5d9 100644 --- a/nix/overlays/ghostty-dev.nix +++ b/nix/overlays/ghostty-dev.nix @@ -1,7 +1,20 @@ let sources = import ../../npins; in -final: prev: { +final: prev: +let + inherit (final) lib; +in +{ # Dev version of ghostty, "tip" - ghostty = sources.ghostty-dev.asFlake.packages.${final.stdenv.hostPlatform.system}.default; + ghostty = + let + shortRev = lib.substring 0 8 sources.ghostty-dev.revision; + in + # NOTE: + # ghostty-dev internally builds a derivation used as a cache. + # Overriding the pname would cause cash mismatch. + sources.ghostty-dev.asFlake.packages.${final.stdenv.hostPlatform.system}.default.override { + revision = shortRev; + }; }