unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 65857@debbugs.gnu.org
Cc: ngraves@ngraves.fr, Andreas Enge <andreas@enge.fr>,
	Efraim Flashner <efraim@flashner.co.il>,
	Eric Bavier <bavier@posteo.net>
Subject: [bug#65857] [PATCH v2 2/2] gnu: scilab: Set SCIHOME default to respect XDG base dirs.
Date: Sun, 10 Sep 2023 19:43:41 +0200	[thread overview]
Message-ID: <43ba8c457ebc2994c1b53ce020fd0e1423783e4c.1694367821.git.ngraves@ngraves.fr> (raw)
In-Reply-To: <6d38ad3f36cb03c4ae6d715edcb741b5602a2997.1694367821.git.ngraves@ngraves.fr>

* gnu/packages/maths.scm (scilab): Set SCIHOME default to respect XDG base dirs.
[arguments](phases): Add phase respect-xdg-base-dirs.
---
 gnu/packages/maths.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 900a9f0fac..8162ab95d1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8553,7 +8553,14 @@ (define-public scilab
                                   "/bin/dirname"))
                   (("basename")
                    #$(file-append (this-package-input "coreutils")
-                                  "/bin/basename"))))))))
+                                  "/bin/basename")))))
+            (add-after 'hardcode-script-inputs 'respect-xdg-base-dirs
+              (lambda _
+                (substitute* (string-append #$output "/bin/scilab")
+                  (("IS_SCILAB_BINARY=0" all)
+                   (string-append all
+                                  "\n[ -n \"$SCIHOME\" ] &&\
+ SCIHOME=\"${XDG_STATE_HOME}/scilab\""))))))))
     (home-page "https://scilab.org")
     (synopsis "Software for engineers and scientists")
     (description "This package provides the non-graphical version of the Scilab
-- 
2.41.0





  reply	other threads:[~2023-09-10 17:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 17:43 [bug#65856] [PATCH v2 1/2] gnu: scilab: Fix and hardcode script inputs Nicolas Graves via Guix-patches via
2023-09-10 17:43 ` Nicolas Graves via Guix-patches via [this message]
2023-09-28 19:05   ` [bug#65857] [PATCH v2] gnu: scilab: Set SCIHOME default to respect XDG base dirs Nicolas Graves via Guix-patches via
  -- strict thread matches above, loose matches on Subject: below --
2023-09-10 16:18 [bug#65853] [PATCH] gnu: scilab: Fix and hardcode script inputs Nicolas Graves via Guix-patches via
2023-09-28 19:03 ` [bug#65853] [PATCH v2] " Nicolas Graves via Guix-patches via
2023-10-05 14:51   ` [bug#65853] bug#65857: [PATCH v2 2/2] gnu: scilab: Set SCIHOME default to respect XDG base dirs Ludovic Courtès
2023-10-05 15:09     ` [bug#65857] " Nicolas Graves via Guix-patches via
2023-11-05 23:51 ` [bug#65853] [PATCH v3 0/8] Scilab: Big update Nicolas Graves via Guix-patches via
2023-11-23 10:30   ` [bug#65857] [PATCH v2 2/2] gnu: scilab: Set SCIHOME default to respect XDG base dirs Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43ba8c457ebc2994c1b53ce020fd0e1423783e4c.1694367821.git.ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=65857@debbugs.gnu.org \
    --cc=andreas@enge.fr \
    --cc=bavier@posteo.net \
    --cc=efraim@flashner.co.il \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).