From d5998fd272ab93fb84bb4280397b270b67d0230f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 15 May 2021 23:33:29 +0200 Subject: [PATCH 1/2] python3Packages.pyobihai: init at 1.3.1 --- .../python-modules/pyobihai/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/pyobihai/default.nix diff --git a/pkgs/development/python-modules/pyobihai/default.nix b/pkgs/development/python-modules/pyobihai/default.nix new file mode 100644 index 00000000000..79d8363372b --- /dev/null +++ b/pkgs/development/python-modules/pyobihai/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "pyobihai"; + version = "1.3.1"; + disabled = pythonOlder "3.6"; + + # GitHub release, https://github.com/dshokouhi/pyobihai/issues/10 + src = fetchPypi { + inherit pname version; + sha256 = "1vvf5if57dfd091a7fb5rvx63hvf0isrx28j72nj2aav1as460qp"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "pyobihai" ]; + + meta = with lib; { + description = "Python package to interact with Obihai devices"; + homepage = "https://github.com/dshokouhi/pyobihai"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3ecf4494ff4..7542cc9ccdb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5911,6 +5911,8 @@ in { pynzb = callPackage ../development/python-modules/pynzb { }; + pyobihai = callPackage ../development/python-modules/pyobihai { }; + pyocr = callPackage ../development/python-modules/pyocr { tesseract = pkgs.tesseract4; }; From 03809fde5c422a5002d8c17b14acdcb27154ba1b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 15 May 2021 23:34:02 +0200 Subject: [PATCH 2/2] home-assistant: update component-packages --- 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 844ea8976d7..297a8f19f49 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -582,7 +582,7 @@ "nx584" = ps: with ps; [ pynx584 ]; "nzbget" = ps: with ps; [ ]; # missing inputs: pynzbgetapi "oasa_telematics" = ps: with ps; [ ]; # missing inputs: oasatelematics - "obihai" = ps: with ps; [ ]; # missing inputs: pyobihai + "obihai" = ps: with ps; [ pyobihai ]; "octoprint" = ps: with ps; [ aiohttp-cors netdisco pyroute2 zeroconf ]; "oem" = ps: with ps; [ ]; # missing inputs: oemthermostat "ohmconnect" = ps: with ps; [ defusedxml ];