about summary refs log tree commit diff
path: root/pkgs/applications/terminal-emulators/kitty
diff options
context:
space:
mode:
authorAdam Stephens <adam@valkor.net>2023-04-19 15:37:38 -0400
committerAdam Stephens <adam@valkor.net>2023-04-21 08:13:17 -0400
commiteebc4d88645bf2311500c756105ac0002a1966d3 (patch)
tree01d81f0be81acf58de110b3e5885cacd7f6bdb20 /pkgs/applications/terminal-emulators/kitty
parentde02df957bad546f8e9a7774fe91af1d425fe3d9 (diff)
kitty: 0.27.1 -> 0.28.1
Diffstat (limited to 'pkgs/applications/terminal-emulators/kitty')
-rw-r--r--pkgs/applications/terminal-emulators/kitty/default.nix40
1 files changed, 17 insertions, 23 deletions
diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix
index 07980f8375aa9..e693e51c9360a 100644
--- a/pkgs/applications/terminal-emulators/kitty/default.nix
+++ b/pkgs/applications/terminal-emulators/kitty/default.nix
@@ -23,21 +23,22 @@
 , nixosTests
 , go
 , buildGoModule
+, nix-update-script
 }:
 
 with python3Packages;
 buildPythonApplication rec {
   pname = "kitty";
-  version = "0.27.1";
+  version = "0.28.1";
   format = "other";
 
   src = fetchFromGitHub {
     owner = "kovidgoyal";
     repo = "kitty";
     rev = "refs/tags/v${version}";
-    hash = "sha256-/K/5T15kULTQP1FCLnyrKfhlQjIStayutaxLjmHjHes=";
+    hash = "sha256-pAo+bT10rdQOf9j3imKWCCMFGm8KntUeTQUrEE1wYZc=";
   };
-  vendorHash = "sha256-JLPPNOsoq+ErLhELsX3z3YehYfgp7OGXEXlP3IVcM5k=";
+  vendorHash = "sha256-vq19exqsEtXhN20mgC5GCpYGm8s9AC6nlfCfG1lUiI8=";
 
   buildInputs = [
     harfbuzz
@@ -99,16 +100,16 @@ buildPythonApplication rec {
   CGO_ENABLED = 0;
   GOFLAGS = "-trimpath";
 
-  configurePhase = let
-    goModules = (buildGoModule {
-      pname = "kitty-go-modules";
-      inherit src vendorHash version;
-    }).go-modules;
-  in ''
+  go-modules = (buildGoModule {
+    pname = "kitty-go-modules";
+    inherit src vendorHash version;
+  }).go-modules;
+
+  configurePhase = ''
     export GOCACHE=$TMPDIR/go-cache
     export GOPATH="$TMPDIR/go"
     export GOPROXY=off
-    cp -r --reflink=auto ${goModules} vendor
+    cp -r --reflink=auto ${go-modules} vendor
   '';
 
   buildPhase = let
@@ -161,6 +162,8 @@ buildPythonApplication rec {
       --replace test_ssh_connection_data dont_test_ssh_connection_data
     substituteInPlace kitty_tests/fonts.py \
       --replace 'class Rendering(BaseTest)' 'class Rendering'
+    # theme collection test starts an http server
+    rm tools/themes/collection_test.go
   '';
 
   checkPhase = ''
@@ -216,19 +219,10 @@ buildPythonApplication rec {
     runHook postInstall
   '';
 
-  # Patch shebangs that Nix can't automatically patch
-  preFixup =
-    let
-      pathComponent = if stdenv.isDarwin then "Applications/kitty.app/Contents/Resources" else "lib";
-    in
-    ''
-      substituteInPlace $out/${pathComponent}/kitty/shell-integration/ssh/askpass.py \
-        --replace '/usr/bin/env -S ' $out/bin/
-      substituteInPlace $shell_integration/ssh/askpass.py \
-        --replace '/usr/bin/env -S ' $out/bin/
-    '';
-
-  passthru.tests.test = nixosTests.terminal-emulators.kitty;
+  passthru = {
+    updateScript = nix-update-script {};
+    tests.test = nixosTests.terminal-emulators.kitty;
+  };
 
   meta = with lib; {
     homepage = "https://github.com/kovidgoyal/kitty";