From 80bb54f0038358e5e99b2d6538ea245a00c58167 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 20 Dec 2023 09:11:27 +0100 Subject: [PATCH] python311Packages.gotailwind: init at 0.2.2 Module to communicate with Tailwind garage door openers https://github.com/frenck/python-gotailwind --- .../python-modules/gotailwind/default.nix | 79 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 81 insertions(+) create mode 100644 pkgs/development/python-modules/gotailwind/default.nix diff --git a/pkgs/development/python-modules/gotailwind/default.nix b/pkgs/development/python-modules/gotailwind/default.nix new file mode 100644 index 000000000000..8c86b44df353 --- /dev/null +++ b/pkgs/development/python-modules/gotailwind/default.nix @@ -0,0 +1,79 @@ +{ lib +, aiohttp +, aresponses +, awesomeversion +, backoff +, buildPythonPackage +, fetchFromGitHub +, mashumaro +, orjson +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, syrupy +, typer +, yarl +, zeroconf +}: + +buildPythonPackage rec { + pname = "gotailwind"; + version = "0.2.2"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchFromGitHub { + owner = "frenck"; + repo = "python-gotailwind"; + rev = "refs/tags/v${version}"; + hash = "sha256-JtMBud3iON4xLc9dQdXniv51EBqs7zkat8cYm3q0uEE="; + }; + + postPatch = '' + # Upstream doesn't set a version for the pyproject.toml + substituteInPlace pyproject.toml \ + --replace "0.0.0" "${version}" \ + --replace "--cov" "" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + awesomeversion + backoff + mashumaro + orjson + yarl + zeroconf + ]; + + passthru.optional-dependencies = { + cli = [ + typer + ]; + }; + + nativeCheckInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + syrupy + ]; + + pythonImportsCheck = [ + "gotailwind" + ]; + + meta = with lib; { + description = "Modul to communicate with Tailwind garage door openers"; + homepage = "https://github.com/frenck/python-gotailwind"; + changelog = "https://github.com/frenck/python-gotailwind/releases/tag/v$version"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3c40cdc0b7c9..65755eb6bb04 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4751,6 +4751,8 @@ self: super: with self; { googletrans = callPackage ../development/python-modules/googletrans { }; + gotailwind = callPackage ../development/python-modules/gotailwind { }; + gotenberg-client = callPackage ../development/python-modules/gotenberg-client { }; gorilla = callPackage ../development/python-modules/gorilla { };