diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-10-05 00:44:16 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-10-05 00:44:16 +0200 |
commit | 253ca4957d2e59a4d44ea47705c42629b2e133dd (patch) | |
tree | 6c345b7d7c7f392a6bfad262235371c81631d76e /pkgs/applications/terminal-emulators | |
parent | 48177fb6ea88f89f0bac48aeb2f5bca826ae1dec (diff) | |
parent | af4fc0bf1cb83a126d16bece462ad8d186d6ce73 (diff) |
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/applications/terminal-emulators')
3 files changed, 66 insertions, 16 deletions
diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index 28dad82fe1626..b6a6ca7780fb6 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -4,6 +4,7 @@ , libxkbcommon, libXi, libXext, wayland-protocols, wayland , lcms2 , librsync +, openssl , installShellFiles , dbus , darwin @@ -27,14 +28,14 @@ with python3Packages; buildPythonApplication rec { pname = "kitty"; - version = "0.25.2"; + version = "0.26.2"; format = "other"; src = fetchFromGitHub { owner = "kovidgoyal"; repo = "kitty"; rev = "v${version}"; - sha256 = "sha256-o/vVz1lPfsgkzbYjYhIrScCAROmVdiPsNwjW/m5n7Us="; + sha256 = "sha256-IqXRkKzOfqWolH/534nmM2R/69olhFOk6wbbF4ifRd0="; }; buildInputs = [ @@ -42,6 +43,7 @@ buildPythonApplication rec { ncurses lcms2 librsync + openssl.dev ] ++ lib.optionals stdenv.isDarwin [ Cocoa CoreGraphics @@ -77,6 +79,9 @@ buildPythonApplication rec { outputs = [ "out" "terminfo" "shell_integration" ]; patches = [ + # Gets `test_ssh_env_vars` to pass when `bzip2` is in the output of `env`. + ./fix-test_ssh_env_vars.patch + # Needed on darwin # Gets `test_ssh_shell_integration` to pass for `zsh` when `compinit` complains about @@ -98,14 +103,18 @@ buildPythonApplication rec { --update-check-interval=0 \ --shell-integration=enabled\ no-rc ''; + darwinOptions = '' + --disable-link-time-optimization \ + ${commonOptions} + ''; in '' runHook preBuild ${if stdenv.isDarwin then '' - ${python.interpreter} setup.py kitty.app \ - --disable-link-time-optimization \ - ${commonOptions} - make man + ${python.interpreter} setup.py build ${darwinOptions} + make docs + ${python.interpreter} setup.py kitty.app ${darwinOptions} '' else '' + ${python.interpreter} setup.py build-launcher ${python.interpreter} setup.py linux-package \ --egl-library='${lib.getLib libGL}/lib/libEGL.so.1' \ --startup-notification-library='${libstartup_notification}/lib/libstartup-notification-1.so' \ @@ -126,7 +135,7 @@ buildPythonApplication rec { ]; # skip failing tests due to darwin sandbox - preCheck = if stdenv.isDarwin then '' + preCheck = lib.optionalString stdenv.isDarwin '' substituteInPlace kitty_tests/file_transmission.py \ --replace test_file_get dont_test_file_get \ --replace test_path_mapping_receive dont_test_path_mapping_receive @@ -138,15 +147,9 @@ buildPythonApplication rec { --replace test_ssh_connection_data dont_test_ssh_connection_data substituteInPlace kitty_tests/fonts.py \ --replace 'class Rendering(BaseTest)' 'class Rendering' - '' else ""; + ''; - checkPhase = - let buildBinPath = - if stdenv.isDarwin - then "kitty.app/Contents/MacOS" - else "linux-package/bin"; - in - '' + checkPhase = '' runHook preCheck # Fontconfig error: Cannot load default config file: No such file: (null) @@ -155,7 +158,8 @@ buildPythonApplication rec { # Required for `test_ssh_shell_integration` to pass. export TERM=kitty - env PATH="${buildBinPath}:$PATH" ${python.interpreter} test.py + make test + runHook postCheck ''; installPhase = '' diff --git a/pkgs/applications/terminal-emulators/kitty/fix-test_ssh_env_vars.patch b/pkgs/applications/terminal-emulators/kitty/fix-test_ssh_env_vars.patch new file mode 100644 index 0000000000000..719b38b48159d --- /dev/null +++ b/pkgs/applications/terminal-emulators/kitty/fix-test_ssh_env_vars.patch @@ -0,0 +1,13 @@ +diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py +index 7b3bdbeb..710aeceb 100644 +--- a/kitty_tests/ssh.py ++++ b/kitty_tests/ssh.py +@@ -272,8 +272,6 @@ def check_bootstrap(self, sh, home_dir, login_shell='', SHELL_INTEGRATION_VALUE= + + def check_untar_or_fail(): + q = pty.screen_contents() +- if 'bzip2' in q: +- raise ValueError('Untarring failed with screen contents:\n' + q) + return 'UNTAR_DONE' in q + pty.wait_till(check_untar_or_fail) + self.assertTrue(os.path.exists(os.path.join(home_dir, '.terminfo/kitty.terminfo'))) diff --git a/pkgs/applications/terminal-emulators/tym/default.nix b/pkgs/applications/terminal-emulators/tym/default.nix new file mode 100644 index 0000000000000..b85133e7aecb1 --- /dev/null +++ b/pkgs/applications/terminal-emulators/tym/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, gtk3, vte, lua5_3, pcre2 }: + +stdenv.mkDerivation rec { + pname = "tym"; + version = "3.3.0"; + + src = fetchFromGitHub { + owner = "endaaman"; + repo = "${pname}"; + rev = "${version}"; + sha256 = "sha256-ufIYJgbHmSJJbnx4hyDx0DmIjaGCxKXtiekcXcyka14="; + }; + + nativeBuildInputs = [ + pkg-config + autoreconfHook + ]; + + buildInputs = [ + gtk3 + vte + lua5_3 + pcre2 + ]; + + meta = with lib; { + description = "Lua-configurable terminal emulator"; + homepage = "https://github.com/endaaman/tym"; + license = licenses.mit; + maintainers = [ maintainers.wesleyjrz ]; + platforms = platforms.linux; + }; +} |