2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2020-09-19 14:57:40 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, bwa
|
|
|
|
, cffi
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bwapy";
|
|
|
|
version = "0.1.4";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "090qwx3vl729zn3a7sksbviyg04kc71gpbm3nd8dalqp673x1npw";
|
|
|
|
};
|
|
|
|
postPatch = ''
|
|
|
|
# replace bundled bwa
|
|
|
|
rm -r bwa/*
|
|
|
|
cp ${bwa}/lib/*.a ${bwa}/include/*.h bwa/
|
|
|
|
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'setuptools>=49.2.0' 'setuptools'
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ zlib bwa ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "bwapy" ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-09-19 14:57:40 +02:00
|
|
|
homepage = "https://github.com/ACEnglish/acebinf";
|
|
|
|
description = "Python bindings to bwa mem aligner";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|