depot/third_party/nixpkgs/pkgs/development/python-modules/bwapy/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

46 lines
939 B
Nix

{ lib
, buildPythonPackage
, pythonAtLeast
, pythonOlder
, fetchPypi
, bwa
, cffi
, zlib
}:
buildPythonPackage rec {
pname = "bwapy";
version = "0.1.4";
format = "setuptools";
# uses the removed imp module
disabled = pythonOlder "3.6" || pythonAtLeast "3.12";
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" ];
meta = with lib; {
homepage = "https://github.com/ACEnglish/bwapy";
description = "Python bindings to bwa mem aligner";
license = licenses.mpl20;
maintainers = with maintainers; [ ris ];
};
}