Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / ir / iredis / package.nix
blobb0c37d11832461c0671573d5dcc0e496bdf7b8b0
1 { lib
2 , stdenv
3 , python3
4 , fetchFromGitHub
5 }:
7 python3.pkgs.buildPythonApplication rec {
8   pname = "iredis";
9   version = "1.15.0";
10   pyproject = true;
12   src = fetchFromGitHub {
13     owner = "laixintao";
14     repo = "iredis";
15     rev = "v${version}";
16     hash = "sha256-wfjr/FVmKgkP8FMKxw6e8U+lfZQZ2q52REC0mU8Xp7Q=";
17   };
19   postPatch = ''
20     substituteInPlace pyproject.toml \
21       --replace-fail 'packaging = "^23.0"' 'packaging = "*"' \
22       --replace-fail 'wcwidth = "0.1.9"' 'wcwidth = "*"'
23   '';
25   nativeBuildInputs = with python3.pkgs; [
26     poetry-core
27   ];
29   propagatedBuildInputs = with python3.pkgs; [
30     click
31     configobj
32     mistune
33     packaging
34     prompt-toolkit
35     pygments
36     python-dateutil
37     redis
38     wcwidth
39   ];
41   nativeCheckInputs = with python3.pkgs; [
42     freezegun
43     pexpect
44     pytestCheckHook
45   ];
47   pytestFlagsArray = [
48     # Fails on sandbox
49     "--ignore=tests/unittests/test_client.py"
50     "--deselect=tests/unittests/test_render_functions.py::test_render_unixtime_config_raw"
51     "--deselect=tests/unittests/test_render_functions.py::test_render_time"
52     # Only execute unittests, because cli tests require a running Redis
53     "tests/unittests/"
54   ] ++ lib.optionals stdenv.isDarwin [
55     # Flaky tests
56     "--deselect=tests/unittests/test_entry.py::test_command_shell_options_higher_priority"
57     "--deselect=tests/unittests/test_utils.py::test_timer"
58   ];
60   pythonImportsCheck = [ "iredis" ];
62   meta = with lib; {
63     description = "Terminal Client for Redis with AutoCompletion and Syntax Highlighting";
64     changelog = "https://github.com/laixintao/iredis/blob/${src.rev}/CHANGELOG.md";
65     homepage = "https://iredis.xbin.io/";
66     license = licenses.bsd3;
67     maintainers = with maintainers; [ ];
68     mainProgram = "iredis";
69   };