[PATCH v2 2/2] gnu: scilab: Set SCIHOME default to respect XDG base dirs.

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
Merged with
N
N
Nicolas Graves wrote on 10 Sep 2023 19:43
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
43ba8c457ebc2994c1b53ce020fd0e1423783e4c.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(-)

Toggle diff (22 lines)
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
N
N
Nicolas Graves wrote on 10 Sep 2023 19:49
(address . control@debbugs.gnu.org)
87wmwxyl3s.fsf@ngraves.fr
merge 65853 65856 65857

--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 28 Sep 2023 21:05
(address . 65857@debbugs.gnu.org)(address . ngraves@ngraves.fr)
eca61d5d2f596ced12ad86ff55f1e09527409c38.1695927906.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(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f7e1de41f3..580d98417c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8533,7 +8533,14 @@ (define-public scilab
(("dirname")
(search-inputs-file #$inputs "/bin/dirname"))
(("basename")
- (search-inputs-file #$inputs "/bin/basename"))))))))
+ (search-inputs-file #$inputs "/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:$HOME/.local/state}/scilab\""))))))))
(home-page "https://scilab.org")
(synopsis "Software for engineers and scientists")
(description "This package provides the non-graphical version of the Scilab

base-commit: f9784991eb6c7ec1a20f76d080873a3319be0908
prerequisite-patch-id: 5ec00d550739652cba67dc8663fbde73ff268491
--
2.41.0
T
T
Tobias Geerinckx-Rice wrote on 28 Sep 2023 21:12
(no subject)
(address . control@debbugs.gnu.org)
555ae5875d161140e91feb94486ba7d6@tobias.gr
merge 65857 65856 65853
L
L
Ludovic Courtès wrote on 5 Oct 2023 16:51
Re: bug#65857: [PATCH v2 2/2] gnu: scilab: Set SCIHOME default to respect XDG base dirs.
(name . Nicolas Graves)(address . ngraves@ngraves.fr)
87bkdd3yxc.fsf_-_@gnu.org
Hi,

Nicolas Graves <ngraves@ngraves.fr> skribis:

Toggle quote (6 lines)
> + (add-after 'install 'hardcode-script-inputs
> + (lambda _
> + (substitute* (string-append #$output "/bin/scilab")
> + (("grep")
> + (search-inputs-file #$inputs "/bin/grep"))

I’ll contradict Efraim, but hopefully they’ll pardon me: I’d write it
like so:

(lambda* (#:key inputs #:allow-other-keys)
(substitute* …
(("grep")
(search-input-file inputs "/bin/grep"))))

That way it’ll DTRT even when creating a variant of this package.

(The code above had a typo too, with “inputs” as plural.)

Could you send one last updated patch?

Thanks,
Ludo’.
N
N
Nicolas Graves wrote on 5 Oct 2023 17:09
(name . Ludovic Courtès)(address . ludo@gnu.org)
871qe9p0m7.fsf@ngraves.fr
On 2023-10-05 16:51, Ludovic Courtès wrote:

Toggle quote (24 lines)
> Hi,
>
> Nicolas Graves <ngraves@ngraves.fr> skribis:
>
>> + (add-after 'install 'hardcode-script-inputs
>> + (lambda _
>> + (substitute* (string-append #$output "/bin/scilab")
>> + (("grep")
>> + (search-inputs-file #$inputs "/bin/grep"))
>
> I’ll contradict Efraim, but hopefully they’ll pardon me: I’d write it
> like so:
>
> (lambda* (#:key inputs #:allow-other-keys)
> (substitute* …
> (("grep")
> (search-input-file inputs "/bin/grep"))))
>
> That way it’ll DTRT even when creating a variant of this package.
>
> (The code above had a typo too, with “inputs” as plural.)
>
> Could you send one last updated patch?

Yes, it also has to be rebased now that scilab is version 2023.
Toggle quote (4 lines)
>
> Thanks,
> Ludo’.

--
Best regards,
Nicolas Graves
L
L
Ludovic Courtès wrote on 23 Nov 2023 11:30
(name . Nicolas Graves)(address . ngraves@ngraves.fr)
87fs0wep7x.fsf_-_@gnu.org
Hi Nicolas,

Nicolas Graves <ngraves@ngraves.fr> skribis:

Toggle quote (9 lines)
> gnu: scilab: Remove uneeded code.
> gnu: scilab: Activate tests and disable failing tests.
> gnu: scilab: Use gexp for tcl and tk libraries.
> gnu: scilab: Add phase rewrap-scilab-cli.
> gnu: scilab: Reindent.
> gnu: scilab: Update to 2024.0.0.
> gnu: scilab: Add phase set-version.
> gnu: scilab: Set default SCIHOME value.

I added one commit log that was mostly missing and applied the whole
series. Thank you!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 65857@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65857
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch