summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/aiopegelonline/default.nix46
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix4
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 51 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/aiopegelonline/default.nix b/pkgs/development/python-modules/aiopegelonline/default.nix
new file mode 100644
index 00000000000..3e78733ce44
--- /dev/null
+++ b/pkgs/development/python-modules/aiopegelonline/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, aiohttp
+, aioresponses
+, buildPythonPackage
+, fetchFromGitHub
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "aiopegelonline";
+  version = "0.0.6";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.9";
+
+  src = fetchFromGitHub {
+    owner = "mib1185";
+    repo = "aiopegelonline";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-UbH5S+BfXMAurEvPx0sOzNoV/yypbMCPN3Y3cSherfQ=";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+  ];
+
+  nativeCheckInputs = [
+    aioresponses
+    pytest-asyncio
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "aiopegelonline"
+  ];
+
+  meta = with lib; {
+    description = "Library to retrieve data from PEGELONLINE";
+    homepage = "https://github.com/mib1185/aiopegelonline";
+    changelog = "https://github.com/mib1185/aiopegelonline/releases/tag/v${version}";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 9b1dcda3bed..88678c2cc96 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -3108,7 +3108,8 @@
     "peco_opower" = ps: with ps; [
     ];
     "pegel_online" = ps: with ps; [
-    ]; # missing inputs: aiopegelonline
+      aiopegelonline
+    ];
     "pencom" = ps: with ps; [
       pencompy
     ];
@@ -5357,6 +5358,7 @@
     "panel_custom"
     "panel_iframe"
     "peco"
+    "pegel_online"
     "persistent_notification"
     "person"
     "philips_js"
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 01cf514cba7..4cf1f0a2147 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -312,6 +312,8 @@ self: super: with self; {
 
   aiooss2 = callPackage ../development/python-modules/aiooss2 { };
 
+  aiopegelonline = callPackage ../development/python-modules/aiopegelonline { };
+
   aiopg = callPackage ../development/python-modules/aiopg { };
 
   aioprocessing = callPackage ../development/python-modules/aioprocessing { };