summary refs log tree commit diff
path: root/pkgs/tools/admin/iredis
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2022-07-14 00:04:20 +0000
committerMario Rodas <marsam@users.noreply.github.com>2022-07-14 00:04:20 +0000
commit247ffc0eba22aadbe60971ff20fa6b1ce634c645 (patch)
treeab84cb35bdff332ea975933a04ac454f34388108 /pkgs/tools/admin/iredis
parent1bfb66edf8286badf61ddd742f93edc22b3315d3 (diff)
downloadnixpkgs-247ffc0eba22aadbe60971ff20fa6b1ce634c645.tar
nixpkgs-247ffc0eba22aadbe60971ff20fa6b1ce634c645.tar.gz
nixpkgs-247ffc0eba22aadbe60971ff20fa6b1ce634c645.tar.bz2
nixpkgs-247ffc0eba22aadbe60971ff20fa6b1ce634c645.tar.lz
nixpkgs-247ffc0eba22aadbe60971ff20fa6b1ce634c645.tar.xz
nixpkgs-247ffc0eba22aadbe60971ff20fa6b1ce634c645.tar.zst
nixpkgs-247ffc0eba22aadbe60971ff20fa6b1ce634c645.zip
iredis: init at 1.12.0
Diffstat (limited to 'pkgs/tools/admin/iredis')
-rw-r--r--pkgs/tools/admin/iredis/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/tools/admin/iredis/default.nix b/pkgs/tools/admin/iredis/default.nix
new file mode 100644
index 00000000000..ecaef00a771
--- /dev/null
+++ b/pkgs/tools/admin/iredis/default.nix
@@ -0,0 +1,58 @@
+{ lib, python3Packages }:
+
+with python3Packages;
+
+buildPythonApplication rec {
+  pname = "iredis";
+  version = "1.12.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "c3031094db0aa03d48b6f9be750e32d3e901942a96cc05283029086cb871cd81";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "click>=7.0,<8.0" "click" \
+      --replace "wcwidth==0.1.9" "wcwidth" \
+      --replace "redis>=3.4.0,<4.0.0" "redis" \
+      --replace "mistune>=2.0,<3.0" "mistune"
+  '';
+
+  propagatedBuildInputs = [
+    pygments
+    click
+    configobj
+    importlib-resources
+    mistune_2_0
+    packaging
+    pendulum
+    prompt-toolkit
+    redis
+    wcwidth
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    pexpect
+  ];
+
+  pytestFlagsArray = [
+    # Fails on sandbox
+    "--ignore=tests/unittests/test_client.py"
+    "--deselect=tests/unittests/test_render_functions.py::test_render_unixtime_config_raw"
+    "--deselect=tests/unittests/test_render_functions.py::test_render_time"
+    # Only execute unittests, because cli tests require a running Redis
+    "tests/unittests/"
+  ];
+
+  pythonImportsCheck = [ "iredis" ];
+
+  meta = with lib; {
+    description = "A Terminal Client for Redis with AutoCompletion and Syntax Highlighting";
+    changelog = "https://github.com/laixintao/iredis/raw/v${version}/CHANGELOG.md";
+    homepage = "https://iredis.io/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ marsam ];
+  };
+}