2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
bwa,
|
|
|
|
cffi,
|
|
|
|
zlib,
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bwapy";
|
|
|
|
version = "0.1.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# uses the removed imp module
|
|
|
|
disabled = pythonOlder "3.6" || pythonAtLeast "3.12";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
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'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
bwa
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ cffi ];
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "bwapy" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://github.com/ACEnglish/bwapy";
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Python bindings to bwa mem aligner";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "bwamempy";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|