1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5}: 6 7buildPythonPackage rec { 8 pname = "py-radix-sr"; 9 version = "1.0.1"; 10 format = "setuptools"; 11 12 src = fetchFromGitHub { 13 owner = "SEKOIA-IO"; 14 repo = "py-radix"; 15 rev = "v${version}"; 16 hash = "sha256-aHV+NvPR4Gyk6bEpCftgBylis9rU7BWLpBMatjP4QmE="; 17 }; 18 19 postPatch = '' 20 substituteInPlace setup.py \ 21 --replace "name='py-radix'" "name='py-radix-sr'" 22 ''; 23 24 pythonImportsCheck = [ "radix" ]; 25 26 nativeCheckInputs = [ pytestCheckHook ]; 27 28 meta = with lib; { 29 description = "Python radix tree for IPv4 and IPv6 prefix matching"; 30 homepage = "https://github.com/SEKOIA-IO/py-radix"; 31 license = with licenses; [ isc bsdOriginal ]; 32 maintainers = teams.wdz.members; 33 }; 34}