2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-01-25 14:12:00 +00:00
|
|
|
, demes
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
|
|
|
, gsl
|
|
|
|
, newick
|
2024-01-25 14:12:00 +00:00
|
|
|
, numpy
|
|
|
|
, oldest-supported-numpy
|
2023-07-15 17:15:38 +00:00
|
|
|
, pytest-xdist
|
2024-01-25 14:12:00 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-07-15 17:15:38 +00:00
|
|
|
, scipy
|
2024-01-25 14:12:00 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, tskit
|
|
|
|
, wheel
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "msprime";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.3.0";
|
|
|
|
pyproject = true;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-eYjGHvlJXDZ+gu/J+52AI8PbKiB6ZEXUORlTrzxCbCk=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gsl
|
2023-10-09 19:29:22 +00:00
|
|
|
oldest-supported-numpy
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gsl
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
newick
|
|
|
|
tskit
|
|
|
|
demes
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
pytest-xdist
|
|
|
|
scipy
|
|
|
|
];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabledTests = [
|
|
|
|
"tests/test_ancestry.py::TestSimulator::test_debug_logging"
|
|
|
|
"tests/test_ancestry.py::TestSimulator::test_debug_logging_dtw"
|
|
|
|
];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_demography.py"
|
|
|
|
"tests/test_algorithms.py"
|
|
|
|
"tests/test_provenance.py"
|
|
|
|
"tests/test_dict_encoding.py"
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# `python -m pytest` puts $PWD in sys.path, which causes the extension
|
|
|
|
# modules imported as `msprime._msprime` to be unavailable, failing the
|
|
|
|
# tests. This deletes the `msprime` folder such that only what's installed in
|
|
|
|
# $out is used for the imports. See also discussion at:
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/255262
|
|
|
|
preCheck = ''
|
|
|
|
rm -r msprime
|
2023-07-15 17:15:38 +00:00
|
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"msprime"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simulate genealogical trees and genomic sequence data using population genetic models";
|
|
|
|
homepage = "https://github.com/tskit-dev/msprime";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/tskit-dev/msprime/blob/${version}/CHANGELOG.md";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ alxsimon ];
|
|
|
|
};
|
|
|
|
}
|