1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPy27
5, numpy
6, scipy
7, pytestCheckHook
8, pytest-cov
9, pytest-timeout
10, h5py
11, matplotlib
12, nibabel
13, pandas
14, scikit-learn
15}:
16
17buildPythonPackage rec {
18 pname = "mne-python";
19 version = "0.24.0";
20
21 disabled = isPy27;
22
23 # PyPI dist insufficient to run tests
24 src = fetchFromGitHub {
25 owner = "mne-tools";
26 repo = pname;
27 rev = "v${version}";
28 sha256 = "1982y54n7q9pl28haca0vx6cjrk2a8cj24piaj8j31f09rynn8k0";
29 };
30
31 propagatedBuildInputs = [ numpy scipy ];
32
33 # all tests pass, but Pytest hangs afterwards - probably some thread hasn't terminated
34 doCheck = false;
35 checkInputs = [
36 pytestCheckHook
37 pytest-cov
38 pytest-timeout
39 h5py
40 matplotlib
41 nibabel
42 pandas
43 scikit-learn
44 ];
45 preCheck = ''
46 export HOME=$TMP
47 export MNE_SKIP_TESTING_DATASET_TESTS=true
48 export MNE_SKIP_NETWORK_TESTS=1
49 '';
50
51 pythonImportsCheck = [ "mne" ];
52
53 meta = with lib; {
54 homepage = "https://mne.tools";
55 description = "Magnetoencephelography and electroencephalography in Python";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ bcdarwin ];
58 };
59}