diff --git a/pkgs/development/python-modules/aiolip/default.nix b/pkgs/development/python-modules/aiolip/default.nix new file mode 100644 index 00000000000..1db1ae1cf03 --- /dev/null +++ b/pkgs/development/python-modules/aiolip/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiolip"; + version = "1.1.4"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "bdraco"; + repo = pname; + rev = version; + sha256 = "1f8mlvbnfcn3sigsmjdpdpgxmnbvcjhfr7lzch61i8sy25dgakji"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py --replace "'pytest-runner'," "" + ''; + + pythonImportsCheck = [ "aiolip" ]; + + meta = with lib; { + description = "Python module for the Lutron Integration Protocol"; + homepage = "https://github.com/bdraco/aiolip"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pylutron-caseta/default.nix b/pkgs/development/python-modules/pylutron-caseta/default.nix new file mode 100644 index 00000000000..aa2182c176d --- /dev/null +++ b/pkgs/development/python-modules/pylutron-caseta/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, cryptography +, fetchFromGitHub +, pytest-asyncio +, pytest-sugar +, pytest-timeout +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pylutron-caseta"; + version = "0.9.0"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "gurumitts"; + repo = pname; + rev = "v${version}"; + sha256 = "07mz4hn0455qmfqs4xcqlhbf3qvrnmifd0vzpcqlqaqcn009iahq"; + }; + + propagatedBuildInputs = [ + cryptography + ]; + + checkInputs = [ + pytest-asyncio + pytest-sugar + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ "pylutron_caseta" ]; + + meta = with lib; { + description = "Python module o control Lutron Caseta devices"; + homepage = "https://github.com/gurumitts/pylutron-caseta"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index a8000142298..90ab48d6776 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -467,7 +467,7 @@ "luftdaten" = ps: with ps; [ luftdaten ]; "lupusec" = ps: with ps; [ ]; # missing inputs: lupupy "lutron" = ps: with ps; [ pylutron ]; - "lutron_caseta" = ps: with ps; [ ]; # missing inputs: aiolip pylutron-caseta + "lutron_caseta" = ps: with ps; [ aiolip pylutron-caseta ]; "lw12wifi" = ps: with ps; [ ]; # missing inputs: lw12 "lyft" = ps: with ps; [ ]; # missing inputs: lyft_rides "lyric" = ps: with ps; [ aiohttp-cors aiolyric ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index f71a5018291..d44c1f6d38c 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -269,6 +269,7 @@ in with py.pkgs; buildPythonApplication rec { "logentries" "logger" "lovelace" + "lutron_caseta" "manual" "manual_mqtt" "mazda" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fda0e0896b3..f13a3b3d8f3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -303,6 +303,8 @@ in { aiolifx-effects = callPackage ../development/python-modules/aiolifx-effects { }; + aiolip = callPackage ../development/python-modules/aiolip { }; + aiolyric = callPackage ../development/python-modules/aiolyric { }; aiomultiprocess = callPackage ../development/python-modules/aiomultiprocess { }; @@ -5991,6 +5993,8 @@ in { pylutron = callPackage ../development/python-modules/pylutron { }; + pylutron-caseta = callPackage ../development/python-modules/pylutron-caseta { }; + pylxd = callPackage ../development/python-modules/pylxd { }; pymacaroons = callPackage ../development/python-modules/pymacaroons { };