mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
profiles: gtk-im-modules: Fix for gtk3.
Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be find in output "bin" instead of "out". * guix/profiles.scm (gtk-im-modules): Pass the path of gtk-query-immodules-x.x as 'query' argument to the 'build' procedure. Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
This commit is contained in:
parent
6bd9ad6942
commit
06d7d1190e
1 changed files with 19 additions and 7 deletions
|
@ -739,7 +739,7 @@ for both major versions of GTK+."
|
||||||
(mlet %store-monad ((gtk+ (manifest-lookup-package manifest "gtk+" "3"))
|
(mlet %store-monad ((gtk+ (manifest-lookup-package manifest "gtk+" "3"))
|
||||||
(gtk+-2 (manifest-lookup-package manifest "gtk+" "2")))
|
(gtk+-2 (manifest-lookup-package manifest "gtk+" "2")))
|
||||||
|
|
||||||
(define (build gtk gtk-version)
|
(define (build gtk gtk-version query)
|
||||||
(let ((major (string-take gtk-version 1)))
|
(let ((major (string-take gtk-version 1)))
|
||||||
(with-imported-modules '((guix build utils)
|
(with-imported-modules '((guix build utils)
|
||||||
(guix build union)
|
(guix build union)
|
||||||
|
@ -756,8 +756,6 @@ for both major versions of GTK+."
|
||||||
|
|
||||||
(let* ((prefix (string-append "/lib/gtk-" #$major ".0/"
|
(let* ((prefix (string-append "/lib/gtk-" #$major ".0/"
|
||||||
#$gtk-version))
|
#$gtk-version))
|
||||||
(query (string-append #$gtk "/bin/gtk-query-immodules-"
|
|
||||||
#$major ".0"))
|
|
||||||
(destdir (string-append #$output prefix))
|
(destdir (string-append #$output prefix))
|
||||||
(moddirs (cons (string-append #$gtk prefix "/immodules")
|
(moddirs (cons (string-append #$gtk prefix "/immodules")
|
||||||
(filter file-exists?
|
(filter file-exists?
|
||||||
|
@ -768,7 +766,7 @@ for both major versions of GTK+."
|
||||||
|
|
||||||
;; Generate a new immodules cache file.
|
;; Generate a new immodules cache file.
|
||||||
(mkdir-p (string-append #$output prefix))
|
(mkdir-p (string-append #$output prefix))
|
||||||
(let ((pipe (apply open-pipe* OPEN_READ query modules))
|
(let ((pipe (apply open-pipe* OPEN_READ #$query modules))
|
||||||
(outfile (string-append #$output prefix
|
(outfile (string-append #$output prefix
|
||||||
"/immodules-gtk" #$major ".cache")))
|
"/immodules-gtk" #$major ".cache")))
|
||||||
(dynamic-wind
|
(dynamic-wind
|
||||||
|
@ -783,9 +781,23 @@ for both major versions of GTK+."
|
||||||
(close-pipe pipe)))))))))
|
(close-pipe pipe)))))))))
|
||||||
|
|
||||||
;; Don't run the hook when there's nothing to do.
|
;; Don't run the hook when there's nothing to do.
|
||||||
(let ((gexp #~(begin
|
(let* ((pkg-gtk+ (module-ref ; lazy reference
|
||||||
#$(if gtk+ (build gtk+ "3.0.0") #t)
|
(resolve-interface '(gnu packages gtk)) 'gtk+))
|
||||||
#$(if gtk+-2 (build gtk+-2 "2.10.0") #t))))
|
(gexp #~(begin
|
||||||
|
#$(if gtk+
|
||||||
|
(build
|
||||||
|
gtk+ "3.0.0"
|
||||||
|
;; Use 'gtk-query-immodules-3.0' from the 'bin'
|
||||||
|
;; output of latest gtk+ package.
|
||||||
|
#~(string-append
|
||||||
|
#$pkg-gtk+:bin "/bin/gtk-query-immodules-3.0"))
|
||||||
|
#t)
|
||||||
|
#$(if gtk+-2
|
||||||
|
(build
|
||||||
|
gtk+-2 "2.10.0"
|
||||||
|
#~(string-append
|
||||||
|
#$gtk+-2 "/bin/gtk-query-immodules-2.0"))
|
||||||
|
#t))))
|
||||||
(if (or gtk+ gtk+-2)
|
(if (or gtk+ gtk+-2)
|
||||||
(gexp->derivation "gtk-im-modules" gexp
|
(gexp->derivation "gtk-im-modules" gexp
|
||||||
#:local-build? #t
|
#:local-build? #t
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue