From 9b3f5ed2e3c399ef77c42bdfe3d312e806392f7a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 21 Nov 2025 02:22:18 +0100 Subject: [PATCH 1/2] Revert "python3Packages.pytricia: remove" This reverts commit 9c6c3d6043f8be547a7669a598f32c2d7e10ce40. Maintainance has been picked up again and I find this package quite useful for fast prefix lookups. --- .../python-modules/pytricia/default.nix | 25 +++++++++++++++++++ pkgs/top-level/python-aliases.nix | 1 - pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/pytricia/default.nix diff --git a/pkgs/development/python-modules/pytricia/default.nix b/pkgs/development/python-modules/pytricia/default.nix new file mode 100644 index 000000000000..d2caf52c6010 --- /dev/null +++ b/pkgs/development/python-modules/pytricia/default.nix @@ -0,0 +1,25 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, +}: + +buildPythonPackage { + pname = "pytricia"; + version = "unstable-2019-01-16"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "jsommers"; + repo = "pytricia"; + rev = "4ba88f68c3125f789ca8cd1cfae156e1464bde87"; + sha256 = "0qp5774xkm700g35k5c76pck8pdzqlyzbaqgrz76a1yh67s2ri8h"; + }; + + meta = with lib; { + description = "Library for fast IP address lookup in Python"; + homepage = "https://github.com/jsommers/pytricia"; + license = with licenses; [ lgpl3Plus ]; + maintainers = with maintainers; [ mkg ]; + }; +} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index c24b98ba7493..61df6b217968 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -389,7 +389,6 @@ mapAliases { pytorch-bin = throw "'pytorch-bin' has been renamed to/replaced by 'torch-bin'"; # Converted to throw 2025-10-29 pytorchWithCuda = throw "'pytorchWithCuda' has been renamed to/replaced by 'torchWithCuda'"; # Converted to throw 2025-10-29 pytorchWithoutCuda = throw "'pytorchWithoutCuda' has been renamed to/replaced by 'torchWithoutCuda'"; # Converted to throw 2025-10-29 - pytricia = throw "pytricia has been removed, since it is unmaintained"; # added 2025-05-25 pytwitchapi = throw "'pytwitchapi' has been renamed to/replaced by 'twitchapi'"; # Converted to throw 2025-10-29 pyvicare-neo = throw "'pyvicare-neo' has been renamed to/replaced by 'pyvicare'"; # Converted to throw 2025-10-29 PyVirtualDisplay = throw "'PyVirtualDisplay' has been renamed to/replaced by 'pyvirtualdisplay'"; # Converted to throw 2025-10-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7858f2552348..1ae6d7863b67 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15511,6 +15511,8 @@ self: super: with self; { pytransportnswv2 = callPackage ../development/python-modules/pytransportnswv2 { }; + pytricia = callPackage ../development/python-modules/pytricia { }; + pytrydan = callPackage ../development/python-modules/pytrydan { }; pyttsx3 = callPackage ../development/python-modules/pyttsx3 { }; From f1b78a12419bb27ebfb166d9a0295134bbc93350 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 21 Nov 2025 02:27:49 +0100 Subject: [PATCH 2/2] python3Packages.pytricia: unstable-2019-01-16 -> 1.3.0 --- .../python-modules/pytricia/default.nix | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pytricia/default.nix b/pkgs/development/python-modules/pytricia/default.nix index d2caf52c6010..8ec324147fb1 100644 --- a/pkgs/development/python-modules/pytricia/default.nix +++ b/pkgs/development/python-modules/pytricia/default.nix @@ -1,25 +1,31 @@ { lib, buildPythonPackage, - fetchFromGitHub, + fetchPypi, + setuptools, }: -buildPythonPackage { +buildPythonPackage rec { pname = "pytricia"; - version = "unstable-2019-01-16"; - format = "setuptools"; + version = "1.3.0"; + pyproject = true; - src = fetchFromGitHub { - owner = "jsommers"; - repo = "pytricia"; - rev = "4ba88f68c3125f789ca8cd1cfae156e1464bde87"; - sha256 = "0qp5774xkm700g35k5c76pck8pdzqlyzbaqgrz76a1yh67s2ri8h"; + # no tags on git repo + src = fetchPypi { + inherit pname version; + hash = "sha256-HDo9aQnhDUycLw/kVCokgeEJ0pqrmcwCfKf+k/jIhT8="; }; - meta = with lib; { + build-system = [ setuptools ]; + + pythonImportsCheck = [ "pytricia" ]; + + doCheck = false; # no tests + + meta = { description = "Library for fast IP address lookup in Python"; homepage = "https://github.com/jsommers/pytricia"; - license = with licenses; [ lgpl3Plus ]; - maintainers = with maintainers; [ mkg ]; + license = with lib.licenses; [ lgpl3Plus ]; + maintainers = with lib.maintainers; [ mkg ]; }; }