summary refs log tree commit diff
path: root/pkgs/development/python-modules/dicom2nifti/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/dicom2nifti/default.nix')
-rw-r--r--pkgs/development/python-modules/dicom2nifti/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/dicom2nifti/default.nix b/pkgs/development/python-modules/dicom2nifti/default.nix
new file mode 100644
index 00000000000..abc07346efd
--- /dev/null
+++ b/pkgs/development/python-modules/dicom2nifti/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, isPy27
+, gdcm
+, nose
+, nibabel
+, numpy
+, pydicom
+, scipy
+}:
+
+buildPythonPackage rec {
+  pname = "dicom2nifti";
+  version = "2.2.8";
+  disabled = isPy27;
+
+  # no tests in PyPI dist
+  src = fetchFromGitHub {
+    owner = "icometrix";
+    repo = pname;
+    rev = version;
+    sha256 = "1qi2map6f4pa1l8wsif7ff7rhja6ynrjlm7w306dzvi9l25mia34";
+  };
+
+  propagatedBuildInputs = [ gdcm nibabel numpy pydicom scipy ];
+
+  checkInputs = [ nose gdcm ];
+  checkPhase = "nosetests tests";
+
+  meta = with lib; {
+    homepage = "https://github.com/icometrix/dicom2nifti";
+    description = "Library for converting dicom files to nifti";
+    license = licenses.mit;
+    maintainers = with maintainers; [ bcdarwin ];
+  };
+}