Files
Otavio Salvador 3d5072d457 python3Packages.libtmux: 0.61.0 -> 0.62.0
Changelog: https://github.com/tmux-python/libtmux/blob/v0.62.0/CHANGES

Backport the tmux 3.8 fixes from upstream PR #758 so the full test suite passes with tmux 3.8:

- decode the new hooks tmux 3.8 reports from show-hooks, which otherwise break Hooks
- run the display-popup tests through a terminal client, as control-mode clients no longer
  execute popup commands
- account for tmux 3.8 counting borders in floating pane geometry

Upstream PR: https://github.com/tmux-python/libtmux/pull/758

Assisted-by: Claude Code (Claude Opus 5.5)
2026-10-11 21:27:44 -03:00

80 lines
2.0 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
hatchling,
ncurses,
procps,
pytest-rerunfailures,
pytest-xdist,
pytestCheckHook,
tmux,
}:
buildPythonPackage (finalAttrs: {
pname = "libtmux";
version = "0.62.0";
pyproject = true;
src = fetchFromGitHub {
owner = "tmux-python";
repo = "libtmux";
tag = "v${finalAttrs.version}";
hash = "sha256-JeYQjmyLTLUbDwO6zm2UQfftAubsgrQ9qXrRyaBAsyQ=";
};
patches = [
./0001-fix-test_control_mode_stdout_preserves_non_ascii_out.patch
./0002-Hooks-fix-Decode-tmux-3.8-events.patch
./0003-Popup-test-Attach-a-terminal-client.patch
./0004-Docs-fix-Explain-floating-pane-borders.patch
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"--doctest-docutils-modules",' ""
'';
build-system = [ hatchling ];
nativeCheckInputs = [
ncurses
procps
pytestCheckHook
pytest-rerunfailures
pytest-xdist
tmux
];
enabledTestPaths = [ "tests" ];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test/test_retry.py" ];
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
# basename for sleep is coreutils, not sleep
"test_break_pane_no_name_uses_natural_name"
# Fail with: 'no server running on /tmp/tmux-1000/libtmux_test8sorutj1'.
"test_new_session_width_height"
# AssertionError: assert '' == '$'
"test_capture_pane"
# AssertionError: assert '' == '$'
"test_capture_pane_start"
# AssertionError: assert '' == '$'
"test_capture_pane_end"
# IndexError: list index out of range
"test_new_window_with_environment"
];
pythonImportsCheck = [ "libtmux" ];
__darwinAllowLocalNetworking = true;
meta = {
description = "Typed scripting library / ORM / API wrapper for tmux";
homepage = "https://libtmux.git-pull.com/";
changelog = "https://github.com/tmux-python/libtmux/raw/${finalAttrs.src.tag}/CHANGES";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ otavio ];
};
})