diff options
author | Luflosi <luflosi@luflosi.de> | 2022-01-07 18:43:31 +0100 |
---|---|---|
committer | Luflosi <luflosi@luflosi.de> | 2022-01-08 13:44:08 +0100 |
commit | aa1932ea7a0fe94239e66fd76bf71e61bcb49402 (patch) | |
tree | 8b1c829b1334859db6659781bfffb2544d428c88 /pkgs/applications | |
parent | 3bb443d5d9029e5bf8ade3d367a9d4ba9065162a (diff) | |
download | nixlib-aa1932ea7a0fe94239e66fd76bf71e61bcb49402.tar nixlib-aa1932ea7a0fe94239e66fd76bf71e61bcb49402.tar.gz nixlib-aa1932ea7a0fe94239e66fd76bf71e61bcb49402.tar.bz2 nixlib-aa1932ea7a0fe94239e66fd76bf71e61bcb49402.tar.lz nixlib-aa1932ea7a0fe94239e66fd76bf71e61bcb49402.tar.xz nixlib-aa1932ea7a0fe94239e66fd76bf71e61bcb49402.tar.zst nixlib-aa1932ea7a0fe94239e66fd76bf71e61bcb49402.zip |
kitty: copy shell integration files into separate output
https://sw.kovidgoyal.net/kitty/build/#notes-for-linux-macos-packagers recommends to split kitty into three packages with kitty-shell-integration being the one that includes some files useful for the shell integration. We already use kitty.terminfo in Nixpkgs instead of kitty-terminfo but we can't use kitty.shell-integration instead of kitty-shell-integration because shell-integration is not a valid shell variable name. I named it kitty.shell_integration instead. This package can then be used by a future kitty nixos module that still needs to be created. Without this commit, kitty would modify the user's ~/.bashrc when using bash.
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/terminal-emulators/kitty/default.nix | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index 6073ccd80c57..7647f6d627f7 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -69,26 +69,31 @@ buildPythonApplication rec { propagatedBuildInputs = lib.optional stdenv.isLinux libGL; - outputs = [ "out" "terminfo" ]; + outputs = [ "out" "terminfo" "shell_integration" ]; # Causes build failure due to warning hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow"; dontConfigure = true; - buildPhase = '' + buildPhase = let + commonOptions = '' + --update-check-interval=0 \ + --shell-integration=enabled\ no-rc + ''; + in '' runHook preBuild ${if stdenv.isDarwin then '' ${python.interpreter} setup.py kitty.app \ - --update-check-interval=0 \ - --disable-link-time-optimization + --disable-link-time-optimization \ + ${commonOptions} make man '' else '' ${python.interpreter} setup.py linux-package \ - --update-check-interval=0 \ --egl-library='${lib.getLib libGL}/lib/libEGL.so.1' \ --startup-notification-library='${libstartup_notification}/lib/libstartup-notification-1.so' \ - --canberra-library='${libcanberra}/lib/libcanberra.so' + --canberra-library='${libcanberra}/lib/libcanberra.so' \ + ${commonOptions} ''} runHook postBuild ''; @@ -139,6 +144,8 @@ buildPythonApplication rec { mkdir -p $out/nix-support echo "$terminfo" >> $out/nix-support/propagated-user-env-packages + cp -r 'shell-integration' "$shell_integration" + runHook postInstall ''; |