1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build
7 pdm-backend,
8
9 # propagates
10 aiohttp,
11 authlib,
12 pydantic,
13 toml,
14
15 # tests
16 pytest-asyncio,
17 pytest-mock,
18 pytestCheckHook,
19}:
20
21buildPythonPackage rec {
22 pname = "kanidm";
23 version = "1.2.0";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "kanidm";
28 repo = "kanidm";
29 rev = "1774f9428ccdc357d514652acbcae49f6b16687a";
30 hash = "sha256-SE3b9Ug0EZFygGf9lsmVsQzmop9qOMiCUsbO//1QWF8=";
31 };
32
33 sourceRoot = "${src.name}/pykanidm";
34
35 build-system = [ pdm-backend ];
36
37 dependencies = [
38 aiohttp
39 authlib
40 pydantic
41 toml
42 ];
43
44 nativeCheckInputs = [
45 pytest-asyncio
46 pytest-mock
47 pytestCheckHook
48 ];
49
50 disabledTestMarks = [ "network" ];
51
52 pythonImportsCheck = [ "kanidm" ];
53
54 meta = with lib; {
55 description = "Kanidm client library";
56 homepage = "https://github.com/kanidm/kanidm/tree/master/pykanidm";
57 license = licenses.mpl20;
58 maintainers = with maintainers; [
59 arianvp
60 hexa
61 ];
62 };
63}