diff mbox series

[bug#66262,v3,3/3] gnu: openfoam-com: Update to 2306.

Message ID 0102018b184310e5-7c285620-deb5-4893-a60e-e9e94da60816-000000@eu-west-1.amazonses.com
State New
Headers show
Series Remove paraview plugin search path. | expand

Commit Message

reza Oct. 10, 2023, 6:25 a.m. UTC
* gnu/packages/simulation (openfoam-com): Update to 2306. Use openfoam-package
factory function to create package.
---
 gnu/packages/simulation.scm | 58 +++++++++++++++++++------------------
 1 file changed, 30 insertions(+), 28 deletions(-)

-- 
2.41.0
diff mbox series

Patch

diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
index 6ce15a2c2d..f44e1dbf6f 100644
--- a/gnu/packages/simulation.scm
+++ b/gnu/packages/simulation.scm
@@ -429,37 +429,39 @@  (define-public openfoam
 
 (define-public openfoam-com
   ;; This is a fork of 'openfoam-org', maintained separately.
-  (package
-    (inherit openfoam-org)
-    (name "openfoam-com")
-    (version "2212")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://develop.openfoam.com"
-                                  "/Development/openfoam/-/archive/OpenFOAM-v"
-                                  version
-                                  "/openfoam-OpenFOAM-v"
-                                  version
-                                  ".tar.gz"))
-              (sha256
-               (base32
-                "0i9039hfz9gvgymkdjhjvvn5500zha3cpdbpqrzfrfi8lbz10is2"))
-              (modules '((guix build utils)))
-              (snippet `(begin
-                          (substitute* "etc/bashrc"
-                            ;; set same version as guix package
-			    (("^export WM_PROJECT_VERSION=.*$")
-			     (string-append "export WM_PROJECT_VERSION="
-					    ,version "\n")))
-                          ;; patch shell paths
-                          (substitute* (list "src/OSspecific/POSIX/POSIX.C"
+  (let* ((version "2306")
+         (name "openfoam-com")
+         (source (origin
+                   (method url-fetch)
+                   (uri (string-append "https://develop.openfoam.com"
+                                       "/Development/openfoam/-/archive/OpenFOAM-v"
+                                       version
+                                       "/openfoam-OpenFOAM-v"
+                                       version
+                                       ".tar.gz"))
+                   (sha256 (base32
+                            "0zlkp48vygl2a5cyl0mfpj8dsb5bffviq96rg3kws1l6ni40v7jr"))
+                   (modules '((guix build utils)))
+                   (snippet `(begin
+                               (substitute* "etc/bashrc"
+                                 ;; set same version as guix package
+                                 (("^export WM_PROJECT_VERSION=.*$")
+                                  (string-append "export WM_PROJECT_VERSION="
+                                                 ,version "\n")))
+                               ;; patch shell paths
+                               (substitute* (list
+                                             "src/OSspecific/POSIX/POSIX.C"
                                              "wmake/src/Makefile"
                                              "wmake/makefiles/general"
                                              "wmake/makefiles/info")
-                            (("/bin/sh")
-                             "sh"))))))
-    (synopsis "Framework for numerical simulation of fluid flow (from openfoam.com)")
-    (home-page "https://www.openfoam.com")))
+                                 (("/bin/sh")
+                                  "sh"))))))
+         (home-page "https://www.openfoam.com")
+         (synopsis
+          "Framework for numerical simulation of fluid flow (from openfoam.com)")
+         (template (openfoam-package source version name home-page synopsis)))
+    (package
+      (inherit template))))
 
 (define-public open-simulation-interface
   (package