From 7da57081fe2feb584a77f00ec607c6510b8a2f9c Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Sun, 12 May 2019 15:00:32 +0200 Subject: [PATCH 1/2] kitty: apply patch on Darwin for running as symlink --- pkgs/applications/misc/kitty/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix index 3edb48cc489b..0a35ecb9fa62 100644 --- a/pkgs/applications/misc/kitty/default.nix +++ b/pkgs/applications/misc/kitty/default.nix @@ -2,7 +2,7 @@ harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel, libstartup_notification, libX11, libXrandr, libXinerama, libXcursor, libxkbcommon, libXi, libXext, wayland-protocols, wayland, - which, dbus, + which, dbus, fetchpatch, Cocoa, CoreGraphics, Foundation, @@ -67,6 +67,17 @@ buildPythonApplication rec { libstartup_notification = "${libstartup_notification}/lib/libstartup-notification-1.so"; }) ] ++ stdenv.lib.optionals stdenv.isDarwin [ + (fetchpatch { + name = "macos-symlink-1"; + url = https://github.com/kovidgoyal/kitty/commit/bdeec612667f6976109247fe1750b10dda9c24c0.patch; + sha256 = "1d18x260w059qag80kgb2cgi2h4rricvqhwpbrw79s8yxzs7jhxk"; + }) + (fetchpatch { + # fixup of previous patch + name = "macos-symlink-2"; + url = https://github.com/kovidgoyal/kitty/commit/af2c9a49b1ad31e94242295d88598591623fbf11.patch; + sha256 = "0k3dmgbvmh66j8k3h8dw6la6ma6f20fng6jjypy982kxvracsnl5"; + }) ./macos-10.11.patch ./no-lto.patch ./no-werror.patch From 240fce7ba75e6df25855122ce0d4f93d1ea1c1be Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Sun, 12 May 2019 15:02:42 +0200 Subject: [PATCH 2/2] kitty: symlink the deref binary --- pkgs/applications/misc/kitty/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix index 0a35ecb9fa62..be70efba5ad7 100644 --- a/pkgs/applications/misc/kitty/default.nix +++ b/pkgs/applications/misc/kitty/default.nix @@ -95,7 +95,7 @@ buildPythonApplication rec { mkdir -p $out ${if stdenv.isDarwin then '' mkdir "$out/bin" - ln -s ../Applications/kitty.app/Contents/MacOS/kitty "$out/bin/kitty" + ln -s ../Applications/kitty.app/Contents/MacOS/kitty-deref-symlink "$out/bin/kitty" mkdir "$out/Applications" cp -r kitty.app "$out/Applications/kitty.app" '' else ''