at 24.11-pre 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 buildPythonPackage, 6 poetry-core, 7 pytest-rerunfailures, 8 pytestCheckHook, 9 procps, 10 tmux, 11 ncurses, 12}: 13 14buildPythonPackage rec { 15 pname = "libtmux"; 16 version = "0.36.0"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "tmux-python"; 21 repo = pname; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-oJ2IGaPFMKA/amUEPZi1UO9vZtjPNQg3SIFjQWzUeSE="; 24 }; 25 26 postPatch = '' 27 sed -i '/addopts/d' pyproject.toml 28 ''; 29 30 nativeBuildInputs = [ poetry-core ]; 31 32 nativeCheckInputs = [ 33 procps 34 tmux 35 ncurses 36 pytest-rerunfailures 37 pytestCheckHook 38 ]; 39 40 pytestFlagsArray = [ "tests" ]; 41 42 disabledTests = 43 [ 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 ] 49 ++ lib.optionals stdenv.isDarwin [ 50 # tests/test_pane.py:113: AssertionError 51 "test_capture_pane_start" 52 ]; 53 54 disabledTestPaths = lib.optionals stdenv.isDarwin [ 55 "tests/test_test.py" 56 "tests/legacy_api/test_test.py" 57 ]; 58 59 pythonImportsCheck = [ "libtmux" ]; 60 61 meta = with lib; { 62 description = "Typed scripting library / ORM / API wrapper for tmux"; 63 homepage = "https://libtmux.git-pull.com/"; 64 changelog = "https://github.com/tmux-python/libtmux/raw/v${version}/CHANGES"; 65 license = licenses.mit; 66 maintainers = with maintainers; [ otavio ]; 67 }; 68}