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 @@ (define-public netcdf
(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
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'fix-source-date
(lambda _
;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build
@ -2334,7 +2334,8 @@ (define-public netcdf
;; store items.
(substitute* "libnetcdf.settings"
(("(/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
(lambda _
;; Set HOME, to fix the test-rcmerge test.
@ -2382,29 +2383,29 @@ (define-public pnetcdf
(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"
#~(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
"--enable-shared"
"--with-pic"
#$flags))
((#:phases phases #~%standard-phases)
#~(modify-phases #$phases
(add-after 'build 'mpi-setup
,%openmpi-setup)))))))
#$%openmpi-setup)))))))
(define-public netcdf-fortran
(package