diff --git a/pkgs/development/python-modules/aiolifx-themes/default.nix b/pkgs/development/python-modules/aiolifx-themes/default.nix new file mode 100644 index 000000000000..4aeec041c043 --- /dev/null +++ b/pkgs/development/python-modules/aiolifx-themes/default.nix @@ -0,0 +1,58 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, aiolifx +, poetry-core +, pytest-asyncio +, pytestCheckHook +, async-timeout +, typer +}: + +buildPythonPackage rec { + pname = "aiolifx-themes"; + version = "0.2.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Djelibeybi"; + repo = "aiolifx-themes"; + rev = "v${version}"; + hash = "sha256:17498vdg8i20hk4i8hzc67qaj206ik3s1zn1k70plsjr9zlgs6vz"; + }; + + prePatch = '' + # Don't run coverage, or depend on typer for no reason. + substituteInPlace pyproject.toml \ + --replace " --cov=aiolifx_themes --cov-report=term-missing:skip-covered" "" \ + --replace "typer = " "# unused: typer = " + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiolifx + ]; + + checkInputs = [ + async-timeout + pytestCheckHook + pytest-asyncio + ]; + + pythonImportsCheck = [ + "aiolifx_themes" + ]; + + meta = with lib; { + description = "Color themes for LIFX lights running on aiolifx"; + homepage = "https://github.com/Djelibeybi/aiolifx-themes"; + license = licenses.mit; + maintainers = with maintainers; [ lukegb ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2ca70dc4dd6f..ae46e21fd2e1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -238,6 +238,8 @@ self: super: with self; { aiolifx-effects = callPackage ../development/python-modules/aiolifx-effects { }; + aiolifx-themes = callPackage ../development/python-modules/aiolifx-themes { }; + aiolimiter = callPackage ../development/python-modules/aiolimiter { }; aiolip = callPackage ../development/python-modules/aiolip { };