1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, pytestCheckHook
6, cryptography
7, nibabel
8, numpy
9, pydicom
10, simpleitk
11}:
12
13buildPythonPackage rec {
14 pname = "pymedio";
15 version = "0.2.14";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "jcreinhold";
22 repo = "pymedio";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-x3CHoWASDrUoCXfj73NF+0Y/3Mb31dK2Lh+o4OD9ryk=";
25 };
26
27 propagatedBuildInputs = [
28 numpy
29 ];
30
31 nativeCheckInputs = [
32 pytestCheckHook
33 cryptography
34 nibabel
35 pydicom
36 simpleitk
37 ];
38
39 pythonImportsCheck = [
40 "pymedio"
41 ];
42
43 meta = with lib; {
44 description = "Read medical image files into Numpy arrays";
45 homepage = "https://github.com/jcreinhold/pymedio";
46 changelog = "https://github.com/jcreinhold/pymedio/blob/v${version}/HISTORY.rst";
47 license = licenses.mit;
48 maintainers = with maintainers; [ bcdarwin ];
49 };
50}