From 3a150b7562fa255164cc1bc0344bb664a1b4485d Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Mon, 16 Jan 2023 11:23:07 -0800 Subject: [PATCH 1/2] kitty: unbreak on `x86_64-darwin` --- .../terminal-emulators/kitty/default.nix | 13 ++++--------- pkgs/top-level/all-packages.nix | 8 +++++++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index e1a3f00255eb..69e6e270654a 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -7,14 +7,11 @@ , openssl , installShellFiles , dbus +, Libsystem , Cocoa -, CoreGraphics -, Foundation -, IOKit , Kernel , UniformTypeIdentifiers , UserNotifications -, OpenGL , libcanberra , libicns , libpng @@ -47,16 +44,14 @@ buildPythonApplication rec { openssl.dev ] ++ lib.optionals stdenv.isDarwin [ Cocoa - CoreGraphics - Foundation - IOKit Kernel - OpenGL UniformTypeIdentifiers UserNotifications libpng python3 zlib + ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ + Libsystem ] ++ lib.optionals stdenv.isLinux [ fontconfig libunistring libcanberra libX11 libXrandr libXinerama libXcursor libxkbcommon libXi libXext @@ -110,6 +105,7 @@ buildPythonApplication rec { ''; in '' runHook preBuild + ${ lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) "export MACOSX_DEPLOYMENT_TARGET=11" } ${if stdenv.isDarwin then '' ${python.interpreter} setup.py build ${darwinOptions} make docs @@ -219,7 +215,6 @@ buildPythonApplication rec { license = licenses.gpl3Only; changelog = "https://sw.kovidgoyal.net/kitty/changelog/"; platforms = platforms.darwin ++ platforms.linux; - broken = (stdenv.isDarwin && stdenv.isx86_64); maintainers = with maintainers; [ tex rvolosatovs Luflosi adamcstephens ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71618a9504e1..961d5cb537cb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2366,7 +2366,13 @@ with pkgs; kitty = darwin.apple_sdk_11_0.callPackage ../applications/terminal-emulators/kitty { harfbuzz = harfbuzz.override { withCoreText = stdenv.isDarwin; }; - inherit (darwin.apple_sdk_11_0.frameworks) Cocoa CoreGraphics Foundation IOKit Kernel UniformTypeIdentifiers OpenGL UserNotifications; + inherit (darwin.apple_sdk_11_0) Libsystem; + inherit (darwin.apple_sdk_11_0.frameworks) + Cocoa + Kernel + UniformTypeIdentifiers + UserNotifications + ; }; kitty-themes = callPackage ../misc/kitty-themes {}; From 3b1880dd14ec2190df87888aad1ea19eb42fde09 Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Mon, 16 Jan 2023 15:53:16 -0800 Subject: [PATCH 2/2] kitty: Fix clone-in-kitty not working on bash >= 5.2 --- pkgs/applications/terminal-emulators/kitty/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index 69e6e270654a..0901b2609dbb 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, python3Packages, libunistring +{ lib, stdenv, fetchFromGitHub, fetchpatch, python3Packages, libunistring , harfbuzz, fontconfig, pkg-config, ncurses, imagemagick , libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor , libxkbcommon, libXi, libXext, wayland-protocols, wayland @@ -75,6 +75,13 @@ buildPythonApplication rec { outputs = [ "out" "terminfo" "shell_integration" ]; patches = [ + # Fix clone-in-kitty not working on bash >= 5.2 + # TODO: Removed on kitty release > 0.26.5 + (fetchpatch { + url = "https://github.com/kovidgoyal/kitty/commit/51bba9110e9920afbefeb981e43d0c1728051b5e.patch"; + sha256 = "sha256-1aSU4aU6j1/om0LsceGfhH1Hdzp+pPaNeWAi7U6VcP4="; + }) + # Gets `test_ssh_env_vars` to pass when `bzip2` is in the output of `env`. ./fix-test_ssh_env_vars.patch