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