From b64034e1d252a737dcb19d16d5e74f716e52a5d0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 11 Nov 2019 16:55:15 +0100 Subject: [PATCH] python3.pkgs.authlib: init at 0.13 Co-authored-by: Jonathan Ringer --- .../python-modules/authlib/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/authlib/default.nix diff --git a/pkgs/development/python-modules/authlib/default.nix b/pkgs/development/python-modules/authlib/default.nix new file mode 100644 index 000000000000..579652c3f95e --- /dev/null +++ b/pkgs/development/python-modules/authlib/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, buildPythonPackage +, fetchFromGitHub +, pytest +, mock +, cryptography +, requests +}: + +buildPythonPackage rec { + version = "0.13"; + pname = "authlib"; + + src = fetchFromGitHub { + owner = "lepture"; + repo = "authlib"; + rev = "v${version}"; + sha256 = "1nv0jbsaqr9qjn7nnl55s42iyx655k7fsj8hs69652lqnfn5y3d5"; + }; + + propagatedBuildInputs = [ cryptography requests ]; + + checkInputs = [ mock pytest ]; + + checkPhase = '' + PYTHONPATH=$PWD:$PYTHONPATH pytest tests/{core,files} + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/lepture/authlib; + description = "The ultimate Python library in building OAuth and OpenID Connect servers. JWS,JWE,JWK,JWA,JWT included."; + maintainers = with maintainers; [ flokli ]; + license = licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 171366f00446..0069e4d0b711 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -234,6 +234,8 @@ in { atomman = callPackage ../development/python-modules/atomman { }; + authlib = callPackage ../development/python-modules/authlib { }; + # packages defined elsewhere amazon_kclpy = callPackage ../development/python-modules/amazon_kclpy { };