summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/kanidm/default.nix
blob: 39675905e0d1a2a9ffd9c6e1a52ecd907c2a3278 (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
56
57
58
59
60
61
62
63
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build
  pdm-backend,

  # propagates
  aiohttp,
  authlib,
  pydantic,
  toml,

  # tests
  pytest-asyncio,
  pytest-mock,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "kanidm";
  version = "1.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "kanidm";
    repo = "kanidm";
    rev = "1774f9428ccdc357d514652acbcae49f6b16687a";
    hash = "sha256-SE3b9Ug0EZFygGf9lsmVsQzmop9qOMiCUsbO//1QWF8=";
  };

  sourceRoot = "${src.name}/pykanidm";

  build-system = [ pdm-backend ];

  dependencies = [
    aiohttp
    authlib
    pydantic
    toml
  ];

  nativeCheckInputs = [
    pytest-asyncio
    pytest-mock
    pytestCheckHook
  ];

  disabledTestMarks = [ "network" ];

  pythonImportsCheck = [ "kanidm" ];

  meta = {
    description = "Kanidm client library";
    homepage = "https://github.com/kanidm/kanidm/tree/master/pykanidm";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [
      arianvp
      hexa
    ];
  };
}