summary refs log tree commit diff
path: root/pkgs/development/python-modules/mne-python/default.nix
blob: 46bc25672e18347f19c8072ce42900fc429899bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, scipy
, pytestCheckHook
, pytest-timeout
, h5py
, matplotlib
, nibabel
, pandas
, scikit-learn
, decorator
, jinja2
, pooch
, tqdm
, setuptools
, pythonOlder
}:

buildPythonPackage rec {
  pname = "mne-python";
  version = "1.3.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "mne-tools";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-jvrk6m1Cd5ig2LXq6sAIbHDhmtG1gH/7WNAc7oet+tg=";
  };

  propagatedBuildInputs = [
    decorator
    jinja2
    matplotlib
    numpy
    pooch
    scipy
    setuptools
    tqdm
  ];

  nativeCheckInputs = [
    h5py
    nibabel
    pandas
    pytestCheckHook
    scikit-learn
    pytest-timeout
  ];

  preCheck = ''
    export HOME=$TMP
    export MNE_SKIP_TESTING_DATASET_TESTS=true
    export MNE_SKIP_NETWORK_TESTS=1
  '';

  # All tests pass, but Pytest hangs afterwards - probably some thread hasn't terminated
  doCheck = false;

  pythonImportsCheck = [
    "mne"
  ];

  meta = with lib; {
    description = "Magnetoencephelography and electroencephalography in Python";
    homepage = "https://mne.tools";
    license = licenses.bsd3;
    maintainers = with maintainers; [ bcdarwin ];
  };
}