summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/fastapi-github-oidc/default.nix
blob: 75614652e872cfd5f1fab16ca2f82b9651cac996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  hatch-vcs,
  fastapi,
  pyjwt,
  httpx,
  requests,
  pytestCheckHook,
  lib,
}:
buildPythonPackage rec {
  pname = "fastapi-github-oidc";
  version = "0.3.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "atopile";
    repo = "fastapi-github-oidc";
    tag = version;
    hash = "sha256-FS50++Hy9h0RFrSnc4PbXFPh/1OO0JOaFdIZwoXa86A=";
  };

  build-system = [
    hatchling
    hatch-vcs
  ];

  dependencies = [
    fastapi
    pyjwt
    httpx
    requests
  ];

  pythonImportsCheck = [
    "github_oidc.client"
    "github_oidc.server"
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTests = [
    "test_with_auth" # calls github api
  ];

  meta = {
    description = "FastAPI compatible middleware to authenticate Github OIDC Tokens";
    homepage = "https://github.com/atopile/fastapi-github-oidc";
    changelog = "https://github.com/atopile/fastapi-github-oidc/releases/tag/${src.tag}";
    license = with lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ sigmanificient ];
  };
}