2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
numpy,
|
|
|
|
cython,
|
|
|
|
zlib,
|
|
|
|
python-lzo,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
|
|
|
oldest-supported-numpy,
|
2023-08-22 20:05:09 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bx-python";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.12.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bxlab";
|
|
|
|
repo = "bx-python";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-ZpZjh7OXdUY7rd692h7VYHzC3qCrDKFme6r+wuG7GP4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
# pytest-cython, which provides this option, isn't packaged
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace-fail "--doctest-cython" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
cython
|
|
|
|
oldest-supported-numpy
|
|
|
|
];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ zlib ];
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [ numpy ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
python-lzo
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestCheckHook
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# https://github.com/bxlab/bx-python/issues/101
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -r scripts/* $out/bin
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# This is a small hack; the test suite uses the scripts which need to
|
2020-04-24 23:36:52 +00:00
|
|
|
# be patched. Linking the patched scripts in $out back to the
|
|
|
|
# working directory allows the tests to run
|
|
|
|
rm -rf scripts
|
|
|
|
ln -s $out/bin scripts
|
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
meta = {
|
2023-08-22 20:05:09 +00:00
|
|
|
description = "Tools for manipulating biological data, particularly multiple sequence alignments";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/bxlab/bx-python";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/bxlab/bx-python/releases/tag/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ jbedo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|