at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchPypi, 6 pythonOlder, 7 setuptools, 8 nasm, 9}: 10 11buildPythonPackage rec { 12 pname = "rapidgzip"; 13 version = "0.14.5"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-+u1GAToaYqUZPElhWolmg+pcFO1HRLy0vRhpsUIFUdg="; 21 }; 22 23 prePatch = '' 24 # pythonRelaxDeps doesn't work here 25 substituteInPlace pyproject.toml \ 26 --replace-fail "setuptools >= 61.2, < 72" "setuptools" \ 27 --replace-fail "cython >= 3, < 3.1" cython 28 ''; 29 30 nativeBuildInputs = [ 31 cython 32 nasm 33 setuptools 34 ]; 35 36 # has no tests 37 doCheck = false; 38 39 pythonImportsCheck = [ "rapidgzip" ]; 40 41 meta = with lib; { 42 description = "Python library for parallel decompression and seeking within compressed gzip files"; 43 mainProgram = "rapidgzip"; 44 homepage = "https://github.com/mxmlnkn/rapidgzip"; 45 changelog = "https://github.com/mxmlnkn/rapidgzip/blob/rapidgzip-v${version}/python/rapidgzip/CHANGELOG.md"; 46 license = licenses.mit; # dual MIT and asl20, https://internals.rust-lang.org/t/rationale-of-apache-dual-licensing/8952 47 maintainers = with lib.maintainers; [ mxmlnkn ]; 48 }; 49}