summary refs log tree commit diff
path: root/pkgs/development/python-modules/httpx-auth/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/httpx-auth/default.nix')
-rw-r--r--pkgs/development/python-modules/httpx-auth/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/httpx-auth/default.nix b/pkgs/development/python-modules/httpx-auth/default.nix
new file mode 100644
index 0000000000000..5c099d91d436f
--- /dev/null
+++ b/pkgs/development/python-modules/httpx-auth/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, setuptools
+, setuptools-scm
+, wheel
+, httpx
+, pyjwt
+, pytest-httpx
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "httpx-auth";
+  version = "0.18.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.9";
+
+  src = fetchFromGitHub {
+    owner = "Colin-b";
+    repo = "httpx_auth";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-kK31jpS9Ax5kNkvUSbWWIC6CKdZKVJ28kLS0iuntWqg=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+    setuptools-scm
+    wheel
+  ];
+
+  propagatedBuildInputs = [
+    httpx
+  ];
+
+  nativeCheckInputs = [
+    pyjwt
+    pytest-httpx
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "httpx_auth" ];
+
+  __darwinAllowLocalNetworking = true;
+
+  meta = with lib; {
+    description = "Authentication classes to be used with httpx";
+    homepage = "https://github.com/Colin-b/httpx_auth";
+    changelog = "https://github.com/Colin-b/httpx_auth/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ natsukium ];
+  };
+}