diff mbox series

[bug#72873,4/4] gnu: scilab: Add sanity-check phase.

Message ID 20240829162554.28746-4-ngraves@ngraves.fr
State New
Headers show
Series [bug#72873,1/4] gnu: scilab: Update to 2024.1.0. | expand

Commit Message

Nicolas Graves Aug. 29, 2024, 4:25 p.m. UTC
* gnu/packages/maths.scm (scilab):
  [arguments]<#:phases>: Add sanity-check phase.

Change-Id: Idc6911511fd0bf7e779d4af026f0a6390eb3b079
---
 gnu/packages/maths.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 48a22bb6a1..577d9b87aa 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -10054,7 +10054,12 @@  (define (bin path) (string-append #$output "/bin/" path))
                     "\"${XDG_STATE_HOME:-$HOME/.local/state}/scilab/"
                     #$(package-version this-package) "\""))
                   (("export SCI=")
-                   "unset LANGUAGE\nexport SCI="))))))))
+                   "unset LANGUAGE\nexport SCI="))))
+            (add-after 'rewrap-scilab-cli 'sanity-check
+              (lambda _
+                (setenv "HOME" (getcwd))
+                (invoke (string-append #$output "/bin/scilab-cli")
+                        "-e" "\"quit;\"")))))))
     (home-page "https://www.scilab.org/")
     (synopsis "Software for engineers and scientists")
     (description "This package provides the non-graphical version of the Scilab