summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2024-10-04 13:44:18 +0200
committerLudovic Courtès <ludo@gnu.org>2024-10-04 17:23:13 +0200
commit51868735f343c487d3a1a66bc3ef49926749e424 (patch)
tree46845f56182572eaeb1e95132a09f7c7be432727
parenta227a6efb59b7535d4223110760e7be6f4754fc6 (diff)
downloadguix-51868735f343c487d3a1a66bc3ef49926749e424.tar.gz
gnu: netcdf: Remove input labels and use gexps.
* gnu/packages/maths.scm (netcdf)[inputs]: Remove labels.
[arguments]: Use gexps.
(netcdf-parallel-openmpi): Use ‘package/inherit’.
[inputs]: Remove labels.
[arguments]: Use gexps.

Change-Id: Ibf133cd3eea20cbaf7c3d2e407370225f8716d10
-rw-r--r--gnu/packages/maths.scm107
1 files changed, 54 insertions, 53 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f4edd546e2..2106d73ef1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2303,44 +2303,45 @@ similar to MATLAB, GNU Octave or SciPy.")
     (native-inputs
      (list m4 doxygen graphviz))
     (inputs
-     `(("curl" ,curl)
-       ("hdf4" ,hdf4-alt)
-       ("hdf5" ,hdf5)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libxml2" ,libxml2)
-       ("unzip" ,unzip)
-       ("zlib" ,zlib)))
+     (list curl
+           hdf4-alt
+           hdf5
+           libjpeg-turbo
+           libxml2
+           unzip
+           zlib))
     (arguments
-     `(#:configure-flags '("--enable-doxygen"
-                           "--enable-dot"
-                           "--enable-hdf4"
-                           "--disable-dap-remote-tests")
+     (list #:configure-flags
+           #~'("--enable-doxygen" "--enable-dot"
+               "--enable-hdf4" "--disable-dap-remote-tests")
 
-       #:phases (modify-phases %standard-phases
-         (add-before 'configure 'fix-source-date
-           (lambda _
-             ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build
-             ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate
-             ;; to '1st hour of the current day', and therefore makes the
-             ;; package not reproducible.
-             (substitute* "./configure"
-               (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"")
-                "date --date='@0'"))))
-         (add-after 'configure 'patch-settings
-           (lambda _
-             ;; libnetcdf.settings contains the full filename of the compilers
-             ;; used to build the library.  We truncate the hashes of those
-             ;; filenames to avoid unnecessary references to the corresponding
-             ;; store items.
-             (substitute* "libnetcdf.settings"
-               (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash)
-                (string-append prefix (string-take hash 10) "...")))))
-         (add-before 'check 'fix-test-rcmerge
-           (lambda _
-             ;; Set HOME, to fix the test-rcmerge test.
-             (setenv "HOME" "/tmp"))))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'fix-source-date
+                 (lambda _
+                   ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build
+                   ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate
+                   ;; to '1st hour of the current day', and therefore makes the
+                   ;; package not reproducible.
+                   (substitute* "./configure"
+                     (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"")
+                      "date --date='@0'"))))
+               (add-after 'configure 'patch-settings
+                 (lambda _
+                   ;; libnetcdf.settings contains the full filename of the compilers
+                   ;; used to build the library.  We truncate the hashes of those
+                   ;; filenames to avoid unnecessary references to the corresponding
+                   ;; store items.
+                   (substitute* "libnetcdf.settings"
+                     (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash)
+                      (string-append prefix
+                                     (string-take hash 10) "...")))))
+               (add-before 'check 'fix-test-rcmerge
+                 (lambda _
+                   ;; Set HOME, to fix the test-rcmerge test.
+                   (setenv "HOME" "/tmp"))))
 
-       #:parallel-tests? #f))           ;various race conditions
+           #:parallel-tests? #f))           ;various race conditions
     (home-page "https://www.unidata.ucar.edu/software/netcdf/")
     (synopsis "Library for scientific data")
     (description "NetCDF is an interface for scientific data access and a
@@ -2382,29 +2383,29 @@ Unidata's NetCDF, files in classic formats, specifically the formats of CDF-1, 2
     (license (license:x11-style "file://COPYRIGHT"))))
 
 (define-public netcdf-parallel-openmpi
-  (package (inherit netcdf)
+  (package/inherit netcdf
     (name "netcdf-parallel-openmpi")
-    (inputs
-     `(("mpi" ,openmpi)
-       ("pnetcdf" ,pnetcdf)
-       ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi)
-                        (package-inputs netcdf))))
+    (inputs (modify-inputs (package-inputs netcdf)
+              (append openmpi pnetcdf)
+              (replace "hdf5" hdf5-parallel-openmpi)))
     ;; TODO: Replace pkg-config references in nc-config with absolute references
     (arguments
      (substitute-keyword-arguments (package-arguments netcdf)
        ((#:configure-flags flags)
-        `(cons* "CC=mpicc" "CXX=mpicxx"
-                "--enable-parallel-tests"
-                ;; Enable support of CDF-1, 2 and 5 formats.
-                "--enable-pnetcdf"
-                ;; NetCDF supports both parallel and shared library building
-                ;; See https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#build_parallel
-                "--enable-shared" "--with-pic"
-                ,flags))
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-after 'build 'mpi-setup
-             ,%openmpi-setup)))))))
+        #~(cons* "CC=mpicc"
+                 "CXX=mpicxx"
+                 "--enable-parallel-tests"
+                 ;; Enable support of CDF-1, 2 and 5 formats.
+                 "--enable-pnetcdf"
+                 ;; NetCDF supports both parallel and shared library building
+                 ;; See https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#build_parallel
+                 "--enable-shared"
+                 "--with-pic"
+                 #$flags))
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-after 'build 'mpi-setup
+              #$%openmpi-setup)))))))
 
 (define-public netcdf-fortran
   (package