Skip to content

Commit

Permalink
pythonPackages.bwapy: init at 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
risicle committed Sep 20, 2020
1 parent f1d2491 commit ccf4645
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/bwapy/default.nix
@@ -0,0 +1,42 @@
{ stdenv
, 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" ];

meta = with stdenv.lib; {
homepage = "https://github.com/ACEnglish/acebinf";
description = "Python bindings to bwa mem aligner";
license = licenses.mpl20;
maintainers = with maintainers; [ ris ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -979,6 +979,8 @@ in {

bx-python = callPackage ../development/python-modules/bx-python { inherit (pkgs) zlib; };

bwapy = callPackage ../development/python-modules/bwapy { };

bytecode = callPackage ../development/python-modules/bytecode { };

bz2file = callPackage ../development/python-modules/bz2file { };
Expand Down

0 comments on commit ccf4645

Please sign in to comment.