From db1ee4e1f80d9be57bcb979ea1546b5c1da66bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 29 Jun 2021 13:18:43 +0200 Subject: [PATCH 1/3] python3Packages.smarthab: init at 0.21 --- .../python-modules/smarthab/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/smarthab/default.nix diff --git a/pkgs/development/python-modules/smarthab/default.nix b/pkgs/development/python-modules/smarthab/default.nix new file mode 100644 index 000000000000..f26e294b938f --- /dev/null +++ b/pkgs/development/python-modules/smarthab/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, aiohttp +}: + +buildPythonPackage rec { + pname = "smarthab"; + version = "0.21"; + + src = fetchPypi { + pname = "SmartHab"; + inherit version; + sha256 = "bf929455a2f7cc1e275b331de73d983587138a8d9179574988ba05fa152d3ccf"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + # no tests on PyPI, no tags on GitLab + doCheck = false; + + pythonImportsCheck = [ "pysmarthab" ]; + + meta = with lib; { + description = "Control devices in a SmartHab-powered home"; + homepage = "https://gitlab.com/outadoc/python-smarthab"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6af98d34e7ef..3fac0b6b5597 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7986,6 +7986,8 @@ in { smart-open = callPackage ../development/python-modules/smart-open { }; + smarthab = callPackage ../development/python-modules/smarthab { }; + smartypants = callPackage ../development/python-modules/smartypants { }; smbprotocol = callPackage ../development/python-modules/smbprotocol { }; From b1d184deeb5ab300aa864f08b048c0da7d2598dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 29 Jun 2021 13:19:07 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages.nix --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 73b2b1294d87..11d26a119313 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -768,7 +768,7 @@ "sma" = ps: with ps; [ pysma ]; "smappee" = ps: with ps; [ aiohttp-cors pysmappee ]; "smart_meter_texas" = ps: with ps; [ ]; # missing inputs: smart-meter-texas - "smarthab" = ps: with ps; [ ]; # missing inputs: smarthab + "smarthab" = ps: with ps; [ smarthab ]; "smartthings" = ps: with ps; [ aiohttp-cors hass-nabucasa pysmartapp pysmartthings ]; "smarttub" = ps: with ps; [ python-smarttub ]; "smarty" = ps: with ps; [ ]; # missing inputs: pysmarty From f5d90899d4de88f4b4d881ad6e541dfb56575cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 29 Jun 2021 13:20:25 +0200 Subject: [PATCH 3/3] home-assistant: test smarthab component --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 5542f9432953..e6e612aff554 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -657,6 +657,7 @@ in with py.pkgs; buildPythonApplication rec { "sleepiq" "sma" "smappee" + "smarthab" "smartthings" "smarttub" "smhi"