diff --git a/pkgs/development/python-modules/svcs/default.nix b/pkgs/development/python-modules/svcs/default.nix new file mode 100644 index 000000000000..08a1452b9bfb --- /dev/null +++ b/pkgs/development/python-modules/svcs/default.nix @@ -0,0 +1,73 @@ +{ + lib, + stdenv, + buildPythonPackage, + fetchFromGitHub, + + attrs, + hatch-fancy-pypi-readme, + hatch-vcs, + hatchling, + # test dependencies + aiohttp, + fastapi, + flask, + httpx, + pyramid, + pytest-asyncio, + pytestCheckHook, + starlette, + sybil, +}: + +buildPythonPackage rec { + pname = "svcs"; + version = "25.1.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "hynek"; + repo = "svcs"; + tag = version; + hash = "sha256-dDPmOKGifAGmAH3TD0NzJvR8lUB5qDWbxIwzHtNeF+4="; + }; + + build-system = [ + hatch-fancy-pypi-readme + hatch-vcs + hatchling + ]; + + dependencies = [ + attrs + ]; + + nativeCheckInputs = [ + aiohttp + fastapi + flask + httpx + pyramid + pytest-asyncio + pytestCheckHook + starlette + sybil + ]; + + disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + "test_aclose_registry_ok" + "test_registrations" + "test_get_pings" + "test_client_pool_register_value" + ]; + + pythonImportsCheck = [ "svcs" ]; + + meta = { + description = "Flexible Service Locator for Python"; + homepage = "https://github.com/hynek/svcs"; + changelog = "https://github.com/hynek/svcs/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ taranarmo ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3240f13cb592..68bfaf6ca7af 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18406,6 +18406,8 @@ self: super: with self; { sv-ttk = callPackage ../development/python-modules/sv-ttk { }; + svcs = callPackage ../development/python-modules/svcs { }; + svg-path = callPackage ../development/python-modules/svg-path { }; svg-py = callPackage ../development/python-modules/svg-py { };