Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 ncurses, 7 poetry-core, 8 procps, 9 pytest-rerunfailures, 10 pytestCheckHook, 11 tmux, 12}: 13 14buildPythonPackage rec { 15 pname = "libtmux"; 16 version = "0.37.0"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "tmux-python"; 21 repo = "libtmux"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-I0E6zkfQ6mx2svCaXEgKPhrrog3iLgXZ4E3CMMxPkIA="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace-fail '"--doctest-docutils-modules",' "" 29 ''; 30 31 build-system = [ poetry-core ]; 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.isDarwin [ 51 # tests/test_pane.py:113: AssertionError 52 "test_capture_pane_start" 53 ]; 54 55 disabledTestPaths = lib.optionals stdenv.isDarwin [ 56 "tests/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}