guix_mirror_bot pushed a commit to branch misc-world-rebuild
in repository guix.

commit 8f791989910669c0f327f94fbbca2f1f275122a2
Author: Nguyễn Gia Phong <[email protected]>
AuthorDate: Wed Jul 8 13:42:33 2026 +0900

    gnu: octave: Fix build.
    
    Inherited gexp phases don't play nicely with quasi-quotes.
    
    * gnu/packages/maths.scm (octave)[arguments]<#:phases>: Use gexps.
      [native-inputs, inputs]: Use modify-inputs.
---
 gnu/packages/maths.scm | 54 ++++++++++++++++++++++----------------------------
 1 file changed, 24 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d63ef54108..80505ac683 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3624,15 +3624,6 @@ script files.")
 (define-public octave
   (package (inherit octave-cli)
     (name "octave")
-    (inputs
-     `(("qscintilla" ,qscintilla)
-       ("qt" ,qtbase-5)
-       ("qtwayland" ,qtwayland-5)
-       ,@(package-inputs octave-cli)))
-    (native-inputs
-     `(("qttools-5" , qttools-5) ;for lrelease
-       ("texlive" ,(texlive-local-tree (list texlive-epsf))) ; for texi2dvi
-       ,@(package-native-inputs octave-cli)))
     (arguments
      (substitute-keyword-arguments arguments
        ((#:modules modules %default-gnu-modules)
@@ -3640,27 +3631,30 @@ script files.")
        ((#:imported-modules imported-modules %default-gnu-imported-modules)
         `((guix build qt-utils) ,@imported-modules))
        ((#:phases phases)
-        `(modify-phases ,phases
-           (add-before 'configure 'patch-qscintilla-library-name
-             (lambda* (#:key inputs #:allow-other-keys)
-               ;; The QScintilla library that the Octave configure script tries
-               ;; to link with should be named libqscintilla-qt5.so, but the
-               ;; QScintilla input provides the shared library as
-               ;; libqscintilla2_qt5.so.
-               (substitute* "configure"
-                 (("qscintilla2-qt5")
-                  "qscintilla2_qt5"))
-               #t))
-           (add-after 'install 'wrap-qt
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (with-directory-excursion out
-                   (for-each
-                    (lambda (x)
-                      (wrap-qt-program (string-append "../" x)
-                                       #:output out
-                                       #:inputs inputs))
-                    (find-files "libexec" "^octave-gui$"))))))))))
+        #~(modify-phases #$phases
+            (add-before 'configure 'patch-qscintilla-library-name
+              (lambda* (#:key inputs #:allow-other-keys)
+                ;; The QScintilla library that the Octave configure script
+                ;; tries to link with should be named libqscintilla-qt5.so,
+                ;; but the QScintilla input provides the shared library
+                ;; as libqscintilla2_qt5.so.
+                (substitute* "configure"
+                  (("qscintilla2-qt5") "qscintilla2_qt5"))))
+            (add-after 'install 'wrap-qt
+              (lambda* (#:key inputs #:allow-other-keys)
+                (for-each (lambda (path)
+                            (wrap-qt-program
+                             (string-append "../" path)     ;relative to bin
+                             #:output #$output #:inputs inputs))
+                          (with-directory-excursion #$output
+                            (find-files "libexec" "^octave-gui$")))))))))
+    (native-inputs
+     (modify-inputs native-inputs
+       (prepend qttools-5                                   ;for lrelease
+                (texlive-local-tree (list texlive-epsf))))) ;for texi2dvi
+    (inputs
+     (modify-inputs inputs
+       (prepend qscintilla qtbase-5 qtwayland-5)))
     (synopsis "High-level language for numerical computation (with GUI)")))
 
 (define-public opencascade-occt

Reply via email to