1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pythonOlder,
6 numpy,
7 cython,
8 zlib,
9 python-lzo,
10 nose,
11}:
12
13buildPythonPackage rec {
14 pname = "bx-python";
15 version = "0.11.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "bxlab";
22 repo = "bx-python";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-evhxh/cCZFSK6EgMu7fC9/ZrPd2S1fZz89ItGYrHQck=";
25 };
26
27 nativeBuildInputs = [ cython ];
28
29 buildInputs = [ zlib ];
30
31 propagatedBuildInputs = [
32 numpy
33 python-lzo
34 ];
35
36 nativeCheckInputs = [ nose ];
37
38 postInstall = ''
39 cp -r scripts/* $out/bin
40
41 # This is a small hack; the test suite uses the scripts which need to
42 # be patched. Linking the patched scripts in $out back to the
43 # working directory allows the tests to run
44 rm -rf scripts
45 ln -s $out/bin scripts
46 '';
47
48 meta = with lib; {
49 description = "Tools for manipulating biological data, particularly multiple sequence alignments";
50 homepage = "https://github.com/bxlab/bx-python";
51 changelog = "https://github.com/bxlab/bx-python/releases/tag/v${version}";
52 license = licenses.mit;
53 maintainers = with maintainers; [ jbedo ];
54 platforms = [ "x86_64-linux" ];
55 };
56}