1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchFromGitHub, 6 poetry-core, 7 pytestCheckHook, 8 pythonOlder, 9 setuptools, 10 wheel, 11}: 12 13buildPythonPackage rec { 14 pname = "cached-ipaddress"; 15 version = "0.3.0"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "bdraco"; 22 repo = "cached-ipaddress"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-iTQ1DSCZqjAzsf95nYUxnNj5YCb1Y4JIUW5VGIi7yoY="; 25 }; 26 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace " --cov=cached_ipaddress --cov-report=term-missing:skip-covered" "" \ 30 --replace "Cython>=3.0.5" "Cython" 31 ''; 32 33 nativeBuildInputs = [ 34 cython 35 poetry-core 36 setuptools 37 wheel 38 ]; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 pythonImportsCheck = [ "cached_ipaddress" ]; 43 44 meta = with lib; { 45 description = "Cache construction of ipaddress objects"; 46 homepage = "https://github.com/bdraco/cached-ipaddress"; 47 changelog = "https://github.com/bdraco/cached-ipaddress/blob/${version}/CHANGELOG.md"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ ]; 50 }; 51}