1{
2 lib,
3 buildPythonPackage,
4 email-validator,
5 fastapi,
6 fetchFromGitHub,
7 httpx,
8 oauthlib,
9 poetry-core,
10 pydantic,
11 pyjwt,
12 pytest-cov-stub,
13 pytest-asyncio,
14 pytest-xdist,
15 pytestCheckHook,
16 pythonOlder,
17}:
18
19buildPythonPackage rec {
20 pname = "fastapi-sso";
21 version = "0.18.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.11";
25
26 src = fetchFromGitHub {
27 owner = "tomasvotava";
28 repo = "fastapi-sso";
29 tag = version;
30 hash = "sha256-591+7Jjg3Pb0qXZsj4tEk8lHqxAzWrs5GO92jFJ4Qmo=";
31 };
32
33 build-system = [ poetry-core ];
34
35 dependencies = [
36 fastapi
37 httpx
38 oauthlib
39 pydantic
40 pyjwt
41 ]
42 ++ pydantic.optional-dependencies.email;
43
44 nativeCheckInputs = [
45 email-validator
46 pytest-asyncio
47 pytest-cov-stub
48 pytest-xdist
49 pytestCheckHook
50 ];
51
52 pythonImportsCheck = [ "fastapi_sso" ];
53
54 meta = with lib; {
55 description = "FastAPI plugin to enable SSO to most common providers (such as Facebook login, Google login and login via Microsoft Office 365 Account";
56 homepage = "https://github.com/tomasvotava/fastapi-sso";
57 changelog = "https://github.com/tomasvotava/fastapi-sso/releases/tag/${version}";
58 license = licenses.mit;
59 maintainers = with maintainers; [ fab ];
60 };
61}