From a377e26ee0c63159c525966b4a7d4e483a68259d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 18 Jun 2021 16:11:03 +0200 Subject: [PATCH 1/3] python3Packages.pmsensor: init at 0.4 --- .../python-modules/pmsensor/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/pmsensor/default.nix diff --git a/pkgs/development/python-modules/pmsensor/default.nix b/pkgs/development/python-modules/pmsensor/default.nix new file mode 100644 index 000000000000..1d64852f281e --- /dev/null +++ b/pkgs/development/python-modules/pmsensor/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pyserial +}: + +buildPythonPackage rec { + pname = "pmsensor"; + version = "0.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "7fc03aafb791ca70d847c9ab97cf181bc7d8f7345efb4b0c3f66c07b9c7dee69"; + }; + + propagatedBuildInputs = [ + pyserial + ]; + + # no tests implemented + doCheck = false; + + pythonImportsCheck = [ + "pmsensor.co2sensor" + "pmsensor.serial_pm" + ]; + + meta = with lib; { + description = "Library to read data from environment sensors"; + homepage = "https://github.com/open-homeautomation/pmsensor"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9d5f97f6def8..1610303e3890 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5242,6 +5242,8 @@ in { pkuseg = callPackage ../development/python-modules/pkuseg { }; + pmsensor = callPackage ../development/python-modules/pmsensor { }; + ppdeep = callPackage ../development/python-modules/ppdeep { }; pyatag = callPackage ../development/python-modules/pyatag { }; From ab8d6df7fa40aaab84e10c425ffa3199ffe74b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 18 Jun 2021 16:11:41 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages.nix --- pkgs/servers/home-assistant/component-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4a60fcf0c9d3..372f0cf6ad18 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -503,7 +503,7 @@ "meteoclimatic" = ps: with ps; [ pymeteoclimatic ]; "metoffice" = ps: with ps; [ ]; # missing inputs: datapoint "mfi" = ps: with ps; [ ]; # missing inputs: mficlient - "mhz19" = ps: with ps; [ ]; # missing inputs: pmsensor + "mhz19" = ps: with ps; [ pmsensor ]; "microsoft" = ps: with ps; [ ]; # missing inputs: pycsspeechtts "microsoft_face" = ps: with ps; [ aiohttp-cors ]; "microsoft_face_detect" = ps: with ps; [ aiohttp-cors ]; @@ -739,7 +739,7 @@ "sensor" = ps: with ps; [ sqlalchemy ]; "sentry" = ps: with ps; [ sentry-sdk ]; "serial" = ps: with ps; [ pyserial-asyncio ]; - "serial_pm" = ps: with ps; [ ]; # missing inputs: pmsensor + "serial_pm" = ps: with ps; [ pmsensor ]; "sesame" = ps: with ps; [ ]; # missing inputs: pysesame2 "seven_segments" = ps: with ps; [ pillow ]; "seventeentrack" = ps: with ps; [ ]; # missing inputs: py17track From 0dd87d9024db5fb8ed1cfdde5f8c93523e4f8ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 18 Jun 2021 16:13:42 +0200 Subject: [PATCH 3/3] home-assistant: test mhz19 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 04a2aed97de5..6f401323aa9f 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -501,6 +501,7 @@ in with py.pkgs; buildPythonApplication rec { "met" "met_eireann" "meteoclimatic" + "mhz19" "microsoft_face" "microsoft_face_detect" "microsoft_face_identify"