lol

Merge pull request #175243 from leungbk/kitty-update

kitty: 0.25.0 -> 0.25.1

authored by

Sandro and committed by
GitHub
7d7c7c05 7c8ad2c9

+31 -52
+31 -12
pkgs/applications/terminal-emulators/kitty/default.nix
··· 28 28 with python3Packages; 29 29 buildPythonApplication rec { 30 30 pname = "kitty"; 31 - version = "0.25.0"; 31 + version = "0.25.1"; 32 32 format = "other"; 33 33 34 34 src = fetchFromGitHub { 35 35 owner = "kovidgoyal"; 36 36 repo = "kitty"; 37 37 rev = "v${version}"; 38 - sha256 = "sha256-RYQVcbyKIv/FlrtROoQywWR+iF+4KYiYrrzErUrOCWM="; 38 + sha256 = "sha256-wL631cbA6ffXZomi6iDHk7XerRlpIL6T2qlEiQvFSJY="; 39 39 }; 40 40 41 41 buildInputs = [ ··· 78 78 outputs = [ "out" "terminfo" "shell_integration" ]; 79 79 80 80 patches = [ 81 - # Required to get `test_ssh_env_vars` to pass. 81 + # Fix to ensure that files in tar files used by SSH kitten have write permissions. 82 + (fetchpatch { 83 + name = "fix-tarball-file-permissions.patch"; 84 + url = "https://github.com/kovidgoyal/kitty/commit/8540ca399053e8d42df27283bb5dd4af562ed29b.patch"; 85 + sha256 = "sha256-y5w+ritkR+ZEfNSRDQW9r3BU2qt98UNK7vdEX/X+mKU="; 86 + }) 87 + 88 + # Remove upon next release. Needed because of a missing #define. 89 + (fetchpatch { 90 + name = "fontconfig-1.patch"; 91 + url = "https://github.com/kovidgoyal/kitty/commit/bec620a8d30c36453e471b140b07483c7f875bf4.patch"; 92 + sha256 = "sha256-r1OTcXdO+RUAXmmIqI07m+z0zXq8DXCzgBRXPpnkGGM="; 93 + }) 94 + (fetchpatch { 95 + name = "fontconfig-2.patch"; 96 + url = "https://github.com/kovidgoyal/kitty/commit/1283a2b7e552d30cabce9345e5c13e5f9079183d.patch"; 97 + sha256 = "sha256-UM/OsumnfVHuHTahpRwyWZOeu6L8WOwbBf3lcjwdTj8="; 98 + }) 82 99 (fetchpatch { 83 - name = "increase-pty-lines.patch"; 84 - url = "https://github.com/kovidgoyal/kitty/commit/eb84990f5a8edc458e04d24cc1cda05316d74ceb.patch"; 85 - sha256 = "sha256-eOANfhGPMoN4FqxtIGDBu5X0O3RPLABDnL+LKqSLROI="; 100 + name = "fontconfig-3.patch"; 101 + url = "https://github.com/kovidgoyal/kitty/commit/5c4abe749b1f50ae556a711d24ac7f3e384fac4e.patch"; 102 + sha256 = "sha256-amvyv5cZxHGPg7dZv649WjH4MNloFbmz5D4rhjKNzYA="; 86 103 }) 87 - # Fix to ensure that files in tar files used by SSH kitten have write permissions. 88 - ./tarball-restore-write-permissions.patch 89 104 90 105 # Needed on darwin 91 106 92 107 # Gets `test_ssh_shell_integration` to pass for `zsh` when `compinit` complains about 93 108 # permissions. 94 109 ./zsh-compinit.patch 95 - # Skip `test_ssh_login_shell_detection` in some cases, build users have their shell set to 96 - # `/sbin/nologin` which causes issues. 97 - ./disable-test_ssh_login_shell_detection.patch 110 + 111 + # Skip login shell detection when login shell is set to nologin 112 + (fetchpatch { 113 + name = "skip-login-shell-detection-for-nologin.patch"; 114 + url = "https://github.com/kovidgoyal/kitty/commit/27906ea853ce7862bcb83e324ef80f6337b5d846.patch"; 115 + sha256 = "sha256-Zg6uWkiWvb45i4xcp9k6jy0R2IQMT4PXr7BenzZ/md8="; 116 + }) 98 117 # Skip `test_ssh_bootstrap_with_different_launchers` when launcher is `zsh` since it causes: 99 118 # OSError: master_fd is in error condition 100 119 ./disable-test_ssh_bootstrap_with_different_launchers.patch ··· 122 141 --egl-library='${lib.getLib libGL}/lib/libEGL.so.1' \ 123 142 --startup-notification-library='${libstartup_notification}/lib/libstartup-notification-1.so' \ 124 143 --canberra-library='${libcanberra}/lib/libcanberra.so' \ 144 + --fontconfig-library='${fontconfig.lib}/lib/libfontconfig.so' \ 125 145 ${commonOptions} 126 146 ''} 127 147 runHook postBuild ··· 203 223 passthru.tests.test = nixosTests.terminal-emulators.kitty; 204 224 205 225 meta = with lib; { 206 - broken = stdenv.isDarwin; 207 226 homepage = "https://github.com/kovidgoyal/kitty"; 208 227 description = "A modern, hackable, featureful, OpenGL based terminal emulator"; 209 228 license = licenses.gpl3Only;
-13
pkgs/applications/terminal-emulators/kitty/disable-test_ssh_login_shell_detection.patch
··· 1 - diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py 2 - index 1f424146..57620334 100644 3 - --- a/kitty_tests/ssh.py 4 - +++ b/kitty_tests/ssh.py 5 - @@ -197,7 +197,7 @@ def test_ssh_login_shell_detection(self): 6 - expected_login_shell = pwd.getpwuid(os.geteuid()).pw_shell 7 - for m in methods: 8 - for sh in self.all_possible_sh: 9 - - if 'python' in sh: 10 - + if 'python' in sh or '/sbin/nologin' in expected_login_shell: 11 - continue 12 - with self.subTest(sh=sh, method=m), tempfile.TemporaryDirectory() as tdir: 13 - pty = self.check_bootstrap(sh, tdir, test_script=f'{m}; echo "$login_shell"; exit 0', SHELL_INTEGRATION_VALUE='')
-27
pkgs/applications/terminal-emulators/kitty/tarball-restore-write-permissions.patch
··· 1 - From 59f6876187da2c01b35e696e169ca98239c08a41 Mon Sep 17 00:00:00 2001 2 - From: Jason Felice <jason.m.felice@gmail.com> 3 - Date: Tue, 24 May 2022 07:54:25 -0400 4 - Subject: [PATCH] Restore write permissions in tarball 5 - 6 - In Nix, the source files are stored in an immutable store and 7 - therefore have been stripped of write permissions. When the SSH 8 - kitten makes the tarfile, the files contained in it are also missing 9 - the write permissions, causing commands on the remote side to fail. 10 - --- 11 - kittens/ssh/main.py | 1 + 12 - 1 file changed, 1 insertion(+) 13 - 14 - diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py 15 - index 0b50d5ff..f80ac13d 100644 16 - --- a/kittens/ssh/main.py 17 - +++ b/kittens/ssh/main.py 18 - @@ -123,6 +123,7 @@ def make_tarfile(ssh_opts: SSHOptions, base_env: Dict[str, str], compression: st 19 - def normalize_tarinfo(tarinfo: tarfile.TarInfo) -> tarfile.TarInfo: 20 - tarinfo.uname = tarinfo.gname = '' 21 - tarinfo.uid = tarinfo.gid = 0 22 - + tarinfo.mode |= 0o200 23 - return tarinfo 24 - 25 - def add_data_as_file(tf: tarfile.TarFile, arcname: str, data: Union[str, bytes]) -> tarfile.TarInfo: 26 - -- 27 - 2.36.0