From 38dbbf19ad8084f86e4838d1219f8390e1c0af3f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Feb 2024 16:37:59 +0100 Subject: [PATCH 1/2] python311Packages.aiotankerkoenig: init at 0.4.1 Python module for interacting with tankerkoenig.de https://github.com/jpbede/aiotankerkoenig --- .../aiotankerkoenig/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/aiotankerkoenig/default.nix diff --git a/pkgs/development/python-modules/aiotankerkoenig/default.nix b/pkgs/development/python-modules/aiotankerkoenig/default.nix new file mode 100644 index 000000000000..5915fdd6beb1 --- /dev/null +++ b/pkgs/development/python-modules/aiotankerkoenig/default.nix @@ -0,0 +1,64 @@ +{ lib +, aiohttp +, aioresponses +, buildPythonPackage +, fetchFromGitHub +, mashumaro +, orjson +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, syrupy +, yarl +}: + +buildPythonPackage rec { + pname = "aiotankerkoenig"; + version = "0.4.1"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchFromGitHub { + owner = "jpbede"; + repo = "aiotankerkoenig"; + rev = "refs/tags/v${version}"; + hash = "sha256-BB1Cy4Aji5m06LlNj03as4CWF8RcYKAYy4oxPomOP68="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "--cov" "" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + mashumaro + orjson + yarl + ]; + + nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytestCheckHook + syrupy + ]; + + pythonImportsCheck = [ + "aiotankerkoenig" + ]; + + meta = with lib; { + description = "Python module for interacting with tankerkoenig.de"; + homepage = "https://github.com/jpbede/aiotankerkoenig"; + changelog = "https://github.com/jpbede/aiotankerkoenig/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 92354bbb789b..8bf0469147d5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -415,6 +415,8 @@ self: super: with self; { aiosyncthing = callPackage ../development/python-modules/aiosyncthing { }; + aiotankerkoenig = callPackage ../development/python-modules/aiotankerkoenig { }; + aiotractive = callPackage ../development/python-modules/aiotractive { }; aiounifi = callPackage ../development/python-modules/aiounifi { }; From bf4b05336470bc9d89e3772f43194d65de3fbc0e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Feb 2024 16:41:51 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 6b4ebaadb1e8..1cc9305504f5 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4911,7 +4911,8 @@ tank-utility ]; "tankerkoenig" = ps: with ps; [ - ]; # missing inputs: aiotankerkoenig + aiotankerkoenig + ]; "tapsaff" = ps: with ps; [ ]; # missing inputs: tapsaff "tasmota" = ps: with ps; [ @@ -6487,6 +6488,7 @@ "tag" "tailscale" "tailwind" + "tankerkoenig" "tasmota" "tautulli" "tcp"