about summary refs log tree commit diff
path: root/pkgs/applications/terminal-emulators/kitty/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/terminal-emulators/kitty/default.nix')
-rw-r--r--pkgs/applications/terminal-emulators/kitty/default.nix43
1 files changed, 26 insertions, 17 deletions
diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix
index e693e51c9360a..9b4a1be708f6b 100644
--- a/pkgs/applications/terminal-emulators/kitty/default.nix
+++ b/pkgs/applications/terminal-emulators/kitty/default.nix
@@ -29,16 +29,21 @@
 with python3Packages;
 buildPythonApplication rec {
   pname = "kitty";
-  version = "0.28.1";
+  version = "0.29.2";
   format = "other";
 
   src = fetchFromGitHub {
     owner = "kovidgoyal";
     repo = "kitty";
     rev = "refs/tags/v${version}";
-    hash = "sha256-pAo+bT10rdQOf9j3imKWCCMFGm8KntUeTQUrEE1wYZc=";
+    hash = "sha256-ureJHG6Jh4bsXqQZnGwY5Hlq7sXxYX3iTajb8ZkpZw8=";
   };
-  vendorHash = "sha256-vq19exqsEtXhN20mgC5GCpYGm8s9AC6nlfCfG1lUiI8=";
+
+  goModules = (buildGoModule {
+    pname = "kitty-go-modules";
+    inherit src version;
+    vendorHash = "sha256-jk2EcYVuhV/UQfHAIfpnn8ZIZnwjA/o8YRXmpoC85Vc=";
+  }).goModules;
 
   buildInputs = [
     harfbuzz
@@ -94,22 +99,22 @@ buildPythonApplication rec {
     ./disable-test_ssh_bootstrap_with_different_launchers.patch
   ];
 
-  # Causes build failure due to warning
-  hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
+  hardeningDisable = [
+    # causes redefinition of _FORTIFY_SOURCE
+    "fortify3"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    # Causes build failure due to warning
+    "strictoverflow"
+  ];
 
   CGO_ENABLED = 0;
   GOFLAGS = "-trimpath";
 
-  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 ${go-modules} vendor
+    cp -r --reflink=auto $goModules vendor
   '';
 
   buildPhase = let
@@ -156,6 +161,8 @@ buildPythonApplication rec {
       --replace test_path_mapping_receive dont_test_path_mapping_receive
     substituteInPlace kitty_tests/shell_integration.py \
       --replace test_fish_integration dont_test_fish_integration
+    substituteInPlace kitty_tests/shell_integration.py \
+      --replace test_bash_integration dont_test_bash_integration
     substituteInPlace kitty_tests/open_actions.py \
       --replace test_parsing_of_open_actions dont_test_parsing_of_open_actions
     substituteInPlace kitty_tests/ssh.py \
@@ -164,6 +171,8 @@ buildPythonApplication rec {
       --replace 'class Rendering(BaseTest)' 'class Rendering'
     # theme collection test starts an http server
     rm tools/themes/collection_test.go
+    # passwd_test tries to exec /usr/bin/dscl
+    rm tools/utils/passwd_test.go
   '';
 
   checkPhase = ''
@@ -181,8 +190,8 @@ buildPythonApplication rec {
 
   installPhase = ''
     runHook preInstall
-    mkdir -p $out
-    mkdir -p $kitten/bin
+    mkdir -p "$out"
+    mkdir -p "$kitten/bin"
     ${if stdenv.isDarwin then ''
     mkdir "$out/bin"
     ln -s ../Applications/kitty.app/Contents/MacOS/kitty "$out/bin/kitty"
@@ -193,8 +202,8 @@ buildPythonApplication rec {
 
     installManPage 'docs/_build/man/kitty.1'
     '' else ''
-    cp -r linux-package/{bin,share,lib} $out
-    cp linux-package/bin/kitten $kitten/bin/kitten
+    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 ]}"
 
@@ -211,7 +220,7 @@ buildPythonApplication rec {
     mkdir -p $terminfo/share
     mv "$terminfo_src" $terminfo/share/terminfo
 
-    mkdir -p $out/nix-support
+    mkdir -p "$out/nix-support"
     echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
 
     cp -r 'shell-integration' "$shell_integration"
@@ -220,8 +229,8 @@ buildPythonApplication rec {
   '';
 
   passthru = {
-    updateScript = nix-update-script {};
     tests.test = nixosTests.terminal-emulators.kitty;
+    updateScript = nix-update-script {};
   };
 
   meta = with lib; {