guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: maxima: Patch hardcoded paths.


From: guix-commits
Subject: 01/01: gnu: maxima: Patch hardcoded paths.
Date: Sat, 26 Jan 2019 11:04:49 -0500 (EST)

kkebreau pushed a commit to branch master
in repository guix.

commit fc9c47bd7cdfd6265681e6b2c48fdb7889672bcc
Author: Kei Kebreau <address@hidden>
Date:   Fri Jan 25 21:37:26 2019 -0500

    gnu: maxima: Patch hardcoded paths.
    
    * gnu/packages/maths.scm: (maxima): Patch hardcoded paths.
    [arguments]: Add the phase 'patch-paths' to replace references to sed,
    dirname, and head with direct references to the store.
    [inputs]: Add sed.
---
 gnu/packages/maths.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 66d6063..602c696 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2705,6 +2705,7 @@ to BMP, JPEG or PNG image formats.")
     (inputs
      `(("gcl" ,gcl)
        ("gnuplot" ,gnuplot)                       ;for plots
+       ("sed" ,sed)
        ("tk" ,tk)))                               ;Tcl/Tk is used by 'xmaxima'
     (native-inputs
      `(("texinfo" ,texinfo)
@@ -2727,6 +2728,17 @@ to BMP, JPEG or PNG image formats.")
        #:make-flags (list "TMPDIR=/tmp")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
+                    (coreutils (assoc-ref inputs "coreutils"))
+                    (dirname (string-append coreutils "/bin/dirname"))
+                    (head (string-append coreutils "/bin/head")))
+               (substitute* "src/maxima.in"
+                 (("sed ") (string-append sed " "))
+                 (("dirname") dirname)
+                 (("head") head))
+               #t)))
          (add-before 'check 'pre-check
            (lambda _
              (chmod "src/maxima" #o555)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]