From 5afbc8074215c086acbc251070476eeb27009a57 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 15 Jul 2024 23:36:29 +0200 Subject: [PATCH 1/4] python312Packages.pyindego: 3.1.1 -> 3.2.1 https://github.com/sander1988/pyIndego/releases/tag/3.2.0 https://github.com/sander1988/pyIndego/releases/tag/3.2.1 --- .../python-modules/pyindego/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyindego/default.nix b/pkgs/development/python-modules/pyindego/default.nix index 98e5e3ba6ee6..2f2ceb9d59a1 100644 --- a/pkgs/development/python-modules/pyindego/default.nix +++ b/pkgs/development/python-modules/pyindego/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, # build-system setuptools, @@ -20,15 +20,20 @@ buildPythonPackage rec { pname = "pyindego"; - version = "3.1.1"; + version = "3.2.1"; pyproject = true; - src = fetchPypi { - pname = "pyIndego"; - inherit version; - hash = "sha256-lRDi6qYMaPI8SiSNe0vzlKb92axujt44aei8opNPDug="; + src = fetchFromGitHub { + owner = "jm-73"; + repo = "pyIndego"; + rev = "refs/tags/${version}"; + hash = "sha256-wPQocacWwWjEH4boMZ33aW/NPvdD6LSmMTFXGwBwwq8="; }; + postPatch = '' + sed -i "/addopts/d" pytest.ini + ''; + build-system = [ setuptools ]; dependencies = [ From 9f03c0e1906f698e04d35c5e5cc6a180ae49d6c3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 15 Jul 2024 23:54:19 +0200 Subject: [PATCH 2/4] buildHomeAssistantComponent: catch invalid requirements Catch, log and ignore requirement specifiers that cannot be parsed. --- .../build-custom-component/check_manifest.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/home-assistant/build-custom-component/check_manifest.py b/pkgs/servers/home-assistant/build-custom-component/check_manifest.py index 463a7579763d..a8fd9505e52f 100644 --- a/pkgs/servers/home-assistant/build-custom-component/check_manifest.py +++ b/pkgs/servers/home-assistant/build-custom-component/check_manifest.py @@ -5,17 +5,21 @@ import os import sys import importlib_metadata -from packaging.requirements import Requirement +from packaging.requirements import InvalidRequirement, Requirement -def error(msg: str) -> None: +def error(msg: str, ret: bool = False) -> None: print(f" - {msg}", file=sys.stderr) - return False + return ret def check_requirement(req: str): # https://packaging.pypa.io/en/stable/requirements.html - requirement = Requirement(req) + try: + requirement = Requirement(req) + except InvalidRequirement: + return error(f"{req} could not be parsed", ret=True) + try: version = importlib_metadata.distribution(requirement.name).version except importlib_metadata.PackageNotFoundError: From a5e3f9ca8531d5061bda061356c93feca3548ca6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 15 Jul 2024 23:55:10 +0200 Subject: [PATCH 3/4] home-assistant-custom-components.indego: 5.5.0 -> 5.7.2 https://github.com/jm-73/Indego/releases/tag/5.7.2 --- .../home-assistant/custom-components/indego/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/home-assistant/custom-components/indego/default.nix b/pkgs/servers/home-assistant/custom-components/indego/default.nix index 657d8b80a862..607590e5bc3d 100644 --- a/pkgs/servers/home-assistant/custom-components/indego/default.nix +++ b/pkgs/servers/home-assistant/custom-components/indego/default.nix @@ -8,13 +8,13 @@ buildHomeAssistantComponent rec { owner = "jm-73"; domain = "indego"; - version = "5.5.0"; + version = "5.7.2"; src = fetchFromGitHub { owner = "jm-73"; repo = "Indego"; rev = "refs/tags/${version}"; - hash = "sha256-ur6KOqU6KAseABL0ibpGJ6109wSSZq9HWSVbMIrRSqc="; + hash = "sha256-9q8aHbAMIA2xKhZl/CDXWSV1ylDCEVkpL8OUlELoG0Q="; }; dependencies = [ pyindego ]; @@ -23,8 +23,7 @@ buildHomeAssistantComponent rec { description = "Bosch Indego lawn mower component"; changelog = "https://github.com/jm-73/Indego/releases/tag/${version}"; homepage = "https://github.com/jm-73/Indego"; - # https://github.com/jm-73/pyIndego/issues/125 - license = licenses.unfree; + license = licenses.asl20; maintainers = with maintainers; [ hexa ]; }; } From ad66fdb844883bd9516e926ed71d57741c073366 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 18 Jul 2024 15:48:17 +0200 Subject: [PATCH 4/4] Revert "python3Packages.tuya-device-sharing-sdk: 0.1.9 -> 0.2.0" This reverts commit 7942f69fa18783077851ba7fc61d566098b94591. This version is not compatible with the tuya_local component, its only reverse dependency. --- .../python-modules/tuya-device-sharing-sdk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix b/pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix index 3179f22b5a5e..c831f7a0108c 100644 --- a/pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix +++ b/pkgs/development/python-modules/tuya-device-sharing-sdk/default.nix @@ -9,14 +9,14 @@ }: let pname = "tuya-device-sharing-sdk"; - version = "0.2.0"; + version = "0.1.9"; in buildPythonPackage { inherit pname version; src = fetchPypi { inherit pname version; - hash = "sha256-fu8zh59wlnxtstNbNL8mIm10tiXy22oPbi6oUy5x8c8="; + hash = "sha256-mBKR+ttBo0VF33pEmYdjbyM4bGgyDiYexIIsf8mXZW4="; }; # workaround needed, upstream issue: https://github.com/tuya/tuya-device-sharing-sdk/issues/10