1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pytestCheckHook,
6
7 setuptools,
8 setuptools-scm,
9 pyyaml,
10 aiohttp,
11 iso8601,
12 python-json-logger,
13 clickclick,
14 typing-extensions,
15
16 pytest-mock,
17 pytest-timeout,
18 pytest-asyncio,
19 pyngrok,
20 freezegun,
21 certvalidator,
22 aresponses,
23}:
24
25buildPythonPackage rec {
26 pname = "kopf";
27 version = "1.38.0";
28 pyproject = true;
29
30 src = fetchFromGitHub {
31 owner = "nolar";
32 repo = "kopf";
33 tag = version;
34 hash = "sha256-H2Q5nDIODp2VFtMIJ0g8b+/SMZzLueRGBkh1g6LBbgc=";
35 };
36
37 build-system = [
38 setuptools
39 setuptools-scm
40 ];
41
42 dependencies = [
43 pyyaml
44 python-json-logger
45 aiohttp
46 iso8601
47 clickclick
48 typing-extensions
49 ];
50
51 nativeCheckInputs = [
52 pytestCheckHook
53 pyngrok
54 pytest-timeout
55 pytest-asyncio
56 pytest-mock
57 freezegun
58 certvalidator
59 aresponses
60 ];
61
62 disabledTestPaths = [
63 # Module astpath unavailable in nixpkgs
64 "tests/admission/test_certificates.py"
65 "tests/e2e/test_examples.py"
66
67 #Module certbuilder unavailable in nixpkgs
68 "tests/admission/test_webhook_detection.py"
69 "tests/admission/test_webhook_ngrok.py"
70 "tests/admission/test_webhook_server.py"
71 ];
72
73 __darwinAllowLocalNetworking = true;
74
75 pythonImportsCheck = [
76 "kopf"
77 ];
78
79 meta = {
80 description = "Python framework to write Kubernetes operators";
81 homepage = "https://kopf.readthedocs.io/";
82 changelog = "https://github.com/nolar/kopf/releases/tag/${src.tag}";
83 license = lib.licenses.mit;
84 maintainers = with lib.maintainers; [ genga898 ];
85 };
86}