2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
2024-06-20 14:57:18 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
ncurses,
|
2024-06-05 15:53:02 +00:00
|
|
|
poetry-core,
|
2024-06-20 14:57:18 +00:00
|
|
|
procps,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-rerunfailures,
|
|
|
|
pytestCheckHook,
|
|
|
|
tmux,
|
2022-02-10 20:34:41 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "libtmux";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.37.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tmux-python";
|
2024-06-20 14:57:18 +00:00
|
|
|
repo = "libtmux";
|
2022-08-21 13:32:41 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-I0E6zkfQ6mx2svCaXEgKPhrrog3iLgXZ4E3CMMxPkIA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
postPatch = ''
|
2024-06-20 14:57:18 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail '"--doctest-docutils-modules",' ""
|
2023-01-20 10:41:00 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [ poetry-core ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
procps
|
|
|
|
tmux
|
2023-02-09 11:40:11 +00:00
|
|
|
ncurses
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-rerunfailures
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
pytestFlagsArray = [ "tests" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Fail with: 'no server running on /tmp/tmux-1000/libtmux_test8sorutj1'.
|
|
|
|
"test_new_session_width_height"
|
|
|
|
# Assertion error
|
|
|
|
"test_capture_pane_start"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# tests/test_pane.py:113: AssertionError
|
|
|
|
"test_capture_pane_start"
|
|
|
|
];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
2023-03-24 00:07:29 +00:00
|
|
|
"tests/test_test.py"
|
2023-01-20 10:41:00 +00:00
|
|
|
];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "libtmux" ];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-08-21 13:32:41 +00:00
|
|
|
description = "Typed scripting library / ORM / API wrapper for tmux";
|
|
|
|
homepage = "https://libtmux.git-pull.com/";
|
|
|
|
changelog = "https://github.com/tmux-python/libtmux/raw/v${version}/CHANGES";
|
|
|
|
license = licenses.mit;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ otavio ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|