From 0d540c419c4480c760cdd74d17b9c933fcbf1ddd Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Tue, 14 May 2024 13:38:16 +0200 Subject: kitty: wrap correct executable on macOS This fixes the kitty wrapProgram step to wrap the actual `kitty` executable, which on macOS is inside the App bundle. On macOS, `$out/bin/kitty` is just a symlink, and wrapping this symlink (instead of the executable in the App bundle) means that the wrapper is not used when starting the application itself (and the wrapper is only used when the `bin/kitty` executable is used, e.g. from terminal). --- pkgs/applications/terminal-emulators/kitty/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/applications/terminal-emulators') diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index 675e47e5f57ac..5e31ac572cab3 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -210,7 +210,10 @@ buildPythonApplication rec { cp -r linux-package/{bin,share,lib} "$out" cp linux-package/bin/kitten "$kitten/bin/kitten" ''} - wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${lib.makeBinPath [ imagemagick ncurses.dev ]}" + + # dereference the `kitty` symlink to make sure the actual executable + # is wrapped on macOS as well (and not just the symlink) + wrapProgram $(realpath "$out/bin/kitty") --prefix PATH : "$out/bin:${lib.makeBinPath [ imagemagick ncurses.dev ]}" installShellCompletion --cmd kitty \ --bash <("$out/bin/kitty" +complete setup bash) \ -- cgit 1.4.1