From afe89f47c1f97b3e14a58319ff0ccbcc3bef676a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Feb 2021 13:55:44 +0100 Subject: [PATCH 1/2] python3Packages.pycec: init at 0.5.1 --- .../python-modules/pycec/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/pycec/default.nix diff --git a/pkgs/development/python-modules/pycec/default.nix b/pkgs/development/python-modules/pycec/default.nix new file mode 100644 index 00000000000..c65ea3a695f --- /dev/null +++ b/pkgs/development/python-modules/pycec/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, libcec +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pycec"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "konikvranik"; + repo = pname; + rev = "v${version}"; + sha256 = "1ivnmihajhfkwwghgl0f8n9ragpirbmbj1mhj9bmjjc29zzdc3m6"; + }; + + propagatedBuildInputs = [ + libcec + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pycec" ]; + + meta = with lib; { + description = "Python modules to access HDMI CEC devices"; + homepage = "https://github.com/konikvranik/pycec/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8e9824fe901..6ffba14a698 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5311,6 +5311,8 @@ in { pycdio = callPackage ../development/python-modules/pycdio { }; + pycec = callPackage ../development/python-modules/pycec { }; + pycfdns = callPackage ../development/python-modules/pycfdns { }; pychannels = callPackage ../development/python-modules/pychannels { }; From cae4c347593890fa968db8f5eff3a8b3adc91dc7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Feb 2021 13:56:11 +0100 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 3c244696f1f..57412007174 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -338,7 +338,7 @@ "hassio" = ps: with ps; [ aiohttp-cors pillow ]; "haveibeenpwned" = ps: with ps; [ ]; "hddtemp" = ps: with ps; [ ]; - "hdmi_cec" = ps: with ps; [ ]; # missing inputs: pyCEC + "hdmi_cec" = ps: with ps; [ pycec ]; "heatmiser" = ps: with ps; [ ]; # missing inputs: heatmiserV3 "heos" = ps: with ps; [ ]; # missing inputs: pyheos "here_travel_time" = ps: with ps; [ ]; # missing inputs: herepy