From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 kC41ERpLZ2U5hQAAG6o9tA:P1 (envelope-from ) for ; Wed, 29 Nov 2023 15:30:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kC41ERpLZ2U5hQAAG6o9tA (envelope-from ) for ; Wed, 29 Nov 2023 15:30:50 +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 0006D13766 for ; Wed, 29 Nov 2023 15:30:49 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=Ypd+ncGC; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=utdAFjon; 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=1701268250; a=rsa-sha256; cv=none; b=AwmqDjIelP88LmcJUy8+vzGnQdx/e2W2E40oa3wN2qMNu8DR4bUT0hRejZw0b7sAIBNtbU PKC5qhEFe458f7lxv/fvdu+fSilj0KEU5E8QorkaPfimy3+Uf/qD7MyO+50dQhKU7qDRJ8 /ChjGTN7ffc9bxLJfSJ5m+SEiTZYeZCEgBqlRkkUQs+k5e/AQ9BBkQqi092u8fNyP/INE+ nzSZ9AdBLGU70Lvh2eFd1hPxGpiYBo94DcCPYGXfriODl7cC1fUVJcO9zjK7KBNiIaIqKK M03gQ8Wjh6hCcZ4OTcNrEOoVXmdQYLRAxXkpzcB625w/wP5d51cbJ4I1R49PNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=housseini.me header.s=solmzk3ljecfoypi3q6x2mqs3bucnhjw header.b=Ypd+ncGC; dkim=fail ("headers rsa verify failed") header.d=amazonses.com header.s=shh3fegwg5fppqsuzphvschd53n6ihuv header.b=utdAFjon; 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=1701268250; 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=NZcoT/Caxqx8T0c+hcrFZigvyGgCUHvTalUBTOr5CfMNeGZ5RJ/yDyiOXP4jIYrE1w1Jux tpxdMmpQjuzeYR8gJ/trGHid3MxBf9BxGcWjxpGRlIyF2md8MkQGFKR4FX5tv6Fhh6KvIv 7gj4S4yANV2e+n3MOBPWxMQlJx7bJ7mEBhNzl2T7kuOe1Ed64exIJxEUwapI292s8Bkswu 3iP+h4kb2HS84ydk6p34SRc93Vsyudu/4oyWU1GJ3oAtr+BxIZzJTBk/ppUthcXASD40fa VIBP8vFjZXv5uGmlhCVeCGmSjFT2EqB+ZwbyOHmZNrvJGi+7+Z5QKLBCDUKW+A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8LZf-0007Np-Fz; Wed, 29 Nov 2023 09:29:59 -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 1r8LZc-0007MN-JL for guix-patches@gnu.org; Wed, 29 Nov 2023 09:29:56 -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 1r8LZc-00020R-BD for guix-patches@gnu.org; Wed, 29 Nov 2023 09:29:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8LZj-0002dM-Rt for guix-patches@gnu.org; Wed, 29 Nov 2023 09:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66262] [PATCH v4 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 14:30: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.170126817110004 (code B ref 66262); Wed, 29 Nov 2023 14:30:03 +0000 Received: (at 66262) by debbugs.gnu.org; 29 Nov 2023 14:29:31 +0000 Received: from localhost ([127.0.0.1]:49225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8LZC-0002bG-Hy for submit@debbugs.gnu.org; Wed, 29 Nov 2023 09:29:31 -0500 Received: from a2-86.smtp-out.eu-west-1.amazonses.com ([54.240.2.86]:52407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <0102018c1b7bd644-e5d6a960-b3c2-48aa-9822-a7b6188ea8c4-000000@mail.housseini.me>) id 1r8LZA-0002ao-M1 for 66262@debbugs.gnu.org; Wed, 29 Nov 2023 09:29:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=solmzk3ljecfoypi3q6x2mqs3bucnhjw; d=housseini.me; t=1701268149; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id; bh=m2AT8XjEcCsN4AmP6DQqzR6IdqVJFZiIFxK7MUBQi+s=; b=Ypd+ncGC+Q2/q6dyZzIJoscYIr3k0YHQLq4uBZDaNfWGKJhH2yEwXc84yyIzNOnI +viBOxITXXPCMnOiHdxPaW2wjz68ebZr3kpIKd+TqDMpE+JP6uWnjD+ESgu9yRdrplK Lw91aI2O4yo9jts6b5Zya9vciKNtU9xEr5J5Rysw= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=shh3fegwg5fppqsuzphvschd53n6ihuv; d=amazonses.com; t=1701268149; 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=utdAFjonW2ZensPB6ZIhYAx8iDdhaFScjM4zYYUHOKNFyyqtc8hAfJVZCQehmenH Ie1j81oDmFcuK+1ZuICf2ipSORWzWf+dcQcp8kUVga8AIfG1sDvrJBYbMi3rjXggwai 6GPnAwZZahvjfWPCclBym780TxM8i39K8WUp/LtQ= Date: Wed, 29 Nov 2023 14:29:09 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <0acf762696be31d70a2c40523c0054e52f9606ef.1701268112.git.reza@housseini.me> X-Mailer: Amazon WorkMail Thread-Index: AQHaItBgpBQ4R4lqRQW/cxQVMxxTZAAAAnbI Thread-Topic: [PATCH v4 3/6] gnu: openfoam-org: Improve internal path handling. X-Wm-Sent-Timestamp: 1701268149 X-Original-Mailer: git-send-email 2.41.0 Message-ID: <0102018c1b7bd644-e5d6a960-b3c2-48aa-9822-a7b6188ea8c4-000000@eu-west-1.amazonses.com> Feedback-ID: 1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2023.11.29-54.240.2.86 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: 0006D13766 X-TUID: Io7IFnDo4iE3 * 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