2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
2022-08-21 13:32:41 +00:00
|
|
|
, stdenv
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, poetry-core
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytest-rerunfailures
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytestCheckHook
|
2022-04-27 09:35:20 +00:00
|
|
|
, procps
|
|
|
|
, tmux
|
2023-02-09 11:40:11 +00:00
|
|
|
, ncurses
|
2022-02-10 20:34:41 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "libtmux";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.21.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tmux-python";
|
|
|
|
repo = pname;
|
2022-08-21 13:32:41 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-nZPVS3jNz2e2LTlWiSz1fN7MzqJs/CqtAt6UVZaPPTY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/addopts/d' setup.cfg
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
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" ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Fail with: 'no server running on /tmp/tmux-1000/libtmux_test8sorutj1'.
|
|
|
|
"test_new_session_width_height"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
|
|
|
"test_test.py"
|
2023-01-20 10:41:00 +00:00
|
|
|
];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "libtmux" ];
|
|
|
|
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|