me
/
guix
Archived
1
0
Fork 0

guix: qt-utils: Wrapped executables honor user's envvars.

Prior to this change, wrappers did set the specified environment variables to
a fixed value, overwriting any user settings. This inhibited propagating
e.g. XDG_DATA_DIRS from a profile to the application.

Now user environment variables are prefixed (if the variable defines some
"binary" search path, e.g. QT_PLUGIN_PATH) or suffixed (if the variable
defines some config or data search path, e.g. XDG_DATA_DIRS). The code could
also allow to overwrite, anyhow currently no variable is defined like this.

* guix/build/qt-utils.scm (variables-for-wrapping): For each env-var to
  be wrapped, specify whether it should prefix, suffix or overwrite the
  user's variable.
master
Hartmut Goebel 2020-08-19 10:44:27 +02:00 committed by Maxim Cournoyer
parent 7e24e1e58d
commit 30759c4aad
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 6 additions and 5 deletions

View File

@ -39,14 +39,15 @@
(lambda (var-to-wrap) (not (null? (last var-to-wrap)))) (lambda (var-to-wrap) (not (null? (last var-to-wrap))))
(map (map
(lambda (var-spec) (lambda (var-spec)
`(,(first var-spec) = ,(collect-sub-dirs base-directories (last var-spec)))) (list (first var-spec) (second var-spec)
(collect-sub-dirs base-directories (third var-spec))))
(list (list
;; these shall match the search-path-specification for Qt and KDE ;; these shall match the search-path-specification for Qt and KDE
;; libraries ;; libraries
'("XDG_DATA_DIRS" "/share") '("XDG_DATA_DIRS" suffix "/share")
'("XDG_CONFIG_DIRS" "/etc/xdg") '("XDG_CONFIG_DIRS" suffix "/etc/xdg")
'("QT_PLUGIN_PATH" "/lib/qt5/plugins") '("QT_PLUGIN_PATH" prefix "/lib/qt5/plugins")
'("QML2_IMPORT_PATH" "/lib/qt5/qml"))))) '("QML2_IMPORT_PATH" prefix "/lib/qt5/qml")))))
(define* (wrap-qt-program* program #:key inputs output-dir) (define* (wrap-qt-program* program #:key inputs output-dir)