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
This commit is contained in:
Ludovic Courtès 2024-10-04 13:44:18 +02:00 committed by Ludovic Courtès
parent a227a6efb5
commit 51868735f3
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2303,20 +2303,20 @@ similar to MATLAB, GNU Octave or SciPy.")
(native-inputs (native-inputs
(list m4 doxygen graphviz)) (list m4 doxygen graphviz))
(inputs (inputs
`(("curl" ,curl) (list curl
("hdf4" ,hdf4-alt) hdf4-alt
("hdf5" ,hdf5) hdf5
("libjpeg" ,libjpeg-turbo) libjpeg-turbo
("libxml2" ,libxml2) libxml2
("unzip" ,unzip) unzip
("zlib" ,zlib))) zlib))
(arguments (arguments
`(#:configure-flags '("--enable-doxygen" (list #:configure-flags
"--enable-dot" #~'("--enable-doxygen" "--enable-dot"
"--enable-hdf4" "--enable-hdf4" "--disable-dap-remote-tests")
"--disable-dap-remote-tests")
#:phases (modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-before 'configure 'fix-source-date (add-before 'configure 'fix-source-date
(lambda _ (lambda _
;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build
@ -2334,7 +2334,8 @@ similar to MATLAB, GNU Octave or SciPy.")
;; store items. ;; store items.
(substitute* "libnetcdf.settings" (substitute* "libnetcdf.settings"
(("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash) (("(/gnu/store/)([0-9A-Za-z]*)" all prefix hash)
(string-append prefix (string-take hash 10) "..."))))) (string-append prefix
(string-take hash 10) "...")))))
(add-before 'check 'fix-test-rcmerge (add-before 'check 'fix-test-rcmerge
(lambda _ (lambda _
;; Set HOME, to fix the test-rcmerge test. ;; Set HOME, to fix the test-rcmerge test.
@ -2382,29 +2383,29 @@ Unidata's NetCDF, files in classic formats, specifically the formats of CDF-1, 2
(license (license:x11-style "file://COPYRIGHT")))) (license (license:x11-style "file://COPYRIGHT"))))
(define-public netcdf-parallel-openmpi (define-public netcdf-parallel-openmpi
(package (inherit netcdf) (package/inherit netcdf
(name "netcdf-parallel-openmpi") (name "netcdf-parallel-openmpi")
(inputs (inputs (modify-inputs (package-inputs netcdf)
`(("mpi" ,openmpi) (append openmpi pnetcdf)
("pnetcdf" ,pnetcdf) (replace "hdf5" hdf5-parallel-openmpi)))
,@(alist-replace "hdf5" (list hdf5-parallel-openmpi)
(package-inputs netcdf))))
;; TODO: Replace pkg-config references in nc-config with absolute references ;; TODO: Replace pkg-config references in nc-config with absolute references
(arguments (arguments
(substitute-keyword-arguments (package-arguments netcdf) (substitute-keyword-arguments (package-arguments netcdf)
((#:configure-flags flags) ((#:configure-flags flags)
`(cons* "CC=mpicc" "CXX=mpicxx" #~(cons* "CC=mpicc"
"CXX=mpicxx"
"--enable-parallel-tests" "--enable-parallel-tests"
;; Enable support of CDF-1, 2 and 5 formats. ;; Enable support of CDF-1, 2 and 5 formats.
"--enable-pnetcdf" "--enable-pnetcdf"
;; NetCDF supports both parallel and shared library building ;; NetCDF supports both parallel and shared library building
;; See https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#build_parallel ;; See https://docs.unidata.ucar.edu/nug/current/getting_and_building_netcdf.html#build_parallel
"--enable-shared" "--with-pic" "--enable-shared"
,flags)) "--with-pic"
((#:phases phases '%standard-phases) #$flags))
`(modify-phases ,phases ((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
(add-after 'build 'mpi-setup (add-after 'build 'mpi-setup
,%openmpi-setup))))))) #$%openmpi-setup)))))))
(define-public netcdf-fortran (define-public netcdf-fortran
(package (package