mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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:
parent
a227a6efb5
commit
51868735f3
1 changed files with 54 additions and 53 deletions
|
@ -2303,44 +2303,45 @@ (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
|
||||
(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 @@ (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"
|
||||
"--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
|
||||
|
|
Loading…
Reference in a new issue