From 62b90a656941d04255dac182ee89e2879a94f504 Mon Sep 17 00:00:00 2001 From: Reza Housseini Date: Mon, 24 Nov 2025 14:24:44 +0100 Subject: [PATCH] gnu: openfoam-com: Update to 2506. * gnu/packages/simulation.scm (openfoam-com): Update to 2506. [source]: Switch to git-fetch. Remove snippets. [arguments]: Add parent variable to replace version for inherited package. Change-Id: I2c79e98e621516dfe0e950a41b9abb515da43af3 Signed-off-by: Andreas Enge --- gnu/packages/simulation.scm | 50 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 101571bcfdaf3c9a81e2678674fb0a982f51c020..6d2a97799b66fde7fd16727efde989e4c69146d0 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -632,33 +632,29 @@ problems for efficient solution on parallel systems.") (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" - "wmake/src/Makefile" - "wmake/makefiles/general" - "wmake/makefiles/info") - (("/bin/sh") - "sh")))))) - (synopsis "Framework for numerical simulation of fluid flow (from openfoam.com)") + (version "2506") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/openfoam/core/openfoam") + (commit (string-append "OpenFOAM-v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1g8cjiqkk4yp5kmxyv8z43aaalr5459i54yaqmkn6qr38cjrhnd2")))) + (arguments + ;; Since 'arguments' is a function of the package's version, define + ;; 'parent' such that the 'arguments' thunk gets to see the right + ;; version. + (let ((parent (package + (inherit openfoam-org) + (version (package-version this-package))))) + (substitute-keyword-arguments (package-arguments parent) + ((#:phases phases) + #~(modify-phases #$phases + (delete 'disable-failing-tests)))))) + (synopsis + "Framework for numerical simulation of fluid flow (from openfoam.com)") (home-page "https://www.openfoam.com"))) (define-public open-simulation-interface