From eaff6236cc4c99f4ad6d5002a871268f8cc1b41b Mon Sep 17 00:00:00 2001 From: genga Date: Thu, 27 Mar 2025 16:39:45 +0300 Subject: [PATCH] python312Packages.kopf: init at 1.37.5 python312Packages.kopf: allow darwin local networking --- .../python-modules/kopf/default.nix | 86 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 88 insertions(+) create mode 100644 pkgs/development/python-modules/kopf/default.nix diff --git a/pkgs/development/python-modules/kopf/default.nix b/pkgs/development/python-modules/kopf/default.nix new file mode 100644 index 000000000000..b36d8a983962 --- /dev/null +++ b/pkgs/development/python-modules/kopf/default.nix @@ -0,0 +1,86 @@ +{ + lib, + fetchFromGitHub, + buildPythonPackage, + pytestCheckHook, + + setuptools, + setuptools-scm, + pyyaml, + aiohttp, + iso8601, + python-json-logger, + clickclick, + typing-extensions, + + pytest-mock, + pytest-timeout, + pytest-asyncio, + pyngrok, + freezegun, + certvalidator, + aresponses, +}: + +buildPythonPackage rec { + pname = "kopf"; + version = "1.37.5"; + pyproject = true; + + src = fetchFromGitHub { + owner = "nolar"; + repo = "kopf"; + tag = version; + hash = "sha256-FwQnt5UoK+Qx7suFACwEtTIvBneJQ19/WmdelWmf+Z0="; + }; + + build-system = [ + setuptools + setuptools-scm + ]; + + dependencies = [ + pyyaml + python-json-logger + aiohttp + iso8601 + clickclick + typing-extensions + ]; + + nativeCheckInputs = [ + pytestCheckHook + pyngrok + pytest-timeout + pytest-asyncio + pytest-mock + freezegun + certvalidator + aresponses + ]; + + disabledTestPaths = [ + # Module astpath unavailable in nixpkgs + "tests/admission/test_certificates.py" + "tests/e2e/test_examples.py" + + #Module certbuilder unavailable in nixpkgs + "tests/admission/test_webhook_detection.py" + "tests/admission/test_webhook_ngrok.py" + "tests/admission/test_webhook_server.py" + ]; + + __darwinAllowLocalNetworking = true; + + pythonImportsCheck = [ + "kopf" + ]; + + meta = { + description = "Python framework to write Kubernetes operators"; + homepage = "https://kopf.readthedocs.io/"; + changelog = "https://github.com/nolar/kopf/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ genga898 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ba4fe4aa1d7f..bdca329912e5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8433,6 +8433,8 @@ self: super: with self; { konnected = callPackage ../development/python-modules/konnected { }; + kopf = callPackage ../development/python-modules/kopf { }; + korean-lunar-calendar = callPackage ../development/python-modules/korean-lunar-calendar { }; kornia = callPackage ../development/python-modules/kornia { };