diff options
author | Nicolas Mattia <nicolas@nmattia.com> | 2024-05-14 13:38:16 +0200 |
---|---|---|
committer | Nicolas Mattia <nicolas@nmattia.com> | 2024-05-14 15:31:41 +0200 |
commit | 0d540c419c4480c760cdd74d17b9c933fcbf1ddd (patch) | |
tree | c286bdcc4a9afb9c7c526950f08641ee28b81dfa /pkgs/applications/terminal-emulators | |
parent | a71aec5f3ae3d6c13d51d45952365e8721e8af4d (diff) |
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).
Diffstat (limited to 'pkgs/applications/terminal-emulators')
-rw-r--r-- | pkgs/applications/terminal-emulators/kitty/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
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) \ |