Subject: [PATCH 03/16] gnu: Add python-nibabel.

From: Vinicius Monego <[email-masked]>
Date: Sun, 9 Feb 2025 01:52:20 +0000

* gnu/packages/python-science.scm (python-nibabel): New variable.

Change-Id: I27d3841def6f360ae3996aacb787142bcfa92291
---
 gnu/packages/python-science.scm | 35 ++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 7772dce248..bd7ea99c60 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2019, 2021, 2022, 2023, 2024 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2019 Giacomo Leidi <[email-masked]>
 ;;; Copyright © 2020 Pierre Langlois <[email-masked]>
-;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <[email-masked]>
+;;; Copyright © 2020-2025 Vinicius Monego <[email-masked]>
 ;;; Copyright © 2021 Greg Hogan <[email-masked]>
 ;;; Copyright © 2021 Roel Janssen <[email-masked]>
 ;;; Copyright © 2021 Paul Garlick <[email-masked]>
@@ -1128,6 +1128,39 @@ (define-public python-pyet
 Evapotranspiration using various standard methods.")
     (license license:expat)))
 
+(define-public python-nibabel
+  (package
+    (name "python-nibabel")
+    (version "5.3.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "nibabel" version))
+       (sha256
+        (base32 "16snprwgp7qzp51j3mx0zdn7brvx6r14ankldi24ny0w7d8adp0b"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      ;; AttributeError: 'dict' object has no attribute 'add'.
+      #:test-flags #~(list "-k" "not test_first and not test_second")))
+    (propagated-inputs (list python-importlib-resources python-numpy
+                             python-packaging python-typing-extensions))
+    (native-inputs (list python-hatch-vcs
+                         python-hatchling
+                         python-pytest
+                         python-pytest-httpserver
+                         python-pytest-xdist))
+    (home-page "https://nipy.org/nibabel/")
+    (synopsis "Read and write access to common neuroimaging file formats")
+    (description
+     "@code{nibabel} is a library that provides read and write access to
+common neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2
+and later), GIFTI, NIfTI1, NIfTI2, CIFTI-2, MINC1, MINC2, AFNI BRIK/HEAD,
+ECAT and Philips PAR/REC.  In addition, NiBabel also supports FreeSurfer’s
+MGH, geometry, annotation and morphometry files, and provides some limited
+support for DICOM.")
+    (license license:expat)))
+
 (define-public python-tspex
   (package
     (name "python-tspex")
-- 
2.48.1