diff --git a/pkgs/development/python-modules/motionblinds/default.nix b/pkgs/development/python-modules/motionblinds/default.nix new file mode 100644 index 000000000000..a8fb0ae58dd4 --- /dev/null +++ b/pkgs/development/python-modules/motionblinds/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pycryptodomex +, pythonOlder +}: + +buildPythonPackage rec { + pname = "motionblinds"; + version = "0.5.8.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "starkillerOG"; + repo = "motion-blinds"; + rev = version; + sha256 = "6aSwUuH5IpfcuVGXWVmb0DHglsUtGh/ATOe6iih6fXk="; + }; + + propagatedBuildInputs = [ + pycryptodomex + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "motionblinds" + ]; + + meta = with lib; { + description = "Python library for interfacing with Motion Blinds"; + homepage = "https://github.com/starkillerOG/motion-blinds"; + 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 37b078adefa1..20bbdaadbf0e 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -533,7 +533,7 @@ "mold_indicator" = ps: with ps; [ ]; "monoprice" = ps: with ps; [ ]; # missing inputs: pymonoprice "moon" = ps: with ps; [ ]; - "motion_blinds" = ps: with ps; [ aiohttp-cors ifaddr ]; # missing inputs: motionblinds + "motion_blinds" = ps: with ps; [ aiohttp-cors ifaddr motionblinds ]; "motioneye" = ps: with ps; [ aiohttp-cors motioneye-client ]; "mpchc" = ps: with ps; [ ]; "mpd" = ps: with ps; [ mpd2 ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 59d2ee364b23..688afc5baa0a 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -520,6 +520,7 @@ in with py.pkgs; buildPythonApplication rec { "modbus" "mold_indicator" "moon" + "motion_blinds" "motioneye" "mqtt" "mqtt_eventstream" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7f4e596ec356..b33949f62cca 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4874,6 +4874,8 @@ in { mortgage = callPackage ../development/python-modules/mortgage { }; + motionblinds = callPackage ../development/python-modules/motionblinds { }; + motioneye-client = callPackage ../development/python-modules/motioneye-client { }; moto = callPackage ../development/python-modules/moto { };