Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 75 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 python3, 5 fetchFromGitHub, 6}: 7 8python3.pkgs.buildPythonApplication rec { 9 pname = "iredis"; 10 version = "1.15.1"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "laixintao"; 15 repo = "iredis"; 16 tag = "v${version}"; 17 hash = "sha256-ZA4q2Z3X9zhzW/TH8aRliVij8UxqDVUamhKcfVxWb/c="; 18 }; 19 20 postPatch = '' 21 substituteInPlace pyproject.toml \ 22 --replace-fail 'packaging = "^23.0"' 'packaging = "*"' \ 23 --replace-fail 'wcwidth = "0.1.9"' 'wcwidth = "*"' 24 ''; 25 26 nativeBuildInputs = with python3.pkgs; [ 27 poetry-core 28 ]; 29 30 propagatedBuildInputs = with python3.pkgs; [ 31 click 32 configobj 33 mistune 34 packaging 35 prompt-toolkit 36 pygments 37 python-dateutil 38 redis 39 wcwidth 40 ]; 41 42 nativeCheckInputs = with python3.pkgs; [ 43 freezegun 44 pexpect 45 pytestCheckHook 46 ]; 47 48 enabledTestPaths = [ 49 # Only execute unittests, because cli tests require a running Redis 50 "tests/unittests/" 51 ]; 52 53 disabledTestPaths = [ 54 # Fails on sandbox 55 "tests/unittests/test_client.py" 56 "tests/unittests/test_render_functions.py::test_render_unixtime_config_raw" 57 "tests/unittests/test_render_functions.py::test_render_time" 58 ] 59 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 60 # Flaky tests 61 "tests/unittests/test_entry.py::test_command_shell_options_higher_priority" 62 "tests/unittests/test_utils.py::test_timer" 63 ]; 64 65 pythonImportsCheck = [ "iredis" ]; 66 67 meta = with lib; { 68 description = "Terminal Client for Redis with AutoCompletion and Syntax Highlighting"; 69 changelog = "https://github.com/laixintao/iredis/blob/${src.tag}/CHANGELOG.md"; 70 homepage = "https://iredis.xbin.io/"; 71 license = licenses.bsd3; 72 maintainers = [ ]; 73 mainProgram = "iredis"; 74 }; 75}