From 83bdc1d98987c0c209fde331f8ea016737bfd976 Mon Sep 17 00:00:00 2001
From: Ben Darwin <bcdarwin@gmail.com>
Date: Mon, 27 Jan 2020 11:00:21 -0500
Subject: [PATCH] python3Packages.nibabel: 3.0.0 -> 3.0.1

- this unbreaks the package due to erroring tests in 3.0.0
- remove obsolete (mostly Python2-related) deps
- add deps to support MINC, DICOM, and SPM formats
- only build on x64 due to a dtype bug on Arm64
---
 .../python-modules/nibabel/default.nix        | 20 +++++++++----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/pkgs/development/python-modules/nibabel/default.nix b/pkgs/development/python-modules/nibabel/default.nix
index 979f12c8d985..3a907bc8ca02 100644
--- a/pkgs/development/python-modules/nibabel/default.nix
+++ b/pkgs/development/python-modules/nibabel/default.nix
@@ -1,31 +1,28 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, isPy3k
 , isPy27
-, bz2file
-, mock
 , nose
+, pytest
 , numpy
-, six
+, h5py
+, pydicom
+, scipy
 }:
 
 buildPythonPackage rec {
   pname = "nibabel";
-  version = "3.0.0";
+  version = "3.0.1";
   disabled = isPy27;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0f5bc325c9cb203c6f0ab876ba1a5ada811284bb3a4c5d063eeaafaefbad873d";
+    sha256 = "08nlny8vzkpjpyb0q943cq57m2s4wndm86chvd3d5qvar9z6b36k";
   };
 
-  propagatedBuildInputs = [
-    numpy
-    six
-  ] ++ lib.optional (!isPy3k) bz2file;
+  propagatedBuildInputs = [ numpy scipy h5py pydicom ];
 
-  checkInputs = [ nose mock ];
+  checkInputs = [ nose pytest ];
 
   checkPhase = ''
     nosetests
@@ -36,5 +33,6 @@ buildPythonPackage rec {
     description = "Access a multitude of neuroimaging data formats";
     license = licenses.mit;
     maintainers = with maintainers; [ ashgillman ];
+    platforms = platforms.x86_64;  # https://github.com/nipy/nibabel/issues/861
   };
 }