aboutsummaryrefslogtreecommitdiff
path: root/guix/build-system/glib-or-gtk.scm
diff options
context:
space:
mode:
authorFederico Beffa <beffa@fbengineering.ch>2014-12-18 20:58:18 +0100
committerFederico Beffa <beffa@fbengineering.ch>2015-01-12 18:00:08 +0100
commit61771a79abb4a354d48469be9744f9537caefc96 (patch)
tree7335a109977a68440cc61c3bef551e31a8765898 /guix/build-system/glib-or-gtk.scm
parent9f496d430bbcd3bacfc131e513a192786fb08746 (diff)
downloadguix-61771a79abb4a354d48469be9744f9537caefc96.tar
guix-61771a79abb4a354d48469be9744f9537caefc96.tar.gz
guix: build/glib-or-gtk-build-system: Add support for GIO and XDG theming.
* guix/build/glib-or-gtk-build-system.scm (data-directories): Rename 'schemas-directories' to 'data-directories' and add support for XDG theming data. * guix/build/glib-or-gtk-build-system.scm (gio-module-directories): New function. * guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Update names to reflect that we are dealing with more types of data and not only with schemas. Add handling of GIO modules. * guix/build-system/glib-or-gtk.scm (lower): Import the 'bin' output of GLib instead of 'out'. This was an error since we need the program 'glib-compile-schemas'. Update the description.
Diffstat (limited to 'guix/build-system/glib-or-gtk.scm')
-rw-r--r--guix/build-system/glib-or-gtk.scm30
1 files changed, 21 insertions, 9 deletions
diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index 8091311879..7a90587136 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -34,15 +34,14 @@
;; This build system is an extension of the 'gnu-build-system'. It
;; accomodates the needs of applications making use of glib or gtk+ (with "or"
;; to be interpreted in the mathematical sense). This is achieved by adding
-;; two phases run after the 'install' phase:
+;; three phases run after the 'install' phase:
;;
;; 'glib-or-gtk-wrap' phase:
;;
-;; a) This phase looks for GSettings schemas by verifying the existence of
-;; path "datadir/glib-2.0/schemas" in all input packages. If the path is
-;; found in any package, then all programs in "out/bin" are wrapped in scripts
-;; where the environment variable "XDG_DATA_DIRS" is set and points to the
-;; list of found schemas directories.
+;; a) This phase looks for GSettings schemas, GIO modules and theming data.
+;; If any of these is found in any input package, then all programs in
+;; "out/bin" are wrapped in scripts defining the nedessary environment
+;; variables.
;;
;; b) Looks for the existence of "libdir/gtk-3.0" directories in all input
;; packages. If any is found, then the environment variable "GTK_PATH" is
@@ -56,6 +55,11 @@
;; exists and does not include a file named "gschemas.compiled", then
;; "glib-compile-schemas" is run in that directory.
;;
+;; 'glib-or-gtk-icon-cache' phase:
+;;
+;; Looks for the existence of icon themes and, if no cache exists, generate
+;; the "icon-theme.cache" file.
+;;
;; Code:
(define %default-modules
@@ -76,15 +80,22 @@
(let ((module (resolve-interface '(gnu packages glib))))
(module-ref module 'glib)))
+(define (default-gtk+)
+ "Return the default gtk+ package from which we use
+\"gtk-update-icon-cache\"."
+ (let ((module (resolve-interface '(gnu packages gtk))))
+ (module-ref module 'gtk+)))
+
(define* (lower name
#:key source inputs native-inputs outputs system target
- (glib (default-glib)) (implicit-inputs? #t)
+ (glib (default-glib)) (gtk+ (default-gtk+))
+ (implicit-inputs? #t)
(strip-binaries? #t)
#:allow-other-keys
#:rest arguments)
"Return a bag for NAME."
(define private-keywords
- '(#:source #:target #:glib #:inputs #:native-inputs
+ '(#:source #:target #:glib #:gtk+ #:inputs #:native-inputs
#:outputs #:implicit-inputs?))
(and (not target) ;XXX: no cross-compilation
@@ -95,7 +106,8 @@
`(("source" ,source))
'())
,@inputs))
- (build-inputs `(("glib:bin" ,glib)
+ (build-inputs `(("glib:bin" ,glib "bin") ; to compile schemas
+ ("gtk+" ,gtk+) ; to generate icon cache
,@(if implicit-inputs?
(standard-packages)
'())