~ruther/guix-local

59ff9d008816a7d04cdd50d0db371ae1223e3329 — Maxim Cournoyer 2 years ago d8c9d27
gnu: qttools-5: Patch path to qmake for the lprodump command.

This previously would lead to this cryptic error: "WARNING: Could not find
qmake spec 'default'", which turned out to be caused by lprodump erroneously
attempting to run 'qmake' from its own prefix (qmake is from the qtbase
package, not qttools).

* gnu/packages/qt.scm (qttools-5) [phases]
<patch-qmake>: New phase.

Change-Id: I6e9a2d35fec987451fd1e30b84a82023dbfd3316
1 files changed, 12 insertions(+), 1 deletions(-)

M gnu/packages/qt.scm
M gnu/packages/qt.scm => gnu/packages/qt.scm +12 -1
@@ 2171,7 2171,18 @@ plugin for Adobe After Effects.")
                "1bkx2sc5hyldarc7w76ymv7dlcna3ib9r2kp67jdqcf856bnrx36"))))
    (arguments
     (substitute-keyword-arguments (package-arguments qtsvg-5)
       ((#:tests? _ #f) #f)))           ; TODO: Enable the tests
       ((#:tests? _ #f) #f)           ; TODO: Enable the tests
       ((#:phases phases '%standard-phases)
        #~(modify-phases #$phases
            (add-after 'unpack 'patch-qmake
              (lambda* (#:key inputs #:allow-other-keys)
                ;; Adjust the default location of the 'qmake' command known to
                ;; the 'lprodump' command, which would otherwise look for it
                ;; in its own bindir.
                (substitute* "src/linguist/lprodump/main.cpp"
                  (("app.applicationDirPath\\() \\+ QLatin1String\\(\"/qmake\")")
                   (format #f "QLatin1String(~s)"
                           (search-input-file inputs "bin/qmake"))))))))))
    (native-inputs (list perl qtdeclarative-5 vulkan-headers))
    (inputs (list mesa qtbase-5))
    (synopsis "Qt Tools and Designer modules")