From a5c95926e24497b11ccbd2b13a6b3844c629cf89 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 14 Jul 2024 15:15:25 -0400 Subject: [PATCH 1/4] python3Packages.attr: init at 0.3.2 --- .../python-modules/attr/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/attr/default.nix diff --git a/pkgs/development/python-modules/attr/default.nix b/pkgs/development/python-modules/attr/default.nix new file mode 100644 index 000000000000..5a6400d3e5e3 --- /dev/null +++ b/pkgs/development/python-modules/attr/default.nix @@ -0,0 +1,35 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + python, +}: + +buildPythonPackage rec { + pname = "attr"; + version = "0.3.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "denis-ryzhkov"; + repo = "attr"; + rev = version; + hash = "sha256-1gOAONDuZb7xEPFZJc00BRtFF06uX65S8b3RRRNGeSo="; + }; + + build-system = [ setuptools ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} -c "import dry_attr; dry_attr.test()" + runHook postCheck + ''; + + meta = { + description = "Simple decorator to set attributes of target function or class in a DRY way."; + homepage = "https://github.com/denis-ryzhkov/attr"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ pyrox0 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4ead26c9e215..a9975dcde412 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -945,6 +945,8 @@ self: super: with self; { attacut = callPackage ../development/python-modules/attacut { }; + attr = callPackage ../development/python-modules/attr { }; + attrdict = callPackage ../development/python-modules/attrdict { }; attrs = callPackage ../development/python-modules/attrs { }; From b63730c7aec6f63457d6feb87895c4855c505b8b Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 14 Jul 2024 15:15:43 -0400 Subject: [PATCH 2/4] python3Packages.aws-request-signer: init at 1.2.0 --- .../aws-request-signer/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/aws-request-signer/default.nix diff --git a/pkgs/development/python-modules/aws-request-signer/default.nix b/pkgs/development/python-modules/aws-request-signer/default.nix new file mode 100644 index 000000000000..065e4a2c166f --- /dev/null +++ b/pkgs/development/python-modules/aws-request-signer/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + poetry-core, + requests, + requests-toolbelt, +}: + +buildPythonPackage rec { + pname = "aws-request-signer"; + version = "1.2.0"; + pyproject = true; + + src = fetchPypi { + inherit version; + pname = "aws_request_signer"; + hash = "sha256-DVorDO0wz94Fhduax7VsQZ5B5SnBfsHQoLoW4m6Ce+U="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "poetry>=0.12" poetry-core \ + --replace-fail poetry.masonry.api poetry.core.masonry.api + ''; + + build-system = [ poetry-core ]; + + dependencies = [ + requests + requests-toolbelt + ]; + + doCheck = false; + + meta = { + changelog = "https://github.com/iksteen/aws-request-signer/releases/tag/${version}"; + description = "Python library to sign AWS requests using AWS Signature V4."; + homepage = "https://github.com/iksteen/aws-request-signer"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ pyrox0 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a9975dcde412..7b4ab784a1d1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1064,6 +1064,8 @@ self: super: with self; { aws-lambda-builders = callPackage ../development/python-modules/aws-lambda-builders { }; + aws-request-signer = callPackage ../development/python-modules/aws-request-signer { }; + aws-sam-translator = callPackage ../development/python-modules/aws-sam-translator { }; aws-secretsmanager-caching = callPackage ../development/python-modules/aws-secretsmanager-caching { }; From e649bb884f959997003597087b9a058cc3453297 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 14 Jul 2024 15:15:56 -0400 Subject: [PATCH 3/4] python3Packages.aioaquacell: init at 0.2.0 --- .../python-modules/aioaquacell/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/aioaquacell/default.nix diff --git a/pkgs/development/python-modules/aioaquacell/default.nix b/pkgs/development/python-modules/aioaquacell/default.nix new file mode 100644 index 000000000000..542dbee66733 --- /dev/null +++ b/pkgs/development/python-modules/aioaquacell/default.nix @@ -0,0 +1,48 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + aiobotocore, + aiohttp, + attr, + aws-request-signer, + botocore, + requests-aws4auth, + pycognito, +}: + +buildPythonPackage rec { + pname = "aioaquacell"; + version = "0.2.0"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-n2kPD1t5d/nf43rB0q1hNNYdHeaBiadsFWTmu1bYN1A="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + aiobotocore + attr + aws-request-signer + botocore + requests-aws4auth + pycognito + ]; + + pythonImportsCheck = [ "aioaquacell" ]; + + doCheck = false; + + meta = { + changelog = "https://github.com/Jordi1990/aioaquacell/releases/tag/v${version}"; + description = "Asynchronous library to retrieve details of your Aquacell water softener device."; + homepage = "https://github.com/Jordi1990/aioaquacell"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ pyrox0 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7b4ab784a1d1..e12bfbe7a909 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -157,6 +157,8 @@ self: super: with self; { aioapns = callPackage ../development/python-modules/aioapns { }; + aioaquacell = callPackage ../development/python-modules/aioaquacell { }; + aiocron = callPackage ../development/python-modules/aiocron { }; ailment = callPackage ../development/python-modules/ailment { }; From 294c9eeaaa4a1c3e132a03ea0d941ac9ed108178 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 14 Jul 2024 15:16:50 -0400 Subject: [PATCH 4/4] home-assistant: support aquacell component --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 77e03da4ae00..f072c83555e5 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -219,11 +219,12 @@ apsystems-ez1 ]; "aquacell" = ps: with ps; [ + aioaquacell fnv-hash-fast ifaddr psutil-home-assistant sqlalchemy - ]; # missing inputs: aioaquacell + ]; "aqualogic" = ps: with ps; [ aqualogic ]; @@ -5274,6 +5275,7 @@ "aprilaire" "aprs" "apsystems" + "aquacell" "aranet" "arcam_fmj" "aseko_pool_live"