about summary refs log tree commit diff
path: root/pkgs/applications/terminal-emulators/kitty
diff options
context:
space:
mode:
authorBrian Leung <leungbk@posteo.net>2022-05-28 22:28:03 -0700
committerBrian Leung <leungbk@posteo.net>2022-05-31 20:09:56 -0700
commitb22c2113df12d785e784a131baf944d4f9cf4784 (patch)
treed6d0098b53bae42ba2779bdddc57d749608a6226 /pkgs/applications/terminal-emulators/kitty
parent18a07645e5428709a48e617fd52dc8aedcc85e4e (diff)
kitty: 0.25.0 -> 0.25.1
Diffstat (limited to 'pkgs/applications/terminal-emulators/kitty')
-rw-r--r--pkgs/applications/terminal-emulators/kitty/default.nix43
-rw-r--r--pkgs/applications/terminal-emulators/kitty/disable-test_ssh_login_shell_detection.patch13
-rw-r--r--pkgs/applications/terminal-emulators/kitty/tarball-restore-write-permissions.patch27
3 files changed, 31 insertions, 52 deletions
diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix
index 8186f8810e56f..58db9273b83cf 100644
--- a/pkgs/applications/terminal-emulators/kitty/default.nix
+++ b/pkgs/applications/terminal-emulators/kitty/default.nix
@@ -28,14 +28,14 @@
 with python3Packages;
 buildPythonApplication rec {
   pname = "kitty";
-  version = "0.25.0";
+  version = "0.25.1";
   format = "other";
 
   src = fetchFromGitHub {
     owner = "kovidgoyal";
     repo = "kitty";
     rev = "v${version}";
-    sha256 = "sha256-RYQVcbyKIv/FlrtROoQywWR+iF+4KYiYrrzErUrOCWM=";
+    sha256 = "sha256-wL631cbA6ffXZomi6iDHk7XerRlpIL6T2qlEiQvFSJY=";
   };
 
   buildInputs = [
@@ -78,23 +78,42 @@ buildPythonApplication rec {
   outputs = [ "out" "terminfo" "shell_integration" ];
 
   patches = [
-    # Required to get `test_ssh_env_vars` to pass.
+    # Fix to ensure that files in tar files used by SSH kitten have write permissions.
     (fetchpatch {
-      name = "increase-pty-lines.patch";
-      url = "https://github.com/kovidgoyal/kitty/commit/eb84990f5a8edc458e04d24cc1cda05316d74ceb.patch";
-      sha256 = "sha256-eOANfhGPMoN4FqxtIGDBu5X0O3RPLABDnL+LKqSLROI=";
+      name = "fix-tarball-file-permissions.patch";
+      url = "https://github.com/kovidgoyal/kitty/commit/8540ca399053e8d42df27283bb5dd4af562ed29b.patch";
+      sha256 = "sha256-y5w+ritkR+ZEfNSRDQW9r3BU2qt98UNK7vdEX/X+mKU=";
+    })
+
+    # Remove upon next release. Needed because of a missing #define.
+    (fetchpatch {
+      name = "fontconfig-1.patch";
+      url = "https://github.com/kovidgoyal/kitty/commit/bec620a8d30c36453e471b140b07483c7f875bf4.patch";
+      sha256 = "sha256-r1OTcXdO+RUAXmmIqI07m+z0zXq8DXCzgBRXPpnkGGM=";
+    })
+    (fetchpatch {
+      name = "fontconfig-2.patch";
+      url = "https://github.com/kovidgoyal/kitty/commit/1283a2b7e552d30cabce9345e5c13e5f9079183d.patch";
+      sha256 = "sha256-UM/OsumnfVHuHTahpRwyWZOeu6L8WOwbBf3lcjwdTj8=";
+    })
+    (fetchpatch {
+      name = "fontconfig-3.patch";
+      url = "https://github.com/kovidgoyal/kitty/commit/5c4abe749b1f50ae556a711d24ac7f3e384fac4e.patch";
+      sha256 = "sha256-amvyv5cZxHGPg7dZv649WjH4MNloFbmz5D4rhjKNzYA=";
     })
-    # Fix to ensure that files in tar files used by SSH kitten have write permissions.
-    ./tarball-restore-write-permissions.patch
 
     # Needed on darwin
 
     # Gets `test_ssh_shell_integration` to pass for `zsh` when `compinit` complains about
     # permissions.
     ./zsh-compinit.patch
-    # Skip `test_ssh_login_shell_detection` in some cases, build users have their shell set to
-    # `/sbin/nologin` which causes issues.
-    ./disable-test_ssh_login_shell_detection.patch
+
+    # Skip login shell detection when login shell is set to nologin
+    (fetchpatch {
+      name = "skip-login-shell-detection-for-nologin.patch";
+      url = "https://github.com/kovidgoyal/kitty/commit/27906ea853ce7862bcb83e324ef80f6337b5d846.patch";
+      sha256 = "sha256-Zg6uWkiWvb45i4xcp9k6jy0R2IQMT4PXr7BenzZ/md8=";
+    })
     # Skip `test_ssh_bootstrap_with_different_launchers` when launcher is `zsh` since it causes:
     # OSError: master_fd is in error condition
     ./disable-test_ssh_bootstrap_with_different_launchers.patch
@@ -122,6 +141,7 @@ buildPythonApplication rec {
       --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' \
+      --fontconfig-library='${fontconfig.lib}/lib/libfontconfig.so' \
       ${commonOptions}
     ''}
     runHook postBuild
@@ -203,7 +223,6 @@ buildPythonApplication rec {
   passthru.tests.test = nixosTests.terminal-emulators.kitty;
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     homepage = "https://github.com/kovidgoyal/kitty";
     description = "A modern, hackable, featureful, OpenGL based terminal emulator";
     license = licenses.gpl3Only;
diff --git a/pkgs/applications/terminal-emulators/kitty/disable-test_ssh_login_shell_detection.patch b/pkgs/applications/terminal-emulators/kitty/disable-test_ssh_login_shell_detection.patch
deleted file mode 100644
index c6301f0de72fe..0000000000000
--- a/pkgs/applications/terminal-emulators/kitty/disable-test_ssh_login_shell_detection.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py
-index 1f424146..57620334 100644
---- a/kitty_tests/ssh.py
-+++ b/kitty_tests/ssh.py
-@@ -197,7 +197,7 @@ def test_ssh_login_shell_detection(self):
-         expected_login_shell = pwd.getpwuid(os.geteuid()).pw_shell
-         for m in methods:
-             for sh in self.all_possible_sh:
--                if 'python' in sh:
-+                if 'python' in sh or '/sbin/nologin' in expected_login_shell:
-                     continue
-                 with self.subTest(sh=sh, method=m), tempfile.TemporaryDirectory() as tdir:
-                     pty = self.check_bootstrap(sh, tdir, test_script=f'{m}; echo "$login_shell"; exit 0', SHELL_INTEGRATION_VALUE='')
diff --git a/pkgs/applications/terminal-emulators/kitty/tarball-restore-write-permissions.patch b/pkgs/applications/terminal-emulators/kitty/tarball-restore-write-permissions.patch
deleted file mode 100644
index 59253bbc4d334..0000000000000
--- a/pkgs/applications/terminal-emulators/kitty/tarball-restore-write-permissions.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 59f6876187da2c01b35e696e169ca98239c08a41 Mon Sep 17 00:00:00 2001
-From: Jason Felice <jason.m.felice@gmail.com>
-Date: Tue, 24 May 2022 07:54:25 -0400
-Subject: [PATCH] Restore write permissions in tarball
-
-In Nix, the source files are stored in an immutable store and
-therefore have been stripped of write permissions.  When the SSH
-kitten makes the tarfile, the files contained in it are also missing
-the write permissions, causing commands on the remote side to fail.
----
- kittens/ssh/main.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py
-index 0b50d5ff..f80ac13d 100644
---- a/kittens/ssh/main.py
-+++ b/kittens/ssh/main.py
-@@ -123,6 +123,7 @@ def make_tarfile(ssh_opts: SSHOptions, base_env: Dict[str, str], compression: st
-     def normalize_tarinfo(tarinfo: tarfile.TarInfo) -> tarfile.TarInfo:
-         tarinfo.uname = tarinfo.gname = ''
-         tarinfo.uid = tarinfo.gid = 0
-+        tarinfo.mode |= 0o200
-         return tarinfo
-
-     def add_data_as_file(tf: tarfile.TarFile, arcname: str, data: Union[str, bytes]) -> tarfile.TarInfo:
---
-2.36.0