diff --git a/pkgs/development/python-modules/esios-api/default.nix b/pkgs/development/python-modules/esios-api/default.nix new file mode 100644 index 000000000000..0679e5ecce2c --- /dev/null +++ b/pkgs/development/python-modules/esios-api/default.nix @@ -0,0 +1,50 @@ +{ + lib, + aiohttp, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + pytest-asyncio, + pytest-cov-stub, + pytest-timeout, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "esios-api"; + version = "4.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "chiro79"; + repo = "esios-api"; + tag = finalAttrs.version; + hash = "sha256-ZmU1D+W3ah4LUwgHwaS6NJpfKPLSRgIC8psUXTy/muM="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "poetry_core>=2.4.0" "poetry_core" + ''; + + build-system = [ poetry-core ]; + + dependencies = [ aiohttp ]; + + nativeCheckInputs = [ + pytest-asyncio + pytest-cov-stub + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ "esios_api" ]; + + meta = { + description = "Retrieval of Spanish Electricity hourly prices (PVPC)"; + homepage = "https://github.com/chiro79/esios-api"; + changelog = "https://github.com/chiro79/esios-api/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 0fc63c7c2aa2..d2aec790be38 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -5319,7 +5319,8 @@ ]; "pvpc_hourly_pricing" = ps: with ps; [ - ]; # missing inputs: esios_api + esios-api + ]; "pyload" = ps: with ps; [ pyloadapi @@ -8493,6 +8494,7 @@ "pushbullet" "pushover" "pvoutput" + "pvpc_hourly_pricing" "pyload" "python_script" "qbittorrent" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 489632a3e923..81d252345c2a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5170,6 +5170,8 @@ self: super: with self; { eseries = callPackage ../development/python-modules/eseries { }; + esios-api = callPackage ../development/python-modules/esios-api { }; + esp-idf-size = callPackage ../development/python-modules/esp-idf-size { }; espeak-phonemizer = callPackage ../development/python-modules/espeak-phonemizer { };