about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/dcmstack/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/dcmstack/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/dcmstack/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/dcmstack/default.nix b/nixpkgs/pkgs/development/python-modules/dcmstack/default.nix
new file mode 100644
index 000000000000..f06e361dc716
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/dcmstack/default.nix
@@ -0,0 +1,39 @@
+{ stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, pythonAtLeast
+, nose
+, nibabel
+, pydicom
+}:
+
+buildPythonPackage rec {
+  pname = "dcmstack";
+  version = "0.8";
+
+  disabled = pythonAtLeast "3.8";
+  # https://github.com/moloney/dcmstack/issues/67
+
+  src = fetchFromGitHub {
+    owner = "moloney";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1n24pp3rqz7ss1z6276fxynnppraxadbl3b9p8ijrcqnpzbzih7p";
+  };
+
+  propagatedBuildInputs = [ nibabel pydicom ];
+
+  checkInputs = [ nose ];
+  checkPhase = ''
+    runHook preCheck
+    nosetests
+    runHook postCheck
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/moloney/dcmstack";
+    description = "DICOM to Nifti conversion preserving metadata";
+    license = licenses.mit;
+    maintainers = with maintainers; [ bcdarwin ];
+  };
+}