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 +KAnEttKaGVXywAA9RJhRA:P1 (envelope-from ) for ; Thu, 30 Nov 2023 09:42:03 +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 +KAnEttKaGVXywAA9RJhRA (envelope-from ) for ; Thu, 30 Nov 2023 09:42:03 +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 92BF023A18 for ; Thu, 30 Nov 2023 09:42:01 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=QJf1KVuq; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=D0K+U0Eo; 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=1701333723; 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=juagGbFgHinRI6wYzDhrtNCV2Li8ZNefKB8tQg+aEK4=; b=Qo6CDtjwTcTmdEQMxh/8dLG5IxbwWGIziruYmy4irV8HsGPY8C+qgsYM1BMzj50rTOxMzA SNtNNeppbmm2Qwfe4PkXnkjM3xiD7iwuXipfZ3zuditedCIYNtcAw6p8PnUvDYJsEWQf1V Cxf0jYjhVcQFnmczR1f9PW53ODHfoT2v9t+rRljWKZizTlcRMombN3b0mg6K2pHZxKyr4u nirf9sxdRIU7C0hoDa4H8fFwYJikGDY7TqdNi1zJsCFBfEttGtYJ6T1AuXIy2BTSLP3975 88dEU6X9lfgEz9nLw4s4H7wKDUbsEfj7iodmNQQ2JQf6Hp+HpIuzdId35mOGuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=QJf1KVuq; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=D0K+U0Eo; 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=1701333723; a=rsa-sha256; cv=none; b=bblV0ejXLtPpXb/xFJjZ1MC0UjLbWC6+RZGbY8t7mj6LBcKh2MdTHt8iN0yRQZX9SF8XAG roR4E6qKX7qtJAGCGRgR8PEVvJxKi0GY72AAqAVa994P9I9IM9/CHFTYkAS8hIZ2E0aS3J SvFeiFgOEH2Gnu7oMSTl/maaw9GHnW/70g4LOkUpi5yt1HowGod3eVE5+1VJj4aNqjMSqd xggy3E54Mqb9IAIqvTJU08iJWkj+bXqWsfdQffnbu1DXbq4/nZlh88lBCDvutL8CpjKH3B zG70yPnrymaDQz7EMF5xLsUWL7j0h10xc6FRE2ImD/F3/2umCRpzcMOK+NmBLA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8ccO-0003Eq-Q8; Thu, 30 Nov 2023 03:41:56 -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 1r8ccN-0003EI-2L for guix-patches@gnu.org; Thu, 30 Nov 2023 03:41:55 -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 1r8ccM-0001JY-DH for guix-patches@gnu.org; Thu, 30 Nov 2023 03:41:54 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8ccU-00061Q-7G for guix-patches@gnu.org; Thu, 30 Nov 2023 03:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66262] [PATCH v6 3/6] gnu: openfoam-org: Improve internal path handling. In-Reply-To: <0102018ae02b1a04-440a9320-f59f-4304-bf10-01dfb00717ca-000000@eu-west-1.amazonses.com> Resent-From: reza Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Nov 2023 08:42: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.170133368923092 (code B ref 66262); Thu, 30 Nov 2023 08:42:02 +0000 Received: (at 66262) by debbugs.gnu.org; 30 Nov 2023 08:41:29 +0000 Received: from localhost ([127.0.0.1]:52221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8cbw-00060O-Sf for submit@debbugs.gnu.org; Thu, 30 Nov 2023 03:41:29 -0500 Received: from a50-60.smtp-out.eu-west-1.amazonses.com ([54.240.50.60]:47523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0102018c1f638b54-d6cf3a44-a138-4161-b415-b1529a9c1ae7-000000@mail.housseini.me>) id 1r8cbu-000608-Az for 66262@debbugs.gnu.org; Thu, 30 Nov 2023 03:41:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=solmzk3ljecfoypi3q6x2mqs3bucnhjw; d=housseini.me; t=1701333666; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id; bh=KQ971dixewl1csyo1lA2vHhNn0pGPJJsnppeAo8EMIQ=; b=QJf1KVuqdhu1Bs1htcngCcLxSqpA8uV3RKNy40orJT1c0vGB2hgnhL2geChNnx4i aCBJPwuAGUdtH0K4EudpTJtfC3AD6xa88dkSoWTFoPiRJBuK2Ur3MUxXXbJyyepv9XT fq58mnRsFIO9frtzqN8aX5NW77i/DC0XNlfw+F+o= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1701333666; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:References:Message-Id:Feedback-ID; bh=KQ971dixewl1csyo1lA2vHhNn0pGPJJsnppeAo8EMIQ=; b=D0K+U0Eozw/I5CLQ7s+9Rmc2fkV3t74AiReVKaGWrYvRkShXSAnj9WLB9sJ5vwDj qkiO5J/tyx5YL3zOis03kwKqaWeE4FgMe9YJ0FqPlO/IBTeI7mAFr2VXYg8jmBFMhxT BO4V5ExmgP3F2QbYme5oTnIrbv2lxRAK1CTJGelQ= Date: Thu, 30 Nov 2023 08:41:06 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: X-Mailer: Amazon WorkMail Thread-Index: AQHaI2j050IR+WECTleuj/w7ypfFqQ== Thread-Topic: [PATCH v6 3/6] gnu: openfoam-org: Improve internal path handling. X-Wm-Sent-Timestamp: 1701333665 X-Original-Mailer: git-send-email 2.41.0 Message-ID: <0102018c1f638b54-d6cf3a44-a138-4161-b415-b1529a9c1ae7-000000@eu-west-1.amazonses.com> Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2023.11.30-54.240.50.60 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: 92BF023A18 X-Spam-Score: -4.63 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.63 X-TUID: VDY/6u9t9m03 * 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=0D=0Abase-commit: cd4= 6757c1a0f886848fbb6828c028dd2a2532767=0D=0Aprerequisite-patch-id: e928ac9= ae5a11e33ced4f46fed14ea984b551d0c=0D=0Aprerequisite-patch-id: ff305aca256= 44db4a2b385cd2a9980df4ca457d5=0D=0A--=20=0D=0A2.41.0=0D=0A=0D=0A