summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-07-19 23:04:25 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-07-31 21:55:49 -0400
commit1f466ed6be932526fc69e72ffd50390691d0d382 (patch)
treee7ba75114c415811b5477cd2b58dd0d1ed0483f3 /guix/build-system
parenta13a687989814380b65233f82a967c5475e33ad6 (diff)
build: qt: Add qtbase argument and wrap Qt environment variables exactly.
* guix/build-system/qt.scm (default-qtbase): New variable. (lower) <#:qtbase>: Add argument... [build-inputs]: ... and propagate it here. (qt-build): Add qtbase argument. (qt-cross-build): Likewise. * guix/build/qt-utils.scm (%default-qt-major-version): New variable. (variables-for-wrapping): Add qt-major-version argument, and use it to format the various path prefixes. Wrap QT environment variables exactly. (wrap-qt-program*): Add qt-major-version argument, and pass it to variables-for-wrapping. (wrap-qt-program): Add qt-major-version argument, and pass it to wrap-qt-program*. (wrap-all-qt-programs): Add qtbase argument, and extract the major version from it, passing it to wrap-qt-program*.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/qt.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index a0b968cef3..bd47ade3fc 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -67,11 +68,19 @@
(let ((module (resolve-interface '(gnu packages cmake))))
(module-ref module 'cmake-minimal)))
+(define (default-qtbase)
+ "Return the default qtbase package."
+
+ ;; Do not use `@' to avoid introducing circular dependencies.
+ (let ((module (resolve-interface '(gnu packages qt))))
+ (module-ref module 'qtbase-5)))
+
;; This barely is a copy from (guix build-system cmake), only adjusted to use
;; the variables defined here.
(define* (lower name
#:key source inputs native-inputs outputs system target
(cmake (default-cmake))
+ (qtbase (default-qtbase))
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
@@ -87,6 +96,7 @@
`(("source" ,source))
'())
,@`(("cmake" ,cmake))
+ ,@`(("qtbase" ,qtbase))
,@native-inputs
,@(if target
;; Use the standard cross inputs of
@@ -112,6 +122,7 @@
(define* (qt-build name inputs
#:key
+ qtbase
source (guile #f)
(outputs '("out")) (configure-flags ''())
(search-paths '())
@@ -150,6 +161,7 @@ provides a 'CMakeLists.txt' file as its build system."
#:phases #$(if (pair? phases)
(sexp->gexp phases)
phases)
+ #:qtbase #$qtbase
#:qt-wrap-excluded-outputs #$qt-wrap-excluded-outputs
#:qt-wrap-excluded-inputs #$qt-wrap-excluded-inputs
#:configure-flags #$configure-flags
@@ -181,6 +193,7 @@ provides a 'CMakeLists.txt' file as its build system."
#:key
source target
build-inputs target-inputs host-inputs
+ qtbase
(guile #f)
(outputs '("out"))
(configure-flags ''())
@@ -237,6 +250,7 @@ build system."
search-path-specification->sexp
native-search-paths)
#:phases #$phases
+ #:qtbase #$qtbase
#:configure-flags #$configure-flags
#:make-flags #$make-flags
#:out-of-source? #$out-of-source?