@@ -238,13 +238,10 @@ (define-public openfoam-org
(string-append "export SCOTCH_VERSION=scotch_"
#$(package-version pt-scotch32) "\n"))
(("^export SCOTCH_ARCH_PATH=.*$")
- (string-append "export SCOTCH_ARCH_PATH="
- (assoc-ref %build-inputs "pt-scotch32")
- "\n"))) #t))
+ (string-append "export SCOTCH_ARCH_PATH=" #$pt-scotch32 "\n"))) #t))
(add-before 'build 'patch-mpi
(lambda _
- (let* ((mpi-path (assoc-ref %build-inputs "openmpi"))
- (mpi-version #$(package-version openmpi)))
+ (let* ((mpi-version #$(package-version openmpi)))
;; specify openmpi type
(substitute* "etc/bashrc"
(("WM_MPLIB=SYSTEMOPENMPI")
@@ -254,8 +251,7 @@ (define-public openfoam-org
(string-append "export FOAM_MPI=openmpi-"
mpi-version "\n"))
(("export MPI_ARCH_PATH=.*\\$FOAM_MPI.*$")
- (string-append "export MPI_ARCH_PATH=" mpi-path
- "\n")))) #t))
+ (string-append "export MPI_ARCH_PATH=" #$openmpi "\n")))) #t))
(add-before 'build 'patch-paraview
(lambda _
(substitute* "etc/config.sh/paraview"
@@ -263,12 +259,11 @@ (define-public openfoam-org
(string-append "export ParaView_VERSION="
#$(package-version paraview) "\n"))
(("^export ParaView_DIR=.*$")
- (string-append "export ParaView_DIR="
- (assoc-ref %build-inputs "paraview")
- "\n"))) #t))
+ (string-append "export ParaView_DIR=" #$paraview "\n"))) #t))
(add-before 'build 'add-rpaths
(lambda _
- (letrec* ((libraries '("boost" "cgal"
+ (letrec* ((libraries '("boost"
+ "cgal"
"gmp"
"metis"
"mpfr"
@@ -277,11 +272,10 @@ (define-public openfoam-org
"zlib"
"paraview"))
(rpaths
- (fold-right (lambda (library rpaths)
+ (fold-right (lambda (lib rpaths)
(string-append rpaths
"-rpath="
- (assoc-ref
- %build-inputs library)
+ (assoc-ref %build-inputs lib)
"/lib,")) "" libraries))
(openfoam-lib
(string-append #$output
@@ -307,13 +301,11 @@ (define-public openfoam-org
(lambda _
(let* ((vtk-version #$(version-major+minor
(package-version vtk)))
- (vtk-root (assoc-ref %build-inputs "vtk"))
- (vtk-inc (string-append vtk-root "/include/vtk-" vtk-version))
+ (vtk-inc (string-append #$vtk "/include/vtk-" vtk-version))
(vtk-inc-flag (string-append "-I" vtk-inc)))
(substitute* "wmake/rules/linux64Gcc/c++"
(("\\$\\(LIB_HEADER_DIRS\\)" all)
- (string-append all " " vtk-inc-flag " "))))
- #t))
+ (string-append all " " vtk-inc-flag " ")))) #t))
(delete 'configure) ;no configure phase
(replace 'build
(lambda _
@@ -400,6 +392,7 @@ (define-public openfoam-org
;; $ cd pitzDaily
;; $ chmod -R u+w .
;; $ blockMesh
+ (home-page "https://openfoam.org")
(synopsis "Framework for numerical simulation of fluid flow")
(description
"OpenFOAM provides a set of solvers and methods for tackling
@@ -410,8 +403,7 @@ (define-public openfoam-org
sharp gradients, such as those encountered in flows with shock waves and flows
with gas/liquid interfaces. Large problems may be split into smaller, connected
problems for efficient solution on parallel systems.")
- (license license:gpl3+)
- (home-page "https://openfoam.org")))
+ (license license:gpl3+)))
(define-public openfoam
(deprecated-package "openfoam" openfoam-org))