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
|
2022-02-10 20:34:41 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "libtmux";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.18.1";
|
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-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-OhNyJcnxjbyP/Kpt70qLv3ZtZvXXVTWEMcjv/pa50/4=";
|
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
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
checkInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
procps
|
|
|
|
tmux
|
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-01-20 10:41:00 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests"
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"--ignore=tests/test_test.py"
|
|
|
|
];
|
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; [ ];
|
|
|
|
};
|
|
|
|
}
|