@@ -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