From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GEoUOb6bFmVVewAAG6o9tA:P1 (envelope-from ) for ; Fri, 29 Sep 2023 11:41:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GEoUOb6bFmVVewAAG6o9tA (envelope-from ) for ; Fri, 29 Sep 2023 11:41:19 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 77C0862081 for ; Fri, 29 Sep 2023 11:41:18 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=TvU3uZ7K; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b="Lrp9/MX6"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695980478; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=lHuPXpwf5pgRbss0tAUk1SEifGytmb4UbFtsV+0K1os=; b=gJG+lC8tjjJ0bZzeODGJKPWTXCQ776p/fHadkqWlNOzhLcIw7tFPn0nCHiV0FUc5BnSDnu YXuJ2TgbTWCrCuAW4aKU76FIlEhBkPkBLnA0tdizh0ic94V4Xccj+Kmh2uil7UAZq7jhJq oojkuft1wKbOeDu+WHMW56kS4NXJlgYTGE/cF7aUombvwS2EmDFgbEVVSocwyI8OWS7GtV ZdGo7418132+w8hIc0RcsmeVgXUXOU+/PBC2xTHrbWAYCh2nJW1B9H4A9pJMXmNrNwffqM YgwtNiJTRL+t4kjlxDzMp8RYchizct+bclxoElfhAjleJK4nhjagADURvFPxQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695980478; a=rsa-sha256; cv=none; b=NCIAhQjlVWJcXwnu76mZIPhsxm9pCW2VURr6qMaxysJJwRo4a0/yX7CjqcChjuaCqAdqEA /ywvL/+ll2FJbn6F02Jb7WnOOUWcNHvSHDAHFF5cMpoCm8lLufH+7AlPbGieO0YjwPZRF7 n0hPu2d0yPukgggFZYsn3pIIyeu2ERp/EmMt5uyoPuhYbn4cOGM3ftLqWeb6vahuEC8h4B LTCbzcZFc090tUsR+csetVpesysQXttayziCSqn+lKdT1RnojYd6jdztFdSxgAEKDWdbNv lUWubXCXTL+aP5isfeZbTarSBPr6YybJD9eVD4z/EQIpsGgb2W1O7kV1arFMFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=TvU3uZ7K; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b="Lrp9/MX6"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9zO-0002UD-8z; Fri, 29 Sep 2023 05:40:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9zM-0002TV-PU for guix-patches@gnu.org; Fri, 29 Sep 2023 05:40:48 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qm9zM-0000bd-HZ for guix-patches@gnu.org; Fri, 29 Sep 2023 05:40:48 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qm9zb-0005TF-7A for guix-patches@gnu.org; Fri, 29 Sep 2023 05:41:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66262] [PATCH v2 1/3] gnu: Add openfoam-package. Resent-From: reza Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Sep 2023 09:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66262 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66262@debbugs.gnu.org <66262@debbugs.gnu.org> Cc: reza Received: via spool by 66262-submit@debbugs.gnu.org id=B66262.169598042020910 (code B ref 66262); Fri, 29 Sep 2023 09:41:03 +0000 Received: (at 66262) by debbugs.gnu.org; 29 Sep 2023 09:40:20 +0000 Received: from localhost ([127.0.0.1]:55361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qm9yt-0005RA-LI for submit@debbugs.gnu.org; Fri, 29 Sep 2023 05:40:20 -0400 Received: from a2-38.smtp-out.eu-west-1.amazonses.com ([54.240.2.38]:33063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0102018ae04f07c5-bbef6aff-cee5-4376-a9c3-487aa062960a-000000@mail.housseini.me>) id 1qm9yq-0005Qi-Ed for 66262@debbugs.gnu.org; Fri, 29 Sep 2023 05:40:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=solmzk3ljecfoypi3q6x2mqs3bucnhjw; d=housseini.me; t=1695980390; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id; bh=684fBUDof0PM9qJRTl1GHPGkcX/MgBpbYqzAIZWc2kc=; b=TvU3uZ7KwxT/dm4JhdO8rN7zUsRZ9X2i2Ub/u6aZPflWNCIKUoqv4aREbR6CXeyP 3eQbEkRPkoR5LWiskzDvowv39g0WT/EZ236X7mC3cNtLBmjl9DGjiM+OLp7t7rFwwZz KYcHY59SpuvH4Q7LDrF6jOVzIJptx4R9RXDQpULI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1695980390; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id:Feedback-ID; bh=684fBUDof0PM9qJRTl1GHPGkcX/MgBpbYqzAIZWc2kc=; b=Lrp9/MX6muwpgNsc3lyJjWBfh44xRghxNu69MP6bOYVEhjyWnumnu+FdU6M0YC/n 70LJgjIt7choFgOn/Afj5isBuaRohC9NeV3JbnQAhrGfLWTK27EUMl4bN7FVMsxCJKT 6MDSujDTkQaXuedMIyisDQU7q5EJ3/p+kmYfw+YM= Date: Fri, 29 Sep 2023 09:39:50 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <8f684396d68f2748f0b5e9ea832e483438cf195d.1695980074.git.reza@housseini.me> X-Mailer: Amazon WorkMail Thread-Index: AQHZ8rjeLcEuk4eZQkmvQkUg1RLw8AAAAWa6 Thread-Topic: [PATCH v2 1/3] gnu: Add openfoam-package. X-Wm-Sent-Timestamp: 1695980389 X-Original-Mailer: git-send-email 2.41.0 Message-ID: <0102018ae04f07c5-bbef6aff-cee5-4376-a9c3-487aa062960a-000000@eu-west-1.amazonses.com> Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2023.09.29-54.240.2.38 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: reza X-ACL-Warn: , reza via Guix-patches From: reza via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -3.25 X-Migadu-Spam-Score: -3.25 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 77C0862081 X-TUID: pNm5pN7kySZ5 * gnu/packages/simulation.scm (openfoam-package): Add factory function to= =0D=0Agenerate openfoam packages. Improve build tree clean up.=0D=0A---=0D= =0A gnu/packages/simulation.scm | 295 +++++++++++++++++++++++++++++++++++= +=0D=0A 1 file changed, 295 insertions(+)=0D=0A=0D=0Adiff --git a/gnu/pac= kages/simulation.scm b/gnu/packages/simulation.scm=0D=0Aindex b2fb123815.= =2Eab4f7c124f 100644=0D=0A--- a/gnu/packages/simulation.scm=0D=0A+++ b/gn= u/packages/simulation.scm=0D=0A@@ -450,6 +450,301 @@ (define-public openf= oam-com=0D=0A (synopsis "Framework for numerical simulation of fluid = flow (from openfoam.com)")=0D=0A (home-page "https://www.openfoam.com= ")))=0D=0A=20=0D=0A+(define* (openfoam-package source version name home-p= age synopsis)=0D=0A+ (let* ((install-path (string-append "share/OpenFOAM= -" version))=0D=0A+ (paraview-version (version-major+minor (packa= ge-version paraview)))=0D=0A+ (pv-plugin-path=0D=0A+ (st= ring-append install-path=0D=0A+ "/platforms/linux= 64GccDPInt32Opt/lib/paraview-"=0D=0A+ paraview-ve= rsion)))=0D=0A+ (package=0D=0A+ (name name)=0D=0A+ (version = version)=0D=0A+ (source source)=0D=0A+ (build-system gnu-build-= system)=0D=0A+ (native-search-paths=0D=0A+ (list (search-path-= specification=0D=0A+=09 (variable "WM_PROJECT_DIR")=0D=0A+=09 (= files `(,install-path)))=0D=0A+ ;; add PV_PLUGIN_PATH to LD_L= IBRARY_PATH so paraview=0D=0A+ ;; finds the OpenFOAM PV plugi= ns=0D=0A+ (search-path-specification=0D=0A+=09 (variable= "LD_LIBRARY_PATH")=0D=0A+=09 (files `(,pv-plugin-path)))))=0D=0A+ = (inputs (list boost=0D=0A+=09=09 cgal=0D=0A+=09=09 git=0D=0A+=09= =09 gmp=0D=0A+=09=09 libxt=0D=0A+=09=09 metis=0D=0A+=09=09 mp= fr=0D=0A+=09=09 ncurses=0D=0A+=09=09 openmpi=0D=0A+=09=09 openss= h=0D=0A+=09=09 paraview=0D=0A+=09=09 pt-scotch32=0D=0A+=09=09 re= adline=0D=0A+=09=09 scotch=0D=0A+=09=09 zlib))=0D=0A+ (native-= inputs (list bison=0D=0A+=09=09 flex=0D=0A+=09=09 ;; = paraview plugin dependencies=0D=0A+=09=09 cli11=0D=0A+=09=09 = cmake-minimal=0D=0A+=09=09 cgns=0D=0A+=09=09 = curl=0D=0A+=09=09 double-conversion=0D=0A+=09=09 eige= n=0D=0A+=09=09 expat=0D=0A+=09=09 ffmpeg=0D=0A+=09=09= fmt=0D=0A+=09=09 freetype=0D=0A+=09=09 gda= l=0D=0A+=09=09 gl2ps=0D=0A+=09=09 glew=0D=0A+=09=09 = gmsh=0D=0A+=09=09 hdf5=0D=0A+=09=09 jsoncpp=0D= =0A+=09=09 libjpeg-turbo=0D=0A+=09=09 libogg=0D=0A+=09= =09 libpng=0D=0A+=09=09 libharu=0D=0A+=09=09 = libtheora=0D=0A+=09=09 libtiff=0D=0A+=09=09 libx11=0D= =0A+=09=09 libxml2=0D=0A+=09=09 lz4=0D=0A+=09=09 = netcdf=0D=0A+=09=09 nlohmann-json=0D=0A+=09=09 = proj=0D=0A+=09=09 protobuf=0D=0A+=09=09 pugixml=0D=0A= +=09=09 python=0D=0A+=09=09 python-mpi4py=0D=0A+=09=09= qtbase-5=0D=0A+=09=09 qtsvg-5=0D=0A+=09=09 = qttools-5=0D=0A+=09=09 qtwebengine-5=0D=0A+=09=09 qt= xmlpatterns=0D=0A+=09=09 utfcpp=0D=0A+=09=09 vtk=0D=0A= +=09=09 xz))=0D=0A+ (propagated-inputs (list gnuplot))=0D=0A= + (outputs '("debug" ;~60MB=0D=0A+=09 "out"))=0D=0A+ (a= rguments=0D=0A+ (list=0D=0A+ ;; Executable files and shared = libraries are located in the 'platforms'=0D=0A+ ;; subdirectory.=0D= =0A+ #:strip-directories=0D=0A+ #~(list (string-append "Ope= nFOAM-" #$version "/platforms/linux64GccDPInt32Opt/bin")=0D=0A+=09 = (string-append "OpenFOAM-" #$version "/platforms/linux64GccDPInt32Opt/li= b"))=0D=0A+=0D=0A+ #:modules=0D=0A+ '((ice-9 ftw)=0D=0A+ = (ice-9 regex)=0D=0A+ (ice-9 string-fun)=0D=0A+ (= srfi srfi-1)=0D=0A+ (guix build gnu-build-system)=0D=0A+ = (guix build utils))=0D=0A+=0D=0A+ #:phases=0D=0A+ #~(modi= fy-phases %standard-phases=0D=0A+=09 (add-before 'build 'patch-HOME-pa= th=0D=0A+=09 (lambda _=0D=0A+=09 (setenv "HOME" "/tmp") #t))=0D= =0A+=09 (add-before 'build 'patch-scotch=0D=0A+=09 (lambda _=0D=0A= +=09 (substitute* "etc/config.sh/scotch"=0D=0A+=09 (("^ex= port SCOTCH_VERSION=3Dscotch_.*$")=0D=0A+=09 (string-append "ex= port SCOTCH_VERSION=3Dscotch_"=0D=0A+=09=09=09 #$(package-versio= n pt-scotch32) "\n"))=0D=0A+=09 (("^export SCOTCH_ARCH_PATH=3D.*= $")=0D=0A+=09 (string-append "export SCOTCH_ARCH_PATH=3D" #$pt-= scotch32 "\n")))=0D=0A+=09 #t))=0D=0A+=09 (add-before 'build 'p= atch-mpi=0D=0A+=09 (lambda _=0D=0A+=09 (let* ((mpi-version #$= (package-version openmpi)))=0D=0A+=09 ;; specify openmpi type=0D= =0A+=09 (substitute* "etc/bashrc"=0D=0A+=09=09 (("WM_MPLIB=3D= SYSTEMOPENMPI")=0D=0A+=09=09 "WM_MPLIB=3DOPENMPI"))=0D=0A+=09 = (substitute* "etc/config.sh/mpi"=0D=0A+=09=09 (("export FOAM_MPI=3Do= penmpi-.*$")=0D=0A+=09=09 (string-append "export FOAM_MPI=3Dopenmpi-"= =0D=0A+=09=09=09=09 mpi-version "\n"))=0D=0A+=09=09 (("export MPI_A= RCH_PATH=3D.*\\$FOAM_MPI.*$")=0D=0A+=09=09 (string-append "export MPI= _ARCH_PATH=3D" #$openmpi "\n"))))=0D=0A+=09 #t))=0D=0A+=09 (add= -before 'build 'patch-paraview=0D=0A+=09 (lambda _=0D=0A+=09 = (substitute* "etc/config.sh/paraview"=0D=0A+=09 (("^export ParaV= iew_VERSION=3D.*$")=0D=0A+=09 (string-append "export ParaView_V= ERSION=3D"=0D=0A+=09=09=09 #$(package-version paraview) "\n"))=0D= =0A+=09 (("^export ParaView_DIR=3D.*$")=0D=0A+=09 (str= ing-append "export ParaView_DIR=3D" #$paraview "\n"))=0D=0A+ = (("export ParaView_GL=3Dmesa") "export ParaView_GL=3Dsystem"))=0D=0A= +=09 #t))=0D=0A+=09 (add-before 'build 'add-rpaths=0D=0A+=09 = (lambda _=0D=0A+=09 (letrec* ((libraries '("boost"=0D=0A+=09=09= =09=09 "cgal"=0D=0A+=09=09=09=09 "gmp"=0D=0A+=09=09=09=09 = "metis"=0D=0A+=09=09=09=09 "mpfr"=0D=0A+=09=09=09=09 "scot= ch"=0D=0A+=09=09=09=09 "pt-scotch32"=0D=0A+ =09=09=09=09 "ope= nmpi"=0D=0A+=09=09=09=09 "zlib"=0D=0A+=09=09=09=09 "paraview"= ))=0D=0A+=09=09 (rpaths=0D=0A+=09=09 (fold-right (lamb= da (lib rpaths)=0D=0A+=09=09=09=09 (string-append rpaths=0D=0A+=09= =09=09=09=09=09 "-rpath=3D"=0D=0A+=09=09=09=09=09=09 (assoc= -ref %build-inputs lib)=0D=0A+=09=09=09=09=09=09 "/lib,")) "" libr= aries))=0D=0A+=09=09 (openfoam-lib=0D=0A+=09=09 (strin= g-append #$output=0D=0A+=09=09=09=09 "/share/OpenFOAM-" #$versio= n=0D=0A+=09=09=09=09 "/platforms/linux64GccDPInt32Opt/lib"))=0D=0A= +=09=09 (ldflags=0D=0A+=09=09 (string-append "-Wl,"=0D= =0A+=09=09=09=09 rpaths=0D=0A+=09=09=09=09 "-rpath=3D"=0D= =0A+=09=09=09=09 openfoam-lib=0D=0A+=09=09=09=09 ","=0D= =0A+=09=09=09=09 "-rpath=3D"=0D=0A+=09=09=09=09 openfoa= m-lib=0D=0A+=09=09=09=09 "/dummy,"=0D=0A+=09=09=09=09 "= -rpath=3D"=0D=0A+=09=09=09=09 openfoam-lib=0D=0A+=09=09=09=09 = "/paraview-"=0D=0A+=09=09=09=09 #$(version-major+minor (p= ackage-version=0D=0A+=09=09=09=09=09=09=09 paraview)))))=0D=0A+=09= (substitute* "wmake/rules/linux64Gcc/c++"=0D=0A+=09=09 (("\\= $\\(LIB_HEADER_DIRS\\) -fPIC" all)=0D=0A+=09=09 (string-append all " = " ldflags)))) #t))=0D=0A+=09 (add-before 'build 'add-vtk-include-path=0D= =0A+=09 (lambda _=0D=0A+=09 (let* ((vtk-version #$(version-ma= jor+minor=0D=0A+=09=09=09=09 (package-version vtk)))=0D=0A+=09=09 = (vtk-inc (string-append #$vtk "/include/vtk-" vtk-version))=0D=0A+=09= =09 (vtk-inc-flag (string-append "-I" vtk-inc)))=0D=0A+=09 = (substitute* "wmake/rules/linux64Gcc/c++"=0D=0A+=09=09 (("\\$\\(LIB_H= EADER_DIRS\\)" all)=0D=0A+=09=09 (string-append all " " vtk-inc-flag = " "))))=0D=0A+=09 #t))=0D=0A+=09 (delete 'configure) ;no config= ure phase=0D=0A+=09 (replace 'build=0D=0A+=09 (lambda _=0D=0A+=09= ;; compile OpenFOAM libraries and applications=0D=0A+=09 (= invoke "bash" "-c"=0D=0A+=09=09 (format #f=0D=0A+=09=09=09 = "source ./etc/bashrc && ./Allwmake -j~a"=0D=0A+=09=09=09 (parallel= -job-count)))))=0D=0A+=09 (add-after 'build 'cleanup=0D=0A+=09 ;;= Avoid unnecessary, voluminous object and dep files.=0D=0A+=09 (lamb= da _=0D=0A+=09 (when (file-exists=3F "platforms/linux64GccDPInt32O= pt/src")=0D=0A+=09 (delete-file-recursively=0D=0A+=09 = "platforms/linux64GccDPInt32Opt/src"))=0D=0A+=09 (when (file-exist= s=3F=0D=0A+=09=09 "platforms/linux64GccDPInt32OptOPENMPI")=0D=0A+=09= (delete-file-recursively=0D=0A+=09 "platforms/linux64= GccDPInt32OptOPENMPI"))=0D=0A+=09 (for-each delete-file=0D=0A+=09=09= (find-files "." "\\.o$"))=0D=0A+ ;; Remove spuri= ous files in src tree=0D=0A+ (invoke "bash" "-c" "source .= /etc/bashrc && wclean all")=0D=0A+ #t))=0D=0A+=09 (repl= ace 'check=0D=0A+=09 (lambda* (#:key tests=3F #:allow-other-keys)=0D= =0A+=09 (when tests=3F=0D=0A+=09 (when (file-exists=3F "t= est")=0D=0A+=09=09 (with-directory-excursion "test"=0D=0A+=09=09 = (invoke "bash" "-c"=0D=0A+=09=09=09 (format #f=0D=0A+=09=09=09=09 = "source ../etc/bashrc && ./Allrun -j~a"=0D=0A+=09=09=09=09 (paral= lel-job-count)))=0D=0A+ ;; cleanup=0D=0A+ = (invoke "bash" "-c"=0D=0A+=09=09=09 "source ../etc/bashrc= && ./Allclean")))=0D=0A+=09 ;; too many tutorials are failing=0D= =0A+=09 ;; (with-directory-excursion "tutorials"=0D=0A+=09 = ;; (invoke "bash" "-c" "source ../etc/bashrc && ./Alltest"))=0D=0A+=09= ) #t))=0D=0A+=09 (add-before 'install 'set-paths=0D=0A+=09 = (lambda _=0D=0A+=09 (let ((install-path (string-append #$outpu= t=0D=0A+=09=09=09=09=09 "/share/OpenFOAM-" #$version)))=0D=0A+=09= (substitute* "etc/bashrc"=0D=0A+=09=09 (("^\\[ \"\\$BASH\".*= $") "")=0D=0A+=09=09 (("^export FOAM_INST_DIR=3D\\$\\(cd.*$")=0D=0A+=09= =09 (string-append "export FOAM_INST_DIR=3D" install-path "\n"))=0D=0A= +=09=09 (("^export FOAM_INST_DIR=3D\\$HOME.*$") "")))=0D=0A+=09 = #t))=0D=0A+=09 (replace 'install=0D=0A+=09 (lambda* (#:key outpu= ts inputs #:allow-other-keys)=0D=0A+=09 (let ((install-path (strin= g-append #$output=0D=0A+=09=09=09=09=09 "/share/OpenFOAM-" #$ve= rsion)))=0D=0A+=09 (mkdir-p install-path) ;create install direct= ory=0D=0A+=09 ;; move contents of build directory to install dir= ectory=0D=0A+=09 (copy-recursively "." install-path))))=0D=0A+=09= (add-after 'install 'add-symbolic-link=0D=0A+=09 (lambda _=0D=0A= +=09 (let* ((bin (string-append #$output "/bin"))=0D=0A+=09=09 = (lib (string-append #$output "/lib"))=0D=0A+=09=09 (openfoam (st= ring-append #$output=0D=0A+=09=09=09=09=09 "/share/OpenFOAM-" #$ve= rsion))=0D=0A+=09=09 (build-bin (string-append openfoam=0D=0A+=09=09= =09=09=09 "/platforms/linux64GccDPInt32Opt/bin"))=0D=0A+=09=09 = (build-lib (string-append openfoam=0D=0A+=09=09=09=09=09 "/pl= atforms/linux64GccDPInt32Opt/lib"))=0D=0A+=09=09 (foam-bin (string-= append openfoam "/bin")))=0D=0A+=09 ;; add symbolic links in sta= ndard 'bin' directory=0D=0A+=09 (mkdir-p bin)=0D=0A+=09 = (for-each (lambda (file)=0D=0A+=09=09=09 (unless (member file=0D=0A= +=09=09=09=09=09 '("." ".."))=0D=0A+=09=09=09 (symlink (strin= g-append build-bin "/"=0D=0A+=09=09=09=09=09=09 file)=0D=0A+=09=09= =09=09 (string-append bin "/" file))))=0D=0A+=09=09=09 (scandi= r build-bin))=0D=0A+=09 (for-each (lambda (file)=0D=0A+=09=09=09= (unless (member file=0D=0A+=09=09=09=09=09 '("." ".."))=0D=0A+= =09=09=09 (symlink (string-append foam-bin "/"=0D=0A+=09=09=09=09=09= =09 file)=0D=0A+=09=09=09=09 (string-append bin "/" file))= ))=0D=0A+=09=09=09 (scandir foam-bin))=0D=0A+=09 ;; add symbo= lic link for standard 'lib' directory=0D=0A+=09 (symlink build-l= ib lib)) #t)))))=0D=0A+ ;; Note:=0D=0A+ ;; Tutorial files are i= nstalled read-only in /gnu/store.=0D=0A+ ;; To allow write permissio= ns on files copied from the store a=0D=0A+ ;; 'chmod' step is needed= before running the applications. For=0D=0A+ ;; example, from a use= r's login:=0D=0A+ ;; $ source $WM_PROJECT_DIR/etc/bashrc=0D=0A+ = ;; $ mkdir -p $FOAM_RUN=0D=0A+ ;; $ cd $FOAM_RUN=0D=0A+ ;; $ c= p -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .=0D=0A+ ;;= $ cd pitzDaily=0D=0A+ ;; $ chmod -R u+w .=0D=0A+ ;; $ blockMes= h=0D=0A+ (synopsis synopsis)=0D=0A+ (description=0D=0A+ "= OpenFOAM provides a set of solvers and methods for tackling=0D=0A+problem= s in the field of Computational Fluid Dynamics (CFD). It is written in=0D= =0A+C++. Governing equations such as the Navier-Stokes equations can be = solved in=0D=0A+integral form. Physical processes such as phase change, = droplet transport and=0D=0A+chemical reaction can be modelled. Numerical= methods are included to deal with=0D=0A+sharp gradients, such as those e= ncountered in flows with shock waves and flows=0D=0A+with gas/liquid inte= rfaces. Large problems may be split into smaller, connected=0D=0A+proble= ms for efficient solution on parallel systems.")=0D=0A+ (license lic= ense:gpl3+)=0D=0A+ (home-page home-page))))=0D=0A+=0D=0A (define-pub= lic open-simulation-interface=0D=0A (package=0D=0A (name "open-simu= lation-interface")=0D=0A--=20=0D=0A2.41.0=0D=0A=0D=0A