diff --git a/pkgs/development/python-modules/epaper-dithering/default.nix b/pkgs/development/python-modules/epaper-dithering/default.nix new file mode 100644 index 000000000000..be30e1abe96b --- /dev/null +++ b/pkgs/development/python-modules/epaper-dithering/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + numpy, + pillow, + pytestCheckHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "epaper-dithering"; + version = "0.6.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "OpenDisplay"; + repo = "epaper-dithering"; + tag = "python-v${finalAttrs.version}"; + hash = "sha256-h84AgWJR8zVuwoz02A3U82yTOw4MSK9DjaxkYi0nWkM="; + }; + + sourceRoot = "${finalAttrs.src.name}/packages/python"; + + build-system = [ hatchling ]; + + dependencies = [ + numpy + pillow + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "epaper_dithering" ]; + + meta = { + description = "Dithering algorithms for e-paper/e-ink displays"; + homepage = "https://github.com/OpenDisplay/epaper-dithering"; + changelog = "https://github.com/OpenDisplay/epaper-dithering/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/development/python-modules/py-opendisplay/default.nix b/pkgs/development/python-modules/py-opendisplay/default.nix new file mode 100644 index 000000000000..bd4e2f61fae7 --- /dev/null +++ b/pkgs/development/python-modules/py-opendisplay/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + bleak, + bleak-retry-connector, + epaper-dithering, + numpy, + pillow, + pytestCheckHook, + pytest-asyncio, +}: + +buildPythonPackage (finalAttrs: { + pname = "py-opendisplay"; + version = "5.5.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "OpenDisplay"; + repo = "py-opendisplay"; + tag = "v${finalAttrs.version}"; + hash = "sha256-pPV4Ir9GK++66qq5QGnwyjpBinK7EvI7C7HB14tFDXU="; + }; + + build-system = [ hatchling ]; + + dependencies = [ + bleak + bleak-retry-connector + epaper-dithering + numpy + pillow + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + pythonImportsCheck = [ "opendisplay" ]; + + meta = { + description = "Python library for communicating with OpenDisplay BLE e-paper displays"; + homepage = "https://github.com/OpenDisplay/py-opendisplay"; + changelog = "https://github.com/OpenDisplay/py-opendisplay/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 33151b50d0d1..4b732b12950a 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4536,11 +4536,12 @@ home-assistant-intents ifaddr mutagen + py-opendisplay pymicro-vad pyserial pyspeex-noise zeroconf - ]; # missing inputs: py-opendisplay + ]; "openerz" = ps: with ps; [ openerz-api @@ -8018,6 +8019,7 @@ "open_router" "openai_conversation" "openalpr_cloud" + "opendisplay" "openerz" "openevse" "openexchangerates" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e1748f59d1b4..34f01c882d61 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5054,6 +5054,8 @@ self: super: with self; { enzyme = callPackage ../development/python-modules/enzyme { }; + epaper-dithering = callPackage ../development/python-modules/epaper-dithering { }; + epc = callPackage ../development/python-modules/epc { }; ephem = callPackage ../development/python-modules/ephem { }; @@ -13147,6 +13149,8 @@ self: super: with self; { py-ocsf-models = callPackage ../development/python-modules/py-ocsf-models { }; + py-opendisplay = callPackage ../development/python-modules/py-opendisplay { }; + py-opensonic = callPackage ../development/python-modules/py-opensonic { }; py-partiql-parser = callPackage ../development/python-modules/py-partiql-parser { };