1{ stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, mock
6, cryptography
7, requests
8}:
9
10buildPythonPackage rec {
11 version = "0.13";
12 pname = "authlib";
13
14 src = fetchFromGitHub {
15 owner = "lepture";
16 repo = "authlib";
17 rev = "v${version}";
18 sha256 = "1nv0jbsaqr9qjn7nnl55s42iyx655k7fsj8hs69652lqnfn5y3d5";
19 };
20
21 propagatedBuildInputs = [ cryptography requests ];
22
23 checkInputs = [ mock pytest ];
24
25 checkPhase = ''
26 PYTHONPATH=$PWD:$PYTHONPATH pytest tests/{core,files}
27 '';
28
29 meta = with stdenv.lib; {
30 homepage = https://github.com/lepture/authlib;
31 description = "The ultimate Python library in building OAuth and OpenID Connect servers. JWS,JWE,JWK,JWA,JWT included.";
32 maintainers = with maintainers; [ flokli ];
33 license = licenses.bsd3;
34 };
35}