about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/systembridgeconnector/default.nix47
-rw-r--r--pkgs/development/python-modules/systembridgemodels/default.nix51
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix4
-rw-r--r--pkgs/top-level/python-packages.nix4
4 files changed, 105 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/systembridgeconnector/default.nix b/pkgs/development/python-modules/systembridgeconnector/default.nix
new file mode 100644
index 0000000000000..c1b734bcbda93
--- /dev/null
+++ b/pkgs/development/python-modules/systembridgeconnector/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, setuptools
+, aiohttp
+, incremental
+, systembridgemodels
+}:
+
+buildPythonPackage rec {
+  pname = "systembridgeconnector";
+  version = "4.0.1";
+  pyproject = true;
+
+  disabled = pythonOlder "3.11";
+
+  src = fetchFromGitHub {
+    owner = "timmo001";
+    repo = "system-bridge-connector";
+    rev = "refs/tags/${version}";
+    hash = "sha256-dMOhw7e2sCmGItsgGcGxYVCIJM2FBm6IyxIQXPtY+Pg=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    aiohttp
+    incremental
+    systembridgemodels
+  ];
+
+  pythonImportsCheck = [ "systembridgeconnector" ];
+
+  # upstream has no tests
+  doCheck = false;
+
+  meta = {
+    changelog = "https://github.com/timmo001/system-bridge-connector/releases/tag/${version}";
+    description = "This is the connector package for the System Bridge project";
+    homepage = "https://github.com/timmo001/system-bridge-connector";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/development/python-modules/systembridgemodels/default.nix b/pkgs/development/python-modules/systembridgemodels/default.nix
new file mode 100644
index 0000000000000..16a16b3a8da4a
--- /dev/null
+++ b/pkgs/development/python-modules/systembridgemodels/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, fetchpatch2
+, setuptools
+, incremental
+}:
+
+buildPythonPackage rec {
+  pname = "systembridgemodels";
+  version = "4.0.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.11";
+
+  src = fetchFromGitHub {
+    owner = "timmo001";
+    repo = "system-bridge-models";
+    rev = "refs/tags/${version}";
+    hash = "sha256-4nbTsVRqtoX4UhTrQS4HwoLtx0RO1VA8UewSAWOSsik=";
+  };
+
+  patches = [
+    (fetchpatch2 {
+      url = "https://github.com/timmo001/system-bridge-models/commit/7cd506760fd47c0f3717b6fcfe127b673e3198f8.patch";
+      hash = "sha256-i+GCcoyX07ii9Kj46dtAlT85jUKfF0KHEH9++UTjiik=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    incremental
+  ];
+
+  pythonImportsCheck = [ "systembridgemodels" ];
+
+  # upstream has no tests
+  doCheck = false;
+
+  meta = {
+    changelog = "https://github.com/timmo001/system-bridge-models/releases/tag/${version}";
+    description = "This is the models package used by the System Bridge project";
+    homepage = "https://github.com/timmo001/system-bridge-models";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 69820ea320de4..5e4754d36d182 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -4887,8 +4887,9 @@
       ifaddr
       psutil-home-assistant
       sqlalchemy
+      systembridgeconnector
       zeroconf
-    ]; # missing inputs: systembridgeconnector
+    ];
     "system_health" = ps: with ps; [
       aiohttp-cors
       aiohttp-fast-url-dispatcher
@@ -6490,6 +6491,7 @@
     "syncthing"
     "syncthru"
     "synology_dsm"
+    "system_bridge"
     "system_health"
     "system_log"
     "systemmonitor"
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index c12bae10319f5..214fd82a327e8 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -14222,6 +14222,10 @@ self: super: with self; {
 
   systembridge = callPackage ../development/python-modules/systembridge { };
 
+  systembridgeconnector = callPackage ../development/python-modules/systembridgeconnector { };
+
+  systembridgemodels = callPackage ../development/python-modules/systembridgemodels { };
+
   systemd = callPackage ../development/python-modules/systemd {
     inherit (pkgs) systemd;
   };