2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
|
|
|
hatch-vcs,
|
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-timeout,
|
|
|
|
matplotlib,
|
|
|
|
decorator,
|
|
|
|
jinja2,
|
|
|
|
pooch,
|
|
|
|
tqdm,
|
|
|
|
packaging,
|
|
|
|
lazy-loader,
|
|
|
|
h5io,
|
|
|
|
pymatreader,
|
|
|
|
pythonOlder,
|
2020-12-09 12:39:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mne-python";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.7.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mne-tools";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "mne-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-Nrar6Iw/jROuo4QTI7TktJSR5IdPSOQcbR+lycH52LI=";
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail "--cov-report=" "" \
|
|
|
|
--replace-fail "--cov-branch" ""
|
2024-02-29 20:09:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-06-05 15:53:02 +00:00
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
2024-02-29 20:09:43 +00:00
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
2024-02-29 20:09:43 +00:00
|
|
|
matplotlib
|
2022-09-09 14:08:57 +00:00
|
|
|
tqdm
|
2024-02-29 20:09:43 +00:00
|
|
|
pooch
|
|
|
|
decorator
|
|
|
|
packaging
|
|
|
|
jinja2
|
|
|
|
lazy-loader
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
2020-12-09 12:39:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.optional-dependencies.hdf5 = [
|
|
|
|
h5io
|
|
|
|
pymatreader
|
|
|
|
];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-timeout
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
preCheck = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
export HOME=$(mktemp -d)
|
2020-12-09 12:39:15 +00:00
|
|
|
export MNE_SKIP_TESTING_DATASET_TESTS=true
|
|
|
|
export MNE_SKIP_NETWORK_TESTS=1
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "mne" ];
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Magnetoencephelography and electroencephalography in Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "mne";
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://mne.tools";
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://mne.tools/stable/changes/v${version}.html";
|
2020-12-09 12:39:15 +00:00
|
|
|
license = licenses.bsd3;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
bcdarwin
|
|
|
|
mbalatsko
|
|
|
|
];
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
}
|