diff --git a/pkgs/development/python-modules/fumis/default.nix b/pkgs/development/python-modules/fumis/default.nix new file mode 100644 index 000000000000..0e1d9c605786 --- /dev/null +++ b/pkgs/development/python-modules/fumis/default.nix @@ -0,0 +1,76 @@ +{ + lib, + aiohttp, + aioresponses, + awesomeversion, + buildPythonPackage, + fetchFromGitHub, + mashumaro, + orjson, + poetry-core, + pytest-asyncio, + pytest-cov-stub, + pytestCheckHook, + rich, + syrupy, + textual, + textual-plotext, + typer, + yarl, +}: + +buildPythonPackage (finalAttrs: { + pname = "fumis"; + version = "0.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "frenck"; + repo = "python-fumis"; + tag = "v${finalAttrs.version}"; + hash = "sha256-yh1gxQ8iqHIE/pavzjYUXdaHnnHD0Ae6Yd/Elc/ZNmY="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "0.0.0" "${finalAttrs.version}" + ''; + + build-system = [ poetry-core ]; + + dependencies = [ + aiohttp + awesomeversion + mashumaro + orjson + yarl + ]; + + optional-dependencies = { + cli = [ + rich + textual + textual-plotext + typer + ]; + }; + + nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytest-cov-stub + pytestCheckHook + syrupy + ] + ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies; + + pythonImportsCheck = [ "fumis" ]; + + meta = { + description = "Asynchronous Python client for the Fumis WiRCU API"; + homepage = "https://github.com/frenck/python-fumis"; + changelog = "https://github.com/frenck/python-fumis/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index f1f496c558f3..6df6e6e8f35c 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2072,7 +2072,8 @@ ]; "fumis" = ps: with ps; [ - ]; # missing inputs: fumis + fumis + ]; "futurenow" = ps: with ps; [ pyfnip @@ -7755,6 +7756,7 @@ "frontier_silicon" "fujitsu_fglair" "fully_kiosk" + "fumis" "fyta" "garage_door" "garages_amsterdam" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dcd84157257b..adad50c1a32f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6012,6 +6012,8 @@ self: super: with self; { fullmoon = callPackage ../development/python-modules/fullmoon { }; + fumis = callPackage ../development/python-modules/fumis { }; + func-timeout = callPackage ../development/python-modules/func-timeout { }; funcparserlib = callPackage ../development/python-modules/funcparserlib { };