From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GFMXGbehZ2W7DAAA9RJhRA:P1 (envelope-from ) for ; Wed, 29 Nov 2023 21:40:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GFMXGbehZ2W7DAAA9RJhRA (envelope-from ) for ; Wed, 29 Nov 2023 21:40:23 +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 0E09B364CB for ; Wed, 29 Nov 2023 21:40:23 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=XeOIsj6y; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=hmoCqARu; 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=1701290423; 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=Gw+wR+YWOAH2fqnCROfrdF7DlYxDlWfQRSbX+b7q75424OJs1abdyoIoVIm6Py3yHXLutX scQ4ocFilgJfER+vGZQ1LqYr86ufT6dBv5elrVCP/Ssp9PM5cKi+owrO4m96sqmRPq9iDu k+LsDYjEQ3JdioTdH8bFIczWVLP2loxH8B34ObF0EOs/17OpNPscyJ/9vHveJ/+J93RbrK 3klH6spHZ0qNF/L1Rr4TR1TLpMabKkVzhlJV3YYoypY42P08FQXY2tRoQMpan57d0NoNLR H5UWY/7eOY8N++cSNZty1Sr3lm48+tACmBsp7MhAjqnRDTq5SgxC0L+l3IskpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=XeOIsj6y; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=hmoCqARu; 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-Seal: i=1; s=key1; d=yhetil.org; t=1701290423; a=rsa-sha256; cv=none; b=XWC8TWClrNWBCxWCHA+MOJAemAZVvAERNraX3DAwD3bwcXURjUJR7pwdlVgBYw1T6IqH6P fJ0b96M/XIpNOwQmvegHTcoaLijDug4e+fEX+8l/QQBjUdJ/sRL5WVZkHCBjdahdiyz1KJ csI4Hf2xg3hBHV0Ywhqif/aScQY1eSusdTEb0n4lLF1XIp9U6JClueVP8f2jZm8ZNYLf2n 3r5yi0h10D4E4PzQ+7vOJEba2wRY4QU4X+NZBuH1HpERxB5Avl047JCS7/xxsDCAMSg+IF eB0pVV+57aCdMN1p1eEcsiuERM1K6Ih8jsdhU+7Qz0gWr/biNihRD6u6M3X3zA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8RLj-0000RI-Td; Wed, 29 Nov 2023 15:40:00 -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 1r8RLh-0000J3-3k for guix-patches@gnu.org; Wed, 29 Nov 2023 15:39:57 -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 1r8RLg-0004D2-Rp for guix-patches@gnu.org; Wed, 29 Nov 2023 15:39:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8RLn-0007qR-GM for guix-patches@gnu.org; Wed, 29 Nov 2023 15:40:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66262] [PATCH v5 3/6] gnu: openfoam-org: Improve internal path handling. Resent-From: reza Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Nov 2023 20:40: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.170129039830121 (code B ref 66262); Wed, 29 Nov 2023 20:40:03 +0000 Received: (at 66262) by debbugs.gnu.org; 29 Nov 2023 20:39:58 +0000 Received: from localhost ([127.0.0.1]:51561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8RLh-0007pk-Ge for submit@debbugs.gnu.org; Wed, 29 Nov 2023 15:39:57 -0500 Received: from a2-83.smtp-out.eu-west-1.amazonses.com ([54.240.2.83]:47833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0102018c1ccefd42-56f59917-da2f-47d0-811f-63af76b3da98-000000@mail.housseini.me>) id 1r8RLf-0007pI-FO for 66262@debbugs.gnu.org; Wed, 29 Nov 2023 15:39:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=solmzk3ljecfoypi3q6x2mqs3bucnhjw; d=housseini.me; t=1701290376; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id; bh=m2AT8XjEcCsN4AmP6DQqzR6IdqVJFZiIFxK7MUBQi+s=; b=XeOIsj6yWAEp8rLOmPl/Jn2jd13FnG8EVYy6XoTZvnSt7KHEbFz7X8O04ONNFC7Z UAis+4kXqfG74ZDeKYq9pCoHgsmHjOrwYwVcQkeqAQJvNu/CW/xVD4WzX0AVzNk4F/Z 9DC0hXVoCTELTdaw/gbxJHI9rb+IQt9oL/7CnCF0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1701290376; 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=hmoCqARuzAFlLCLFlez2BZ1z4HslRFL4IE8iah6WviP9q53xivcNk0kUuaCeqUD1 qGI8LijbdFe3JSbQW+l/ghbSbO3JEKysAs4PiJPQeDccM5BxdcoOPtqoi0A/mciXsbx PRCdl8ewfaOs1RiXilwjM5enBrEzng6sj7fE46nw= Date: Wed, 29 Nov 2023 20:39:36 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In-Reply-To: <5a90ca452eac7f8947a241bf0900ca928acc311f.1701290362.git.reza@housseini.me> References: <5a90ca452eac7f8947a241bf0900ca928acc311f.1701290362.git.reza@housseini.me> X-Mailer: Amazon WorkMail Thread-Index: AQHaIwQod43bSScuRrGYEX9KqcuZbAAAAIGI Thread-Topic: [PATCH v5 3/6] gnu: openfoam-org: Improve internal path handling. X-Wm-Sent-Timestamp: 1701290375 X-Original-Mailer: git-send-email 2.41.0 Message-ID: <0102018c1ccefd42-56f59917-da2f-47d0-811f-63af76b3da98-000000@eu-west-1.amazonses.com> Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2023.11.29-54.240.2.83 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 0E09B364CB X-Spam-Score: -6.13 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.13 X-TUID: KKj1vzrmDBd5 * 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