about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/python-family-hub-local/default.nix43
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix3
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 47 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/python-family-hub-local/default.nix b/pkgs/development/python-modules/python-family-hub-local/default.nix
new file mode 100644
index 0000000000000..01d9da8423ddd
--- /dev/null
+++ b/pkgs/development/python-modules/python-family-hub-local/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, buildPythonPackage
+, aiohttp
+, async-timeout
+, pillow
+, fetchPypi
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "python-family-hub-local";
+  version = "0.0.2";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.9";
+
+  src = fetchPypi {
+    inherit pname version;
+    extension = "zip";
+    hash = "sha256-bbOBlUJ4g+HOcJihEBAz3lsHR9Gn07z8st14FRFeJbc=";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+    async-timeout
+    pillow
+  ];
+
+  # Module has no tests
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "pyfamilyhublocal"
+  ];
+
+  meta = with lib; {
+    description = "Module to accesse information from Samsung FamilyHub fridges locally";
+    homepage = "https://github.com/Klathmon/python-family-hub-local";
+    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 e57b8921cf933..4a41f7223a86d 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -774,7 +774,8 @@
     "fail2ban" = ps: with ps; [
     ];
     "familyhub" = ps: with ps; [
-    ]; # missing inputs: python-family-hub-local
+      python-family-hub-local
+    ];
     "fan" = ps: with ps; [
     ];
     "fastdotcom" = ps: with ps; [
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 39c2bff678735..18bcf42d7da1f 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -8138,6 +8138,8 @@ in {
 
   python-editor = callPackage ../development/python-modules/python-editor { };
 
+  python-family-hub-local = callPackage ../development/python-modules/python-family-hub-local { };
+
   python-fsutil = callPackage ../development/python-modules/python-fsutil { };
 
   pythonefl = callPackage ../development/python-modules/python-efl { };