Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / libtmux / default.nix
blob1d26117e5ba11699da0a5fa38ab891d1ee672458
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , buildPythonPackage
5 , poetry-core
6 , pytest-rerunfailures
7 , pytestCheckHook
8 , procps
9 , tmux
10 , ncurses
13 buildPythonPackage rec {
14   pname = "libtmux";
15   version = "0.36.0";
16   pyproject = true;
18   src = fetchFromGitHub {
19     owner = "tmux-python";
20     repo = pname;
21     rev = "refs/tags/v${version}";
22     hash = "sha256-oJ2IGaPFMKA/amUEPZi1UO9vZtjPNQg3SIFjQWzUeSE=";
23   };
25   postPatch = ''
26     sed -i '/addopts/d' pyproject.toml
27   '';
29   nativeBuildInputs = [
30     poetry-core
31   ];
33   nativeCheckInputs = [
34     procps
35     tmux
36     ncurses
37     pytest-rerunfailures
38     pytestCheckHook
39   ];
41   pytestFlagsArray = [ "tests" ];
43   disabledTests = [
44     # Fail with: 'no server running on /tmp/tmux-1000/libtmux_test8sorutj1'.
45     "test_new_session_width_height"
46     # Assertion error
47     "test_capture_pane_start"
48   ] ++ lib.optionals stdenv.isDarwin [
49     # tests/test_pane.py:113: AssertionError
50     "test_capture_pane_start"
51   ];
53   disabledTestPaths = lib.optionals stdenv.isDarwin [
54     "tests/test_test.py"
55     "tests/legacy_api/test_test.py"
56   ];
58   pythonImportsCheck = [
59     "libtmux"
60   ];
62   meta = with lib; {
63     description = "Typed scripting library / ORM / API wrapper for tmux";
64     homepage = "https://libtmux.git-pull.com/";
65     changelog = "https://github.com/tmux-python/libtmux/raw/v${version}/CHANGES";
66     license = licenses.mit;
67     maintainers = with maintainers; [ otavio ];
68   };