Commit 0d540c41 authored by Nicolas Mattia's avatar Nicolas Mattia
Browse files

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).
parent a71aec5f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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) \