From 22e25ef5068fbd689a57174e982b522ba542dc65 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 1 Aug 2026 23:55:16 +0200 Subject: [PATCH] python3Packages.radixtarget: 3.0.0 -> 4.2.0 --- .../python-modules/radixtarget/default.nix | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/radixtarget/default.nix b/pkgs/development/python-modules/radixtarget/default.nix index 5ade2268a5ef..9611acbd5de1 100644 --- a/pkgs/development/python-modules/radixtarget/default.nix +++ b/pkgs/development/python-modules/radixtarget/default.nix @@ -1,37 +1,51 @@ { lib, buildPythonPackage, - fetchFromGitHub, + cargo, + fetchPypi, + nix-update-script, poetry-core, - poetry-dynamic-versioning, + rustc, + rustPlatform, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "radixtarget"; - version = "3.0.0"; + version = "4.2.0"; pyproject = true; - src = fetchFromGitHub { - owner = "blacklanternsecurity"; - repo = "radixtarget"; - rev = "v${version}"; - hash = "sha256-C7QmiAc8SO7ddfseoGDYkmrkLoxmAGww9MPhBX94ucg="; + __structuredAttrs = true; + + src = fetchPypi { + inherit (finalAttrs) pname version; + hash = "sha256-xroXgy7e7XXWPOYFMnt5ou2bJKSl6unBsUGa29v6+Dk="; + }; + + postUnpack = '' + rm -f "$sourceRoot/dist/"*.whl + ''; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit (finalAttrs) pname version src; + hash = "sha256-opo/P7oHKcKFWjXuXIhjUoz60IQ0iqlUtqptOJXWrk4="; }; build-system = [ + cargo poetry-core - poetry-dynamic-versioning + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + rustc ]; - # Module has no tests - doCheck = false; - pythonImportsCheck = [ "radixtarget" ]; + passthru.updateScript = nix-update-script { }; + meta = { - description = "Radix implementation designed for lookups of IP addresses/networks and DNS hostnames"; - homepage = "https://github.com/blacklanternsecurity/radixtarget"; + description = "Fast radix tree for IP addresses and DNS names"; + homepage = "https://pypi.org/project/radixtarget"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ fab ]; }; -} +})