Subject: [PATCH 4/4] gnu: scilab: Add sanity-check phase.

From: Nicolas Graves <[email-masked]>
Date: Thu, 29 Aug 2024 18:25:46 +0200

* 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 --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
-- 
2.45.2