diff mbox series

[bug#66262,v7,1/7] gnu: openfoam-org: Use gexps.

Message ID 0102018c270b0a37-63a6f14a-1c64-4d81-a00f-6333031854bf-000000@eu-west-1.amazonses.com
State New
Headers show
Series [bug#66262,v7,1/7] gnu: openfoam-org: Use gexps. | expand

Commit Message

reza Dec. 1, 2023, 8:21 p.m. UTC
* gnu/packages/simulation.scm (openfoam-org): Use gexps, other cosmetic changes.

Change-Id: I856d9660559cb4656251cba6bc5dd31d004f1b74
---
 gnu/packages/simulation.scm | 32 ++++++++++++--------------------
 1 file changed, 12 insertions(+), 20 deletions(-)


base-commit: cd46757c1a0f886848fbb6828c028dd2a2532767
-- 
2.41.0
diff mbox series

Patch

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index b2fb123815..cb6f07c383 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -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))