diff --git a/pkgs/development/python-modules/aiolivisi/default.nix b/pkgs/development/python-modules/aiolivisi/default.nix new file mode 100644 index 000000000000..dff6c28e530a --- /dev/null +++ b/pkgs/development/python-modules/aiolivisi/default.nix @@ -0,0 +1,49 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchPypi +, pydantic +, pytestCheckHook +, pythonOlder +, websockets +}: + +buildPythonPackage rec { + pname = "aiolivisi"; + version = "0.0.14"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-n7EQCOItr6MZRnTCfkJrq39bDbw09XyIRzSuZR2TsNg="; + }; + + postPatch = '' + # https://github.com/StefanIacobLivisi/aiolivisi/pull/3 + substituteInPlace setup.py \ + --replace 'REQUIREMENTS = list(val.strip() for val in open("requirements.txt"))' "" \ + --replace "REQUIREMENTS," "[]," + ''; + + propagatedBuildInputs = [ + aiohttp + pydantic + websockets + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "aiolivisi" + ]; + + meta = with lib; { + description = "Module to communicate with LIVISI Smart Home Controller"; + homepage = "https://github.com/StefanIacobLivisi/aiolivisi"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index de076425e89b..79f8f886022f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -244,6 +244,8 @@ self: super: with self; { aiolip = callPackage ../development/python-modules/aiolip { }; + aiolivisi = callPackage ../development/python-modules/aiolivisi { }; + aiolyric = callPackage ../development/python-modules/aiolyric { }; aiomisc = callPackage ../development/python-modules/aiomisc { };