GNU bug report logs - #65853
[PATCH] gnu: scilab: Fix and hardcode script inputs.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Sun, 10 Sep 2023 16:20:02 UTC

Severity: normal

Tags: patch

Merged with 65856, 65857

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 65853 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [bug#65853] [PATCH v3 4/8] gnu: scilab: Add phase rewrap-scilab-cli.
Date: Mon,  6 Nov 2023 00:51:47 +0100
* gnu/packages/maths.scm (scilab): Add phase rewrap-scilab-cli.

Change-Id: Ia3ca5df1a4795c34b6c1cdc8c3b0d7cc2badf0cb
---
 gnu/packages/maths.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 62c935a868..68e041c33b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -9703,7 +9703,27 @@ (define-public scilab
                 (apply invoke "make"
                        "src/cpp/parse/parsescilab.cpp"
                        "src/cpp/parse/scanscilab.cpp"
-                       make-flags))))))))
+                       make-flags))))
+          ;; The startup script is mostly there to define the following env
+            ;; variables properly. We can do this with guix directly.
+            (add-after 'install 'rewrap-scilab-cli
+              (lambda _
+                (define (bin path) (string-append #$output "/bin/" path))
+                (delete-file (bin "scilab-cli"))
+                (wrap-program (bin "scilab-cli-bin")
+                  `("SCI" = (,(string-append #$output "/share/scilab")))
+                  `("LD_LIBRARY_PATH" ":" prefix
+                    (,(string-append #$output "/lib/scilab")))
+                  `("TCL_LIBRARY" = (,(string-append #$tcl "/lib")))
+                  `("TK_LIBRARY" = (,(string-append #$tk "/lib"))))
+                (copy-file (bin "scilab-cli-bin") (bin "scilab-cli"))
+                (copy-file (bin ".scilab-cli-bin-real") (bin "scilab-cli-bin"))
+                (delete-file (bin ".scilab-cli-bin-real"))
+                (substitute* (bin "scilab-cli")
+                  (("\\.scilab-cli-bin-real")
+                   "scilab-cli-bin")
+                  (("export SCI=")
+                   "unset LANGUAGE\nexport SCI="))))))))
     (home-page "https://www.scilab.org/")
     (synopsis "Software for engineers and scientists")
     (description "This package provides the non-graphical version of the Scilab
-- 
2.41.0





This bug report was last modified 1 year and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.