From 34807336e85fa10efd163a5bee6472dba3572950 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 4 May 2020 23:16:45 -0400 Subject: [PATCH] python3Packages.dicom2nifti: init at 2.2.8 --- .../python-modules/dicom2nifti/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/dicom2nifti/default.nix diff --git a/pkgs/development/python-modules/dicom2nifti/default.nix b/pkgs/development/python-modules/dicom2nifti/default.nix new file mode 100644 index 000000000000..abc07346efd3 --- /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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1f7ae558a502..6f07d73493f9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -676,6 +676,8 @@ in { dftfit = callPackage ../development/python-modules/dftfit { }; + dicom2nifti = callPackage ../development/python-modules/dicom2nifti { }; + discid = callPackage ../development/python-modules/discid { }; discordpy = callPackage ../development/python-modules/discordpy { };