1{ buildPythonPackage
2, lib
3, fetchPypi
4, fetchpatch
5, formulaic
6, click
7, num2words
8, numpy
9, scipy
10, pandas
11, nibabel
12, patsy
13, bids-validator
14, sqlalchemy
15, pytestCheckHook
16, versioneer
17, pythonRelaxDepsHook
18}:
19
20buildPythonPackage rec {
21 version = "0.15.6";
22 pname = "pybids";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-OjWW08tyVDHkF0X3Pa+10HYD/7Gysp5DkEt9LaVxsdM=";
27 };
28
29 patches = [
30 # remove after next release
31 (fetchpatch {
32 name = "fix-pybids-sqlalchemy-dep";
33 url = "https://github.com/bids-standard/pybids/commit/5f008dfc282394ef94a68d47dba37ceead9eac9a.patch";
34 hash = "sha256-gx6w35XqDBZ8cTGHeY/mz2xNQqza9E5z8bRJR7mbPcg=";
35 excludes = [ "pyproject.toml" ]; # not in PyPI dist
36 })
37 ];
38
39 nativeBuildInputs = [ pythonRelaxDepsHook ];
40
41 pythonRelaxDeps = [ "sqlalchemy" ];
42
43 propagatedBuildInputs = [
44 click
45 formulaic
46 num2words
47 numpy
48 scipy
49 pandas
50 nibabel
51 patsy
52 bids-validator
53 sqlalchemy
54 versioneer
55 ];
56
57 nativeCheckInputs = [ pytestCheckHook ];
58 pythonImportsCheck = [ "bids" ];
59 # looks for missing data:
60 disabledTests = [ "test_config_filename" ];
61
62 meta = with lib; {
63 description = "Python tools for querying and manipulating BIDS datasets";
64 homepage = "https://github.com/bids-standard/pybids";
65 license = licenses.mit;
66 maintainers = with maintainers; [ jonringer ];
67 };
68}