1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchPypi 5, bwa 6, cffi 7, zlib 8}: 9 10buildPythonPackage rec { 11 pname = "bwapy"; 12 version = "0.1.4"; 13 disabled = pythonOlder "3.6"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "090qwx3vl729zn3a7sksbviyg04kc71gpbm3nd8dalqp673x1npw"; 18 }; 19 postPatch = '' 20 # replace bundled bwa 21 rm -r bwa/* 22 cp ${bwa}/lib/*.a ${bwa}/include/*.h bwa/ 23 24 substituteInPlace setup.py \ 25 --replace 'setuptools>=49.2.0' 'setuptools' 26 ''; 27 28 buildInputs = [ zlib bwa ]; 29 30 propagatedBuildInputs = [ cffi ]; 31 32 # no tests 33 doCheck = false; 34 pythonImportsCheck = [ "bwapy" ]; 35 36 meta = with lib; { 37 homepage = "https://github.com/ACEnglish/acebinf"; 38 description = "Python bindings to bwa mem aligner"; 39 license = licenses.mpl20; 40 maintainers = with maintainers; [ ris ]; 41 }; 42}