summary refs log tree commit diff
path: root/pkgs/development/python-modules/jwt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/jwt/default.nix')
-rw-r--r--pkgs/development/python-modules/jwt/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/jwt/default.nix b/pkgs/development/python-modules/jwt/default.nix
new file mode 100644
index 00000000000..7e21b4f45a2
--- /dev/null
+++ b/pkgs/development/python-modules/jwt/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, cryptography
+, freezegun
+, pytestCheckHook
+, pytest-cov
+}:
+
+buildPythonPackage rec {
+  pname = "jwt";
+  version = "1.3.1";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    inherit version;
+    owner = "GehirnInc";
+    repo = "python-jwt";
+    rev = "v${version}";
+    hash = "sha256-N1J8yBVX/O+92cRp+q2gA2cFsd+C7JjUR9jo0VGoINg=";
+  };
+
+  postPatch = ''
+    # pytest-flake8 is incompatible flake8 6.0.0 and currently unmaintained
+    substituteInPlace setup.cfg --replace "--flake8" ""
+  '';
+
+  propagatedBuildInputs = [
+    cryptography
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    freezegun
+    pytest-cov
+  ];
+
+  pythonImportsCheck = [ "jwt" ];
+
+  meta = with lib; {
+    description = "JSON Web Token library for Python 3";
+    homepage = "https://github.com/GehirnInc/python-jwt";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ thornycrackers ];
+  };
+}