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/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 1a3b2dd219a..5cca098b22c 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 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bf945718ae8..fd2c9215573 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5321,6 +5321,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 { };