From b1a3472f535db83dd16e5bf924a047536e919cd0 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 15:15:30 +0300 Subject: [PATCH 1/7] python3Packages.rich-tables: use finalAttrs --- .../python-modules/rich-tables/default.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/rich-tables/default.nix b/pkgs/development/python-modules/rich-tables/default.nix index 2c7d29b51316..966421a7ccf6 100644 --- a/pkgs/development/python-modules/rich-tables/default.nix +++ b/pkgs/development/python-modules/rich-tables/default.nix @@ -12,17 +12,14 @@ typing-extensions, rgbxy ? null, }: -let - version = "0.8.0"; -in -buildPythonPackage { +buildPythonPackage (finalAttrs: { pname = "rich-tables"; - inherit version; + version = "0.8.0"; pyproject = true; src = fetchPypi { pname = "rich_tables"; - inherit version; + inherit (finalAttrs) version; hash = "sha256-MN8QH6kLyogbcQ0VE9U034cwSFnaFDB2/Rnvy1DYyl4="; }; @@ -63,4 +60,4 @@ buildPythonPackage { ]; mainProgram = "table"; }; -} +}) From a23c6d076b3408421c4ad4d494c307bcb2a1eb37 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 15:16:51 +0300 Subject: [PATCH 2/7] python3.pkgs.rich-tables: categorize inputs --- pkgs/development/python-modules/rich-tables/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/rich-tables/default.nix b/pkgs/development/python-modules/rich-tables/default.nix index 966421a7ccf6..bde88d71f265 100644 --- a/pkgs/development/python-modules/rich-tables/default.nix +++ b/pkgs/development/python-modules/rich-tables/default.nix @@ -2,7 +2,11 @@ lib, buildPythonPackage, fetchPypi, + + # build-system poetry-core, + + # dependencies coloraide, humanize, multimethod, @@ -10,6 +14,8 @@ rich, sqlparse, typing-extensions, + + # passthru rgbxy ? null, }: buildPythonPackage (finalAttrs: { From 259101b58dbc5d4b69beab747622190d25d7d4cd Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 15:21:23 +0300 Subject: [PATCH 3/7] python3.pkgs.rich-tables: switch to GitHub --- .../python-modules/rich-tables/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/rich-tables/default.nix b/pkgs/development/python-modules/rich-tables/default.nix index bde88d71f265..78544f2c8643 100644 --- a/pkgs/development/python-modules/rich-tables/default.nix +++ b/pkgs/development/python-modules/rich-tables/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, # build-system poetry-core, @@ -23,10 +23,11 @@ buildPythonPackage (finalAttrs: { version = "0.8.0"; pyproject = true; - src = fetchPypi { - pname = "rich_tables"; - inherit (finalAttrs) version; - hash = "sha256-MN8QH6kLyogbcQ0VE9U034cwSFnaFDB2/Rnvy1DYyl4="; + src = fetchFromGitHub { + owner = "snejus"; + repo = "rich-tables"; + tag = finalAttrs.version; + hash = "sha256-rqzqquVs0zWcAmwmsmw7BLgeyXpzFI6pAhY+K1l/fL4="; }; build-system = [ From dd44e5502893b375728629c110eb0716e549298b Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 15:30:27 +0300 Subject: [PATCH 4/7] python3.pkgs.rgbxy: init at 0.5-unstable-2025-12-16 --- .../python-modules/rgbxy/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/rgbxy/default.nix diff --git a/pkgs/development/python-modules/rgbxy/default.nix b/pkgs/development/python-modules/rgbxy/default.nix new file mode 100644 index 000000000000..df9b072c3ae7 --- /dev/null +++ b/pkgs/development/python-modules/rgbxy/default.nix @@ -0,0 +1,37 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "rgbxy"; + # version 0.5 suffix is based upon pypi version not tagged on GitHub, see: + # - https://pypi.org/project/rgbxy/ + # - https://github.com/benknight/hue-python-rgb-converter/tags + version = "0.5-unstable-2025-12-16"; + pyproject = true; + + src = fetchFromGitHub { + owner = "benknight"; + repo = "hue-python-rgb-converter"; + rev = "22a09c3c7d395b6e7b91b5f82944ccf1a7e9e47a"; + hash = "sha256-J14vg/kDF1TuLt6kTNHN/5qxqDHbxkdGkqEAn3V57nU="; + }; + + build-system = [ + setuptools + ]; + + pythonImportsCheck = [ + "rgbxy" + ]; + + meta = { + description = "RGB conversion tool written in Python for Philips Hue"; + homepage = "https://github.com/benknight/hue-python-rgb-converter"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ doronbehar ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2602606f955b..612ff393b886 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16914,6 +16914,8 @@ self: super: with self; { rflink = callPackage ../development/python-modules/rflink { }; + rgbxy = callPackage ../development/python-modules/rgbxy { }; + rgpio = toPythonModule ( pkgs.lgpio.override { inherit buildPythonPackage; From 5374caf52296135d668a80bb3b9fc1eb0cf0cdf5 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 15:31:21 +0300 Subject: [PATCH 5/7] python3.pkgs.rich-tables: remove ? null from rgbxy argument --- pkgs/development/python-modules/rich-tables/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/rich-tables/default.nix b/pkgs/development/python-modules/rich-tables/default.nix index 78544f2c8643..ede213a60940 100644 --- a/pkgs/development/python-modules/rich-tables/default.nix +++ b/pkgs/development/python-modules/rich-tables/default.nix @@ -16,7 +16,7 @@ typing-extensions, # passthru - rgbxy ? null, + rgbxy, }: buildPythonPackage (finalAttrs: { pname = "rich-tables"; From 80e069f3e175f01a46b46ef474f8d4564f932331 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 15:32:52 +0300 Subject: [PATCH 6/7] python3.pkgs.rich-tables: enable tests --- .../python-modules/rich-tables/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/rich-tables/default.nix b/pkgs/development/python-modules/rich-tables/default.nix index ede213a60940..d9bd75de0a9e 100644 --- a/pkgs/development/python-modules/rich-tables/default.nix +++ b/pkgs/development/python-modules/rich-tables/default.nix @@ -15,6 +15,11 @@ sqlparse, typing-extensions, + # tests + pytestCheckHook, + pytest-cov-stub, + freezegun, + # passthru rgbxy, }: @@ -44,6 +49,13 @@ buildPythonPackage (finalAttrs: { typing-extensions ]; + nativeBuildInputs = [ + pytestCheckHook + pytest-cov-stub + freezegun + ] + ++ finalAttrs.finalPackage.passthru.optional-dependencies.hue; + optional-dependencies = { hue = [ rgbxy From 09a21a4890c3bae34fe71cf2f058691b909b3f33 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 19 Apr 2026 15:33:05 +0300 Subject: [PATCH 7/7] python3Packages.rich-tables: 0.8.0 -> 0.9.0 Diff: https://github.com/snejus/rich-tables/compare/0.8.0...0.9.0 --- pkgs/development/python-modules/rich-tables/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rich-tables/default.nix b/pkgs/development/python-modules/rich-tables/default.nix index d9bd75de0a9e..7fd8038aa9d8 100644 --- a/pkgs/development/python-modules/rich-tables/default.nix +++ b/pkgs/development/python-modules/rich-tables/default.nix @@ -8,6 +8,7 @@ # dependencies coloraide, + decorator, humanize, multimethod, platformdirs, @@ -25,14 +26,14 @@ }: buildPythonPackage (finalAttrs: { pname = "rich-tables"; - version = "0.8.0"; + version = "0.9.0"; pyproject = true; src = fetchFromGitHub { owner = "snejus"; repo = "rich-tables"; tag = finalAttrs.version; - hash = "sha256-rqzqquVs0zWcAmwmsmw7BLgeyXpzFI6pAhY+K1l/fL4="; + hash = "sha256-6sXWrFP8TDBcFaGCymsZfHL8bfsRbj63VZCeY1H6h/Y="; }; build-system = [ @@ -41,6 +42,7 @@ buildPythonPackage (finalAttrs: { dependencies = [ coloraide + decorator humanize multimethod platformdirs