fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / development / python-modules / dicom2nifti / default.nix
bloba3b123f843028565ab40172a93bf5322f5a89ac0
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   pytestCheckHook,
7   gdcm,
8   nibabel,
9   numpy,
10   pydicom,
11   pylibjpeg,
12   pylibjpeg-libjpeg,
13   scipy,
14   setuptools,
17 buildPythonPackage rec {
18   pname = "dicom2nifti";
19   version = "2.4.11";
20   pyproject = true;
22   disabled = pythonOlder "3.6";
24   # no tests in PyPI dist
25   src = fetchFromGitHub {
26     owner = "icometrix";
27     repo = pname;
28     rev = "refs/tags/${version}";
29     hash = "sha256-/JauQZcCQDl1ukcSE3YPbf1SyhVxDNJUlqnFwdlwYQY=";
30   };
32   build-system = [ setuptools ];
34   propagatedBuildInputs = [
35     gdcm
36     nibabel
37     numpy
38     pydicom
39     scipy
40   ];
42   postPatch = ''
43     substituteInPlace tests/test_generic.py --replace-fail "from common" "from dicom2nifti.common"
44     substituteInPlace tests/test_ge.py --replace-fail "import convert_generic" "import dicom2nifti.convert_generic as convert_generic"
45   '';
47   nativeCheckInputs = [
48     pytestCheckHook
49     pylibjpeg
50     pylibjpeg-libjpeg
51   ];
53   pythonImportsCheck = [ "dicom2nifti" ];
55   meta = with lib; {
56     homepage = "https://github.com/icometrix/dicom2nifti";
57     description = "Library for converting dicom files to nifti";
58     mainProgram = "dicom2nifti";
59     license = licenses.mit;
60     maintainers = with maintainers; [ bcdarwin ];
61   };