From 8b0b0e29ef20987adbf7b1bf0e7ebd704bd2f4d9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 May 2024 11:23:22 +0200 Subject: [PATCH 1/5] python312Packages.ha-mqtt-discoverable: 0.13.1 -> 0.14.0 Diff: https://github.com/unixorn/ha-mqtt-discoverable/compare/refs/tags/v0.13.1...v0.14.0 Changelog: https://github.com/unixorn/ha-mqtt-discoverable/releases/tag/v0.14.0 --- .../ha-mqtt-discoverable/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix b/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix index 1420362dc622..f72ae973f52f 100644 --- a/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix +++ b/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix @@ -7,12 +7,13 @@ , pyaml , pydantic , pythonOlder +, pythonRelaxDepsHook , thelogrus }: buildPythonPackage rec { pname = "ha-mqtt-discoverable"; - version = "0.13.1"; + version = "0.14.0"; pyproject = true; disabled = pythonOlder "3.10"; @@ -21,14 +22,22 @@ buildPythonPackage rec { owner = "unixorn"; repo = "ha-mqtt-discoverable"; rev = "refs/tags/v${version}"; - hash = "sha256-Ue8az6Q7uU02IJJyyHk64Ji4J6sf/bShvTeHhN9U92Y="; + hash = "sha256-vL4EzeU+8nUPyLR22MJtLhknWF4DWMo49EKvkIqIWhA="; }; - nativeBuildInputs = [ + pythonRelaxDeps = [ + "pyaml" + ]; + + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + dependencies = [ gitlike-commands paho-mqtt pyaml @@ -49,6 +58,5 @@ buildPythonPackage rec { changelog = "https://github.com/unixorn/ha-mqtt-discoverable/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; - broken = versionAtLeast pydantic.version "2"; }; } From c557f4b5064cd211111b40756b792ea87ffc5be8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 May 2024 11:24:16 +0200 Subject: [PATCH 2/5] python312Packages.ha-mqtt-discoverable: format with nixfmt --- .../ha-mqtt-discoverable/default.nix | 39 ++++++++----------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix b/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix index f72ae973f52f..40c61f8a7dc9 100644 --- a/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix +++ b/pkgs/development/python-modules/ha-mqtt-discoverable/default.nix @@ -1,14 +1,15 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, gitlike-commands -, paho-mqtt -, poetry-core -, pyaml -, pydantic -, pythonOlder -, pythonRelaxDepsHook -, thelogrus +{ + lib, + buildPythonPackage, + fetchFromGitHub, + gitlike-commands, + paho-mqtt, + poetry-core, + pyaml, + pydantic, + pythonOlder, + pythonRelaxDepsHook, + thelogrus, }: buildPythonPackage rec { @@ -25,17 +26,11 @@ buildPythonPackage rec { hash = "sha256-vL4EzeU+8nUPyLR22MJtLhknWF4DWMo49EKvkIqIWhA="; }; - pythonRelaxDeps = [ - "pyaml" - ]; + pythonRelaxDeps = [ "pyaml" ]; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; dependencies = [ gitlike-commands @@ -48,9 +43,7 @@ buildPythonPackage rec { # Test require a running Mosquitto instance doCheck = false; - pythonImportsCheck = [ - "ha_mqtt_discoverable" - ]; + pythonImportsCheck = [ "ha_mqtt_discoverable" ]; meta = with lib; { description = "Python module to create MQTT entities that are automatically discovered by Home Assistant"; From 8019631e2cf36a40eecb5c5c723eaa2169e32d10 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 May 2024 11:32:48 +0200 Subject: [PATCH 3/5] ha-mqtt-discoverable-cli: refactor --- pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix b/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix index 2087a5f41038..c4d79845398d 100644 --- a/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix +++ b/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix @@ -15,11 +15,11 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-miFlrBmxVuIJjpsyYnbQt+QAGSrS4sHlJpCmxouM2Wc="; }; - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ poetry-core ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ ha-mqtt-discoverable ]; @@ -33,7 +33,7 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "CLI for creating Home Assistant compatible MQTT entities that will be automatically discovered"; homepage = "https://github.com/unixorn/ha-mqtt-discoverable-cli"; - changelog = "https://github.com/unixorn/ha-mqtt-discoverable-cli/releases/tag/v0.2.1"; + changelog = "https://github.com/unixorn/ha-mqtt-discoverable-cli/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; mainProgram = "hmd"; From a148717df38668417e964c1e15ef99340fd4d4ac Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 May 2024 11:34:20 +0200 Subject: [PATCH 4/5] ha-mqtt-discoverable-cli: 0.2.1 -> 0.4.1 Diff: https://github.com/unixorn/ha-mqtt-discoverable-cli/compare/refs/tags/v0.2.1...v0.4.1 Changelog: https://github.com/unixorn/ha-mqtt-discoverable-cli/releases/tag/v0.4.1 --- pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix b/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix index c4d79845398d..99985f6ea2ac 100644 --- a/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix +++ b/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix @@ -5,20 +5,28 @@ python3.pkgs.buildPythonApplication rec { pname = "ha-mqtt-discoverable-cli"; - version = "0.2.1"; + version = "0.4.1"; pyproject = true; src = fetchFromGitHub { owner = "unixorn"; repo = "ha-mqtt-discoverable-cli"; rev = "refs/tags/v${version}"; - hash = "sha256-miFlrBmxVuIJjpsyYnbQt+QAGSrS4sHlJpCmxouM2Wc="; + hash = "sha256-rGRsB5kAtzI5KP4tMiQqLJQZs7z5k657V8Di0OzB6F8="; }; + pythonRelaxDeps = [ + "ha-mqtt-discoverable" + ]; + build-system = with python3.pkgs; [ poetry-core ]; + nativeBuildInputs = with python3.pkgs; [ + pythonRelaxDepsHook + ]; + dependencies = with python3.pkgs; [ ha-mqtt-discoverable ]; From 4a8c10751e7e261850ddf203d2e5b728b224b051 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 May 2024 11:35:17 +0200 Subject: [PATCH 5/5] ha-mqtt-discoverable-cli: format with nixfmt --- .../ha/ha-mqtt-discoverable-cli/package.nix | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix b/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix index 99985f6ea2ac..b3f2528ce2a2 100644 --- a/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix +++ b/pkgs/by-name/ha/ha-mqtt-discoverable-cli/package.nix @@ -1,6 +1,7 @@ -{ lib -, python3 -, fetchFromGitHub +{ + lib, + fetchFromGitHub, + python3, }: python3.pkgs.buildPythonApplication rec { @@ -15,28 +16,18 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-rGRsB5kAtzI5KP4tMiQqLJQZs7z5k657V8Di0OzB6F8="; }; - pythonRelaxDeps = [ - "ha-mqtt-discoverable" - ]; + pythonRelaxDeps = [ "ha-mqtt-discoverable" ]; - build-system = with python3.pkgs; [ - poetry-core - ]; + build-system = with python3.pkgs; [ poetry-core ]; - nativeBuildInputs = with python3.pkgs; [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = with python3.pkgs; [ pythonRelaxDepsHook ]; - dependencies = with python3.pkgs; [ - ha-mqtt-discoverable - ]; + dependencies = with python3.pkgs; [ ha-mqtt-discoverable ]; # Project has no real tests doCheck = false; - pythonImportsCheck = [ - "ha_mqtt_discoverable_cli" - ]; + pythonImportsCheck = [ "ha_mqtt_discoverable_cli" ]; meta = with lib; { description = "CLI for creating Home Assistant compatible MQTT entities that will be automatically discovered";