From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 UGb/Ib7uJGXyMQAA9RJhRA:P1 (envelope-from ) for ; Tue, 10 Oct 2023 08:27:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UGb/Ib7uJGXyMQAA9RJhRA (envelope-from ) for ; Tue, 10 Oct 2023 08:27:10 +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 035DC388BE for ; Tue, 10 Oct 2023 08:27:10 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=Mh1paRr7; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=XI90iL3c; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696919230; 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=gBAiQMDGTUIADcPnH7aFtNI6CzojkRJ1jwgYOoftuIU=; b=u8zAGDP+M3vDiIPun+nZFx2viJQOp65HECrqx5mCkChBnU3fxaXLlHrh3A7HTzujVkhQ/1 NpJ9RFQffl+hHkB7kLoxA/U01MzNiRozdLNkIAzboYz7Ak0XJ3zXyKFpBQmmOxk+uhoHp2 7SQpXbhL52aZOVyPAGd+8s6ee/OwWEvi6u9mHXiIpcv9Y/aLQpcPzbzvpmT/Byfh+UHmhw gJHybJGo5l3rdr4TvFqaDkKKdg+uNpWhtA9GfVr/A2E+LMS3/AXA92znJyqjA17V5YNUzU mZZoi1AtL4mZLyVE7uvttePo7i7e/N6g5JDeRwE5LPLY9eDMExrwR4pAcdECdg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=Mh1paRr7; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=XI90iL3c; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696919230; a=rsa-sha256; cv=none; b=fbiZpudxsKpL0+9jcr+0KxAaBFEU4MNqp4j2h0qGkenf4ONe7uHK7UT4t9Ovnsr5mwgePc +l0sBgCs9P+AqJJ6jThczmsT/uYUlM/Y7TtYVXP9yo7jjB4hMZWWTCFB2E9opmshpYGz4t XB+cY8aO1puRQl/c4aBrMNaOqBvhooYDkZv/wjePkIzNRp06RQVSuJ65RERdddBeNGzmkz EhQEQs2/7bQocOCTZbwRtZJLEjj2mYKlwxzYsZUh5GVGtkl6bjgZ5gZO1/SlwSsXJjN0pD nn/Er5V76Wr/LKfZ03jSzNtXfo/w23L5Mk+ECyEcIp4ULjiwgwLRN45eH437WQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qq6CY-00024D-PI; Tue, 10 Oct 2023 02:26:42 -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 1qq6CX-00023s-OA for guix-patches@gnu.org; Tue, 10 Oct 2023 02:26:41 -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 1qq6CX-0002i0-Fm for guix-patches@gnu.org; Tue, 10 Oct 2023 02:26:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qq6Cs-00070i-Fm for guix-patches@gnu.org; Tue, 10 Oct 2023 02:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66262] [PATCH v3 1/3] gnu: Add openfoam-package. Resent-From: reza Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Oct 2023 06:27:02 +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.169691916726856 (code B ref 66262); Tue, 10 Oct 2023 06:27:02 +0000 Received: (at 66262) by debbugs.gnu.org; 10 Oct 2023 06:26:07 +0000 Received: from localhost ([127.0.0.1]:33850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq6Bz-0006z5-20 for submit@debbugs.gnu.org; Tue, 10 Oct 2023 02:26:07 -0400 Received: from a2-11.smtp-out.eu-west-1.amazonses.com ([54.240.2.11]:54695) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0102018b184309d5-eff905ae-ed1b-4c1a-b305-45f0e69ba7de-000000@mail.housseini.me>) id 1qq6Bt-0006xn-FZ for 66262@debbugs.gnu.org; Tue, 10 Oct 2023 02:26:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=solmzk3ljecfoypi3q6x2mqs3bucnhjw; d=housseini.me; t=1696919128; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id; bh=vfBPe8Mc/nOgrl8SB2WkLO7LrPoIOZJRvGCY3f74iaE=; b=Mh1paRr7NEJwR+QFgqPhsaKhL8Sbtj+wSKjjpaeJR6cVS3+wAP4kz05PvxpN2PaM dvPcOmNt3m5w6H1SSzLlGgDZm17wPcO8WCHG+ZEVfZ838/FMG5N/QAciUQWG/VMQ+zG eG/AliSn64qk/yIbQeQjhlZ1LtAPCBCNwP8VK8Ug= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1696919128; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id:Feedback-ID; bh=vfBPe8Mc/nOgrl8SB2WkLO7LrPoIOZJRvGCY3f74iaE=; b=XI90iL3c5umkOp4ZkQ1vbMSiO/j5gklzlI9w/iWeVnNqQ7uh/1vn70LFWrfuXRW+ eDtxzkY6yU5hAtPIOhM4zbQd1XfpG3sfKGtNktx27vm7ZJ6R8NnWLZaW8G3NC93QnfO swfsXx3pqfcgBgaqKRnRJN2a/hpLYojlkZdo81Q4= Date: Tue, 10 Oct 2023 06:25:28 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: X-Mailer: Amazon WorkMail Thread-Index: AQHZ+0KLumvKmCKhSmOZLKw0EepbNQAAAQlM Thread-Topic: [PATCH v3 1/3] gnu: Add openfoam-package. X-Wm-Sent-Timestamp: 1696919127 X-Original-Mailer: git-send-email 2.41.0 Message-ID: <0102018b184309d5-eff905ae-ed1b-4c1a-b305-45f0e69ba7de-000000@eu-west-1.amazonses.com> Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2023.10.10-54.240.2.11 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-Migadu-Queue-Id: 035DC388BE X-Spam-Score: -3.21 X-Migadu-Spam-Score: -3.21 X-Migadu-Scanner: mx1.migadu.com X-TUID: tncTYOEtuYdW * gnu/packages/simulation.scm (openfoam-package): Add factory function to= =0D=0Agenerate openfoam packages. Improve build tree clean up to fix repr= oducibility=0D=0Abug. Fix install path to follow openfoam naming conventi= on.=0D=0A---=0D=0A gnu/packages/simulation.scm | 285 ++++++++++++++++++++= ++++++++++++++++=0D=0A 1 file changed, 285 insertions(+)=0D=0A=0D=0Adiff = --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm=0D=0Ain= dex b2fb123815..4b95688e33 100644=0D=0A--- a/gnu/packages/simulation.scm=0D= =0A+++ b/gnu/packages/simulation.scm=0D=0A@@ -88,6 +88,291 @@ (define-mod= ule (gnu packages simulation)=0D=0A #:use-module (ice-9 regex)=0D=0A = #:use-module (srfi srfi-1))=0D=0A=20=0D=0A+(define* (openfoam-package sou= rce version name home-page synopsis)=0D=0A+ (let* ((install-path (string= -append "share/OpenFOAM-" version)))=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_PRO= JECT_DIR")=0D=0A+=09 (files `(,install-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 mpfr=0D=0A+=09= =09 ncurses=0D=0A+=09=09 openmpi=0D=0A+=09=09 openssh=0D=0A+=09=09= paraview=0D=0A+=09=09 pt-scotch32=0D=0A+=09=09 readline=0D=0A+=09= =09 scotch=0D=0A+=09=09 zlib))=0D=0A+ (native-inputs (list bis= on=0D=0A+=09=09 flex=0D=0A+=09=09 ;; paraview plugin = dependencies=0D=0A+=09=09 cli11=0D=0A+=09=09 cmake-mi= nimal=0D=0A+=09=09 cgns=0D=0A+=09=09 curl=0D=0A+=09=09= double-conversion=0D=0A+=09=09 eigen=0D=0A+=09=09 = expat=0D=0A+=09=09 ffmpeg=0D=0A+=09=09 fmt=0D= =0A+=09=09 freetype=0D=0A+=09=09 gdal=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 li= bpng=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 qtbas= e-5=0D=0A+=09=09 qtsvg-5=0D=0A+=09=09 qttools-5=0D=0A= +=09=09 qtwebengine-5=0D=0A+=09=09 qtxmlpatterns=0D=0A= +=09=09 utfcpp=0D=0A+=09=09 vtk=0D=0A+=09=09 = xz))=0D=0A+ (propagated-inputs (list gnuplot))=0D=0A+ (output= s '("debug" ;~60MB=0D=0A+=09 "out"))=0D=0A+ (arguments=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 "OpenFOAM-" #$ver= sion "/platforms/linux64GccDPInt32Opt/bin")=0D=0A+=09 (string-appe= nd "OpenFOAM-" #$version "/platforms/linux64GccDPInt32Opt/lib"))=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 u= tils))=0D=0A+=0D=0A+ #:phases=0D=0A+ #~(modify-phases %stan= dard-phases=0D=0A+=09 (add-before 'build 'patch-HOME-path=0D=0A+=09 = (lambda _=0D=0A+=09 (setenv "HOME" "/tmp") #t))=0D=0A+=09 (a= dd-before 'build 'patch-scotch=0D=0A+=09 (lambda _=0D=0A+=09 = (substitute* "etc/config.sh/scotch"=0D=0A+=09 (("^export SCOTCH_= VERSION=3Dscotch_.*$")=0D=0A+=09 (string-append "export SCOTCH_= VERSION=3Dscotch_"=0D=0A+=09=09=09 #$(package-version pt-scotch3= 2) "\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 'patch-mpi=0D=0A= +=09 (lambda _=0D=0A+=09 (let* ((mpi-version #$(package-versi= on openmpi)))=0D=0A+=09 ;; specify openmpi type=0D=0A+=09 = (substitute* "etc/bashrc"=0D=0A+=09=09 (("WM_MPLIB=3DSYSTEMOPENMPI"= )=0D=0A+=09=09 "WM_MPLIB=3DOPENMPI"))=0D=0A+=09 (substitute*= "etc/config.sh/mpi"=0D=0A+=09=09 (("export FOAM_MPI=3Dopenmpi-.*$")=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_ARCH_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* "et= c/config.sh/paraview"=0D=0A+=09 (("^export ParaView_VERSION=3D.*= $")=0D=0A+=09 (string-append "export ParaView_VERSION=3D"=0D=0A= +=09=09=09 #$(package-version paraview) "\n"))=0D=0A+=09 = (("^export ParaView_DIR=3D.*$")=0D=0A+=09 (string-append "exp= ort 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 "c= gal"=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 "scotch"=0D=0A+=09=09= =09=09 "pt-scotch32"=0D=0A+ =09=09=09=09 "openmpi"=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 (lambda (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-input= s lib)=0D=0A+=09=09=09=09=09=09 "/lib,")) "" libraries))=0D=0A+=09= =09 (openfoam-lib=0D=0A+=09=09 (string-append #$output= =0D=0A+=09=09=09=09 "/share/OpenFOAM-" #$version=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 openfoam-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 (package-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-major+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-fl= ag (string-append "-I" vtk-inc)))=0D=0A+=09 (substitute* "wmake/= rules/linux64Gcc/c++"=0D=0A+=09=09 (("\\$\\(LIB_HEADER_DIRS\\)" all)=0D= =0A+=09=09 (string-append all " " vtk-inc-flag " "))))=0D=0A+=09 = #t))=0D=0A+=09 (delete 'configure) ;no configure phase=0D=0A+=09 = (replace 'build=0D=0A+=09 (lambda _=0D=0A+=09 ;; compile Ope= nFOAM libraries and applications=0D=0A+=09 (invoke "bash" "-c"=0D=0A= +=09=09 (format #f=0D=0A+=09=09=09 "source ./etc/bashrc && = =2E/Allwmake -j~a"=0D=0A+=09=09=09 (parallel-job-count)))))=0D=0A+= =09 (add-after 'build 'cleanup=0D=0A+=09 ;; Avoid unnecessary, vo= luminous object and dep files.=0D=0A+=09 (lambda _=0D=0A+=09 = (when (file-exists=3F "platforms/linux64GccDPInt32Opt/src")=0D=0A+=09 = (delete-file-recursively=0D=0A+=09 "platforms/linux64GccD= PInt32Opt/src"))=0D=0A+=09 (when (file-exists=3F=0D=0A+=09=09 = "platforms/linux64GccDPInt32OptOPENMPI")=0D=0A+=09 (delete-fil= e-recursively=0D=0A+=09 "platforms/linux64GccDPInt32OptOPENMPI"= ))=0D=0A+=09 (for-each delete-file=0D=0A+=09=09 (find-fil= es "." "\\.o$"))=0D=0A+ ;; Remove spurious files in src tr= ee=0D=0A+ (invoke "bash" "-c" "source ./etc/bashrc && wcle= an all")=0D=0A+ #t))=0D=0A+=09 (replace 'check=0D=0A+=09= (lambda* (#:key tests=3F #:allow-other-keys)=0D=0A+=09 (when= tests=3F=0D=0A+=09 (when (file-exists=3F "test")=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/bash= rc && ./Allrun -j~a"=0D=0A+=09=09=09=09 (parallel-job-count)))=0D=0A= + ;; cleanup=0D=0A+ (invoke "ba= sh" "-c"=0D=0A+=09=09=09 "source ../etc/bashrc && ./Allclean")))=0D=0A= +=09 ;; too many tutorials are failing=0D=0A+=09 ;; (wi= th-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 #$output=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-appe= nd "export FOAM_INST_DIR=3D" install-path "\n"))=0D=0A+=09=09 (("^expo= rt FOAM_INST_DIR=3D\\$HOME.*$") "")))=0D=0A+=09 #t))=0D=0A+=09 = (replace 'install=0D=0A+=09 (lambda* (#:key outputs inputs #:allow-o= ther-keys)=0D=0A+=09 (let ((install-path (string-append #$output=0D= =0A+=09=09=09=09=09 "/share/OpenFOAM-" #$version)))=0D=0A+=09 = (mkdir-p install-path) ;create install directory=0D=0A+=09 = ;; move contents of build directory to install directory=0D=0A+=09 = (copy-recursively "." install-path))))=0D=0A+=09 (add-after 'ins= tall 'add-symbolic-link=0D=0A+=09 (lambda _=0D=0A+=09 (let* (= (bin (string-append #$output "/bin"))=0D=0A+=09=09 (lib (string-app= end #$output "/lib"))=0D=0A+=09=09 (openfoam (string-append #$outpu= t=0D=0A+=09=09=09=09=09 "/share/OpenFOAM-" #$version))=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 (str= ing-append openfoam=0D=0A+=09=09=09=09=09 "/platforms/linux64GccD= PInt32Opt/lib"))=0D=0A+=09=09 (foam-bin (string-append openfoam "/b= in")))=0D=0A+=09 ;; add symbolic links in standard 'bin' directo= ry=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 (string-append build-bin = "/"=0D=0A+=09=09=09=09=09=09 file)=0D=0A+=09=09=09=09 (str= ing-append bin "/" file))))=0D=0A+=09=09=09 (scandir build-bin))=0D=0A= +=09 (for-each (lambda (file)=0D=0A+=09=09=09 (unless (memb= er file=0D=0A+=09=09=09=09=09 '("." ".."))=0D=0A+=09=09=09 (s= ymlink (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 symbolic link for standa= rd 'lib' directory=0D=0A+=09 (symlink build-lib lib)) #t)))))=0D= =0A+ ;; Note:=0D=0A+ ;; Tutorial files are installed read-only = in /gnu/store.=0D=0A+ ;; To allow write permissions on files copied = from the store a=0D=0A+ ;; 'chmod' step is needed before running the= applications. For=0D=0A+ ;; example, from a user's login:=0D=0A+ = ;; $ source $WM_PROJECT_DIR/etc/bashrc=0D=0A+ ;; $ mkdir -p $FOA= M_RUN=0D=0A+ ;; $ cd $FOAM_RUN=0D=0A+ ;; $ cp -r $FOAM_TUTORIAL= S/incompressible/simpleFoam/pitzDaily .=0D=0A+ ;; $ cd pitzDaily=0D=0A= + ;; $ chmod -R u+w .=0D=0A+ ;; $ blockMesh=0D=0A+ (synops= is synopsis)=0D=0A+ (description=0D=0A+ "OpenFOAM provides a s= et of solvers and methods for tackling=0D=0A+problems in the field of Com= putational Fluid Dynamics (CFD). It is written in=0D=0A+C++. Governing = equations such as the Navier-Stokes equations can be solved in=0D=0A+inte= gral form. Physical processes such as phase change, droplet transport an= d=0D=0A+chemical reaction can be modelled. Numerical methods are include= d to deal with=0D=0A+sharp gradients, such as those encountered in flows = with shock waves and flows=0D=0A+with gas/liquid interfaces. Large probl= ems may be split into smaller, connected=0D=0A+problems for efficient sol= ution on parallel systems.")=0D=0A+ (license license:gpl3+)=0D=0A+ = (home-page home-page))))=0D=0A+=0D=0A (define-public openfoam-org=0D=0A= (package=0D=0A (name "openfoam-org")=0D=0A--=20=0D=0A2.41.0=0D=0A=0D= =0A