From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id CPg9DXhAamVfyQAAauVa8A:P1 (envelope-from ) for ; Fri, 01 Dec 2023 21:22:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CPg9DXhAamVfyQAAauVa8A (envelope-from ) for ; Fri, 01 Dec 2023 21:22:16 +0100 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 C1D4458F0C for ; Fri, 1 Dec 2023 21:22:15 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=XunZB2N8; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=hlFLHEU0; 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=1701462136; a=rsa-sha256; cv=none; b=EsAaG+oGAIZJhk22sYvO7zpCNicX6H+kt8aYPvV9mNshiiUEEebBp9mqCreMEBuZ2mEX36 tBQmUsRylV6P5h8F6Yp2xXJuA03VLVOB3OMQeQwlVcGnSHUl/9ICT2Lncb8Z9cBceSdNk1 oumM0LZCRwYMfYEln8ji4SjiGB6Xj/oCXhJW/xApe9v5Wn+AGVbus+9z/YH8POrhUxEWck aOMy+USdXYg5UR11upNQylkl1z5Bk7gqbvBanlrejspVCFm+htQwdoVwHVI4cpmQTkZRz7 HimUFGeyzYMl5vKfAmHN948Y8jrV2u39ef88JmCjLyt4EtLLnkw4JTWnO2h1Pg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=XunZB2N8; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=hlFLHEU0; 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=1701462136; 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=XjuwwKQblN19opQswLvq4WuHj6L2QSesYb20GM5NHHw=; b=VSDId2e29x+7zZ/0URDLgG5230zOH3N1Na2RbKjtlAyg5XtrbNYhoHMqVEiq1em6hHcz6Q PffIV/3d2xxu3My1H4x1S/7j8caifAUBW8lwCdH9Xx7bfWdSkOpj4MQHbNkm/D1AQmQ6a8 9smIsrQktzz28iZBt8F5w85mWlvDOJnLco4b567wPOPmg6u5hI3tEUvx3ClqsPlV0If70G 9Big0Qkxqt8Y3W1PjUjL6QxE4+xM2JtbtjONETOBDwFdcIfdPFIWoN0x6VrfxlQNBibFmu ZFZjX6pVwzeklXEJdSZNr03NxM4HRPJkmfDBrlwRbQ/zpiecJz7IOzr+sB5pyw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r9A1O-0004W8-6d; Fri, 01 Dec 2023 15:21:58 -0500 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 1r9A1K-0004UN-Hn for guix-patches@gnu.org; Fri, 01 Dec 2023 15:21:54 -0500 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 1r9A1K-00059x-9R for guix-patches@gnu.org; Fri, 01 Dec 2023 15:21:54 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r9A1T-0000Zr-4e for guix-patches@gnu.org; Fri, 01 Dec 2023 15:22:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66262] [PATCH v7 3/7] gnu: openfoam-org: Improve internal path handling. Resent-From: reza Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Dec 2023 20:22: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.17014621142156 (code B ref 66262); Fri, 01 Dec 2023 20:22:03 +0000 Received: (at 66262) by debbugs.gnu.org; 1 Dec 2023 20:21:54 +0000 Received: from localhost ([127.0.0.1]:56144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9A1J-0000Yg-Kr for submit@debbugs.gnu.org; Fri, 01 Dec 2023 15:21:54 -0500 Received: from a6-238.smtp-out.eu-west-1.amazonses.com ([54.240.6.238]:48785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0102018c270b27c4-0d31f22d-4f5d-46d5-91a1-03cc727da837-000000@mail.housseini.me>) id 1r9A1H-0000Y7-W6 for 66262@debbugs.gnu.org; Fri, 01 Dec 2023 15:21:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=solmzk3ljecfoypi3q6x2mqs3bucnhjw; d=housseini.me; t=1701462091; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id; bh=m2AT8XjEcCsN4AmP6DQqzR6IdqVJFZiIFxK7MUBQi+s=; b=XunZB2N8SbJfFuxdhJI2wUdwX5zK4I6+Ls3HoGD/T6qJwtVrsTwWdJ35XHET5PDH hDuRtsWCOG2f80aiw/JOrskk2P0OrAVd+ppVCuKV+fUAAeht6bT8qpu9XloXqQX7KZ7 5npyxzka/WGYf45YfA2mYtIBitZt8ZvJCa+NjTvY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1701462091; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id:Feedback-ID; bh=m2AT8XjEcCsN4AmP6DQqzR6IdqVJFZiIFxK7MUBQi+s=; b=hlFLHEU0cmhGiGAUlqkaW1fCeM6IgZJxus03mTbXPYUm7uS1xI3tiPBE/luXtBqs /OCTEiFe4IVjrFEAPiR62w2jN/4LckDgTYgm+lS58CQsKVYSOdnyOsKE0O4ZI3zWVU6 tY7YvaBquOqEknaAGQedu421+ukLr5er4ATP9Zp0= Date: Fri, 1 Dec 2023 20:21:31 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In-Reply-To: <5a90ca452eac7f8947a241bf0900ca928acc311f.1701462064.git.reza@housseini.me> References: <5a90ca452eac7f8947a241bf0900ca928acc311f.1701462064.git.reza@housseini.me> X-Mailer: Amazon WorkMail Thread-Index: AQHaJJPzxeoHSzDjRfGKH1PaN4MhNQAAAUom Thread-Topic: [PATCH v7 3/7] gnu: openfoam-org: Improve internal path handling. X-Wm-Sent-Timestamp: 1701462090 X-Original-Mailer: git-send-email 2.41.0 Message-ID: <0102018c270b27c4-0d31f22d-4f5d-46d5-91a1-03cc727da837-000000@eu-west-1.amazonses.com> Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2023.12.01-54.240.6.238 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-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.13 X-Spam-Score: -6.13 X-Migadu-Queue-Id: C1D4458F0C X-TUID: XhlxUYfQEgu2 * gnu/packages/simulation.scm (openfoam-org): Improve handling of interna= l=0D=0Apath WM_PROJECT_DIR.=0D=0A=0D=0AChange-Id: I43de76fb009f955294686a= 0b45bf3dc0217e7dc7=0D=0A---=0D=0A gnu/packages/simulation.scm | 57 ++++++= ++++++++++++++++++++++---------=0D=0A 1 file changed, 43 insertions(+), 1= 4 deletions(-)=0D=0A=0D=0Adiff --git a/gnu/packages/simulation.scm b/gnu/= packages/simulation.scm=0D=0Aindex 73e53fe35f..75eb070f64 100644=0D=0A---= a/gnu/packages/simulation.scm=0D=0A+++ b/gnu/packages/simulation.scm=0D=0A= @@ -197,8 +197,10 @@ (define-public openfoam-org=0D=0A ;; Executabl= e files and shared libraries are located in the 'platforms'=0D=0A ;= ; subdirectory.=0D=0A #:strip-directories=0D=0A- #~(list "shar= e/OpenFOAM/platforms/linux64GccDPInt32Opt/bin"=0D=0A- "share= /OpenFOAM/platforms/linux64GccDPInt32Opt/lib")=0D=0A+ #~(list (strin= g-append "OpenFOAM-" #$(package-version this-package)=0D=0A+ = "/platforms/linux64GccDPInt32Opt/bin")=0D=0A+=09 (st= ring-append "OpenFOAM-" #$(package-version this-package)=0D=0A+ = "/platforms/linux64GccDPInt32Opt/lib"))=0D=0A=20=0D=0A= #:modules=0D=0A '((ice-9 ftw)=0D=0A@@ -278,7 +280,9 @@ (defi= ne-public openfoam-org=0D=0A = "/lib,")) "" libraries))=0D=0A (openfoa= m-lib=0D=0A (string-append #$output=0D=0A- = "/share/OpenFOAM/platforms/linux64GccDP= Int32Opt/lib"))=0D=0A+ "/share/Ope= nFOAM-"=0D=0A+ #$(package-version = this-package)=0D=0A+ "/platforms/l= inux64GccDPInt32Opt/lib"))=0D=0A (ldflags=0D=0A = (string-append "-Wl,"=0D=0A = rpaths=0D=0A@@ -338,19 +342,32 @@ (define-public openf= oam-org=0D=0A ;; (with-directory-excursion "tutorials"=0D= =0A ;; (invoke "bash" "-c" "source ../etc/bashrc && ./All= test"))=0D=0A ) #t))=0D=0A+ (add-before 'install= 'set-paths=0D=0A+ (lambda _=0D=0A+ (let ((instal= l-path (string-append #$output=0D=0A+=09=09=09=09 "/share= /OpenFOAM-"=0D=0A+ #$(pac= kage-version this-package))))=0D=0A+ (substitute* "etc/bas= hrc"=0D=0A+=09 (("^\\[ \"\\$BASH\".*$") "")=0D=0A+=09 (= ("^export FOAM_INST_DIR=3D\\$\\(cd.*$")=0D=0A+=09 (string-appen= d "export FOAM_INST_DIR=3D" install-path "\n"))=0D=0A+=09 (("^ex= port FOAM_INST_DIR=3D\\$HOME.*$") ""))) #t))=0D=0A (replace 'in= stall=0D=0A (lambda _=0D=0A- (let ((install-dir = (string-append #$output=0D=0A- = "/share/OpenFOAM")))=0D=0A- (mkdir-p install-dir) ;cr= eate install directory=0D=0A+ (let ((install-path (string-ap= pend #$output=0D=0A+ "/sh= are/OpenFOAM-"=0D=0A+ #$(= package-version this-package))))=0D=0A+ (mkdir-p install-p= ath) ;create install directory=0D=0A ;; move contents of = build directory to install directory=0D=0A- (copy-recursiv= ely "." install-dir))))=0D=0A+ (copy-recursively "." insta= ll-path))))=0D=0A (add-after 'install 'add-symbolic-link=0D=0A = (lambda _=0D=0A (let* ((bin (string-append #$ou= tput "/bin"))=0D=0A (lib (string-append #$output "/l= ib"))=0D=0A+ (etc (string-append #$output "/etc"))=0D= =0A (openfoam (string-append #$output=0D=0A- = "/share/OpenFOAM"))=0D=0A+ = "/share/OpenFOAM-"=0D=0A+ = #$(package-version this-package)))=0D=0A= (build-bin (string-append openfoam=0D=0A = "/platforms/linux64GccDPInt32Opt/bin= "))=0D=0A (build-lib (string-append openfoam=0D=0A@@= -373,12 +390,24 @@ (define-public openfoam-org=0D=0A = (string-append bin "/" file))))=0D=0A = (scandir foam-bin))=0D=0A ;; add symbolic link= for standard 'lib' directory=0D=0A- (symlink build-lib li= b)) #t)))))=0D=0A- (native-search-paths=0D=0A- (list (search-path-= specification=0D=0A- (variable "WM_PROJECT_DIR")=0D=0A- = (separator #f)=0D=0A- (files '("share/OpenFOAM")))))=0D=0A= + (symlink build-lib lib)=0D=0A+ ;; add sym= bolic link for bashrc file=0D=0A+ (mkdir-p etc)=0D=0A+ = (symlink (string-append openfoam "/etc/bashrc")=0D=0A+ = (string-append etc "/bashrc"))) #t))=0D=0A+ (a= dd-after 'add-symbolic-link 'wrap=0D=0A+ (lambda* (#:key pytho= n inputs outputs #:allow-other-keys)=0D=0A+ (let* ((bin (str= ing-append #$output "/bin"))=0D=0A+ (openfoam (string= -append #$output=0D=0A+ "/sh= are/OpenFOAM-"=0D=0A+ #$(pac= kage-version this-package))))=0D=0A+ (for-each=0D=0A+ = (lambda (program)=0D=0A+ (unless (member pr= ogram=0D=0A+ '("." ".."))=0D=0A+ = (wrap-program (string-append bin "/" program)=0D=0A+ = `("WM_PROJECT_DIR" ":" prefix (,openfoam)))))=0D=0A+ = (scandir bin))))))))=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--=20=0D=0A2.41.0=0D=0A= =0D=0A