summary refs log tree commit diff
path: root/pkgs/development/python-modules/warrant-lite/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/warrant-lite/default.nix')
-rw-r--r--pkgs/development/python-modules/warrant-lite/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/warrant-lite/default.nix b/pkgs/development/python-modules/warrant-lite/default.nix
new file mode 100644
index 00000000000..4d5d77c2e84
--- /dev/null
+++ b/pkgs/development/python-modules/warrant-lite/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, boto3
+, envs
+, python-jose
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "warrant-lite";
+  version = "1.0.4";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-FunWoslZn3o0WHet2+LtggO3bbbe2ULMXW93q07GxJ4=";
+  };
+
+  propagatedBuildInputs = [
+    boto3
+    envs
+    python-jose
+    requests
+  ];
+
+  postPatch = ''
+    # requirements.txt is not part of the source
+    substituteInPlace setup.py \
+      --replace "parse_requirements('requirements.txt')," "[],"
+  '';
+
+  # Tests require credentials
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "warrant_lite"
+  ];
+
+  meta = with lib; {
+    description = "Module for process SRP requests for AWS Cognito";
+    homepage = "https://github.com/capless/warrant-lite";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}