[PATCH v2 1/2] gnu: scilab: Fix and hardcode script inputs.

  • Done
  • quality assurance status badge
Details
2 participants
  • 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)
6d38ad3f36cb03c4ae6d715edcb741b5602a2997.1694367821.git.ngraves@ngraves.fr
* gnu/packages/maths.scm (scilab): Fix script inputs.
[inputs]: Reorder alphabetically. Add coreutils, grep, sed.
[arguments](phases): Add phase hardcode-script-inputs.
---
gnu/packages/maths.scm | 51 +++++++++++++++++++++++++++++-------------
1 file changed, 35 insertions(+), 16 deletions(-)

Toggle diff (101 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 38e71e18f8..900a9f0fac 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8448,22 +8448,25 @@ (define-public scilab
(base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))))
(build-system gnu-build-system)
(native-inputs (list pkg-config gfortran))
- (inputs (list libxml2
+ (inputs (list arpack-ng
+ coreutils
+ curl
+ fftw
+ gettext-minimal
+ grep
+ hdf5-1.8
+ lapack
+ libxml2
+ libx11
+ matio
+ openblas
`(,pcre "bin")
`(,pcre "out")
readline
- hdf5-1.8
- curl
- openblas
- lapack
- arpack-ng
- fftw
- gettext-minimal
+ sed
suitesparse-3
tcl
- tk
- libx11
- matio))
+ tk))
(arguments
`(#:tests? #f
#:configure-flags
@@ -8499,10 +8502,6 @@ (define-public scilab
,#~(modify-phases %standard-phases
(add-before 'build 'pre-build
(lambda _
- ;; Fix scilab script.
- (substitute* "bin/scilab"
- (("\\/bin\\/ls")
- (which "ls")))
;; Fix core.start.
(substitute* "modules/core/etc/core.start"
(("'SCI/modules")
@@ -8534,7 +8533,27 @@ (define-public scilab
(("if \\(array_size > 0\\)")
"if (*array_size > 0)"))
;; Set SCIHOME to /tmp before macros compilation.
- (setenv "SCIHOME" "/tmp"))))))
+ (setenv "SCIHOME" "/tmp")))
+ (add-after 'install 'hardcode-script-inputs
+ (lambda _
+ (substitute* (string-append #$output "/bin/scilab")
+ (("grep")
+ #$(file-append (this-package-input "grep") "/bin/grep"))
+ (("\\| sed")
+ (string-append
+ "| " #$(file-append (this-package-input "sed") "/bin/sed")))
+ (("/bin/ls")
+ #$(file-append (this-package-input "coreutils")
+ "/bin/ls"))
+ (("uname")
+ #$(file-append (this-package-input "coreutils")
+ "/bin/uname"))
+ (("dirname")
+ #$(file-append (this-package-input "coreutils")
+ "/bin/dirname"))
+ (("basename")
+ #$(file-append (this-package-input "coreutils")
+ "/bin/basename"))))))))
(home-page "https://scilab.org")
(synopsis "Software for engineers and scientists")
(description "This package provides the non-graphical version of the Scilab

base-commit: 2eb6df537c36da8bf8e81ff698421f6fb1bfd1ab
prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2
prerequisite-patch-id: 40b6c9f09f27833367a71ec25d77afae4d2a835e
prerequisite-patch-id: c12968d02d99c253f858586a86b16fa32d41f1c1
prerequisite-patch-id: 09d995d48139f8e61183d5634cda13a01cdb50f7
prerequisite-patch-id: 86baa45ec2aad977c8c8135f7613aa391155de6d
prerequisite-patch-id: 3425fbbff6a603d60b4e143ea2141aabf4ddc92c
prerequisite-patch-id: c373c01aab5dcba3503a97d51c62a595147a041c
prerequisite-patch-id: cda857c790b88c681c4e713c5f71e40291970daf
prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707
prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4
prerequisite-patch-id: ed447cba9cf9b7e1a1b47aa27acb14f8f2da0a8e
prerequisite-patch-id: 9f80c5bbbfb8cd3347951c4d57634e93ffa79924
prerequisite-patch-id: 1aaa9f0d466e2d6837f75844df48a98beb70ff24
prerequisite-patch-id: 34502820d8c0355b3ed2638c457084edeaba029d
prerequisite-patch-id: a96258da9e78cfb9ac9893cdcdeb38b69b75f134
prerequisite-patch-id: 536470ccb53bbb5672363863c14c082ecc0d5b0a
--
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
T
T
Tobias Geerinckx-Rice wrote on 28 Sep 2023 21:12
(address . control@debbugs.gnu.org)
555ae5875d161140e91feb94486ba7d6@tobias.gr
merge 65857 65856 65853
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 65856
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