1{
2 lib,
3 buildPythonPackage,
4 cacert,
5 cachelib,
6 cryptography,
7 fetchFromGitHub,
8 flask,
9 flask-sqlalchemy,
10 httpx,
11 mock,
12 pytest-asyncio,
13 pytestCheckHook,
14 pythonOlder,
15 requests,
16 setuptools,
17 starlette,
18 werkzeug,
19}:
20
21buildPythonPackage rec {
22 pname = "authlib";
23 version = "1.6.3";
24 pyproject = true;
25
26 disabled = pythonOlder "3.8";
27
28 src = fetchFromGitHub {
29 owner = "lepture";
30 repo = "authlib";
31 tag = "v${version}";
32 hash = "sha256-AzIjfUH89tYZwVnOpdSwEzaGNpedfQ50k9diKUfH+Fg=";
33 };
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 cryptography
39 ];
40
41 nativeCheckInputs = [
42 cachelib
43 flask
44 flask-sqlalchemy
45 httpx
46 mock
47 pytest-asyncio
48 pytestCheckHook
49 requests
50 starlette
51 werkzeug
52 ];
53
54 pythonImportsCheck = [ "authlib" ];
55
56 disabledTestPaths = [
57 # Django tests require a running instance
58 "tests/django/"
59 "tests/clients/test_django/"
60 # Unsupported encryption algorithm
61 "tests/jose/test_chacha20.py"
62 ];
63
64 meta = with lib; {
65 description = "Library for building OAuth and OpenID Connect servers";
66 homepage = "https://github.com/lepture/authlib";
67 changelog = "https://github.com/lepture/authlib/blob/${src.tag}/docs/changelog.rst";
68 license = licenses.bsd3;
69 maintainers = with maintainers; [ flokli ];
70 };
71}