me
/
guix
Archived
1
0
Fork 0

build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase.

* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs)
<handle-output>: Precisely build the list of variable specifications, rather
than relying on a bunch of conditionals.
master
Maxim Cournoyer 2021-10-03 21:11:37 -04:00
parent 802307fe6f
commit eb619cda36
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 13 additions and 46 deletions

View File

@ -169,52 +169,19 @@ add a dependency of that output on GLib and GTK+."
(alist-cons output directory inputs))) (alist-cons output directory inputs)))
(gio-mod-dirs (gio-module-directories (gio-mod-dirs (gio-module-directories
(alist-cons output directory inputs))) (alist-cons output directory inputs)))
(data-env-var (env-vars `(,@(if (not (null? datadirs))
(if (not (null? datadirs)) (list `("XDG_DATA_DIRS" ":" prefix ,datadirs))
`("XDG_DATA_DIRS" ":" prefix ,datadirs) '())
#f)) ,@(if (not (null? gtk-mod-dirs))
(gtk-mod-env-var (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs))
(if (not (null? gtk-mod-dirs)) '())
`("GTK_PATH" ":" prefix ,gtk-mod-dirs) ,@(if (not (null? gio-mod-dirs))
#f)) (list `("GIO_EXTRA_MODULES" ":"
(gio-mod-env-var prefix ,gio-mod-dirs))
(if (not (null? gio-mod-dirs)) '()))))
`("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-dirs) (for-each (lambda (program)
#f))) (apply wrap-program program #:sh (sh) env-vars))
(cond bin-list))))))
((and data-env-var gtk-mod-env-var gio-mod-env-var)
(for-each (cut wrap-program <> #:sh (sh)
data-env-var
gtk-mod-env-var
gio-mod-env-var)
bin-list))
((and data-env-var gtk-mod-env-var (not gio-mod-env-var))
(for-each (cut wrap-program <> #:sh (sh)
data-env-var
gtk-mod-env-var)
bin-list))
((and data-env-var (not gtk-mod-env-var) gio-mod-env-var)
(for-each (cut wrap-program <> #:sh (sh)
data-env-var
gio-mod-env-var)
bin-list))
((and (not data-env-var) gtk-mod-env-var gio-mod-env-var)
(for-each (cut wrap-program <> #:sh (sh)
gio-mod-env-var
gtk-mod-env-var)
bin-list))
((and data-env-var (not gtk-mod-env-var) (not gio-mod-env-var))
(for-each (cut wrap-program <> #:sh (sh)
data-env-var)
bin-list))
((and (not data-env-var) gtk-mod-env-var (not gio-mod-env-var))
(for-each (cut wrap-program <> #:sh (sh)
gtk-mod-env-var)
bin-list))
((and (not data-env-var) (not gtk-mod-env-var) gio-mod-env-var)
(for-each (cut wrap-program <> #:sh (sh)
gio-mod-env-var)
bin-list))))))))
(for-each handle-output outputs) (for-each handle-output outputs)
#t) #t)