at 25.11-pre 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hatchling, 7 ncurses, 8 procps, 9 pytest-rerunfailures, 10 pytestCheckHook, 11 tmux, 12}: 13 14buildPythonPackage rec { 15 pname = "libtmux"; 16 version = "0.46.1"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "tmux-python"; 21 repo = "libtmux"; 22 tag = "v${version}"; 23 hash = "sha256-x+zEfHFTAF0m6j/WFmelcBVOzh7oJE02BdB3bz/EcNM="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace-fail '"--doctest-docutils-modules",' "" 29 ''; 30 31 build-system = [ hatchling ]; 32 33 nativeCheckInputs = [ 34 procps 35 tmux 36 ncurses 37 pytest-rerunfailures 38 pytestCheckHook 39 ]; 40 41 pytestFlagsArray = [ "tests" ]; 42 43 disabledTests = 44 [ 45 # Fail with: 'no server running on /tmp/tmux-1000/libtmux_test8sorutj1'. 46 "test_new_session_width_height" 47 # Assertion error 48 "test_capture_pane_start" 49 ] 50 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 51 # tests/test_pane.py:113: AssertionError 52 "test_capture_pane_start" 53 # assert (1740973920.500444 - 1740973919.015309) <= 1.1 54 "test_retry_three_times" 55 "test_function_times_out_no_raise" 56 # assert False 57 "test_retry_three_times_no_raise_assert" 58 ]; 59 60 disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test/test_retry.py" ]; 61 62 pythonImportsCheck = [ "libtmux" ]; 63 64 meta = { 65 description = "Typed scripting library / ORM / API wrapper for tmux"; 66 homepage = "https://libtmux.git-pull.com/"; 67 changelog = "https://github.com/tmux-python/libtmux/raw/v${version}/CHANGES"; 68 license = lib.licenses.mit; 69 maintainers = with lib.maintainers; [ otavio ]; 70 }; 71}