* [bug#45221] [PATCH] guix: qt-build-system: Wrapped executables honor user's envvars.
@ 2020-12-13 15:41 Hartmut Goebel
2020-12-18 4:14 ` Zhu Zihao
0 siblings, 1 reply; 4+ messages in thread
From: Hartmut Goebel @ 2020-12-13 15:41 UTC (permalink / raw)
To: 45221
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-build-system.scm (variables-for-wrapping): For each env-var to
be wrapped, specify whether it should prefix, suffix or overwrite the
user's variable.
---
guix/build/qt-build-system.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm
index 005157b0a4..72d2d3b03b 100644
--- a/guix/build/qt-build-system.scm
+++ b/guix/build/qt-build-system.scm
@@ -60,14 +60,14 @@
(lambda (var-to-wrap) (not (null? (last var-to-wrap))))
(map
(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
;; these shall match the search-path-specification for Qt and KDE
;; libraries
- '("XDG_DATA_DIRS" "/share")
- '("XDG_CONFIG_DIRS" "/etc/xdg")
- '("QT_PLUGIN_PATH" "/lib/qt5/plugins")
- '("QML2_IMPORT_PATH" "/lib/qt5/qml")))))
+ '("XDG_DATA_DIRS" suffix "/share")
+ '("XDG_CONFIG_DIRS" suffix "/etc/xdg")
+ '("QT_PLUGIN_PATH" prefix "/lib/qt5/plugins")
+ '("QML2_IMPORT_PATH" prefix "/lib/qt5/qml")))))
(define* (wrap-all-programs #:key inputs outputs
(qt-wrap-excluded-outputs '())
--
2.21.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#45221] [PATCH] guix: qt-build-system: Wrapped executables honor user's envvars.
2020-12-13 15:41 [bug#45221] [PATCH] guix: qt-build-system: Wrapped executables honor user's envvars Hartmut Goebel
@ 2020-12-18 4:14 ` Zhu Zihao
2021-01-11 16:04 ` bug#45221: " Hartmut Goebel
2021-01-11 16:06 ` bug#44892: " Hartmut Goebel
0 siblings, 2 replies; 4+ messages in thread
From: Zhu Zihao @ 2020-12-18 4:14 UTC (permalink / raw)
To: 45221; +Cc: h.goebel
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
Good work! I think this can help solve #45193[1].
And there're still some issues I mentioned in that issues.
1. We may need to fix `wrap-qt-program` in qt-utils.scm. It's
implementation is quite weird(See my reply in [1]). Or we can remove
this function and make package use
(assoc-ref qt-build-system:%standard-phases 'qt-wrap)
instead.
2. We should search directories in outputs, now we just search all
inputs. Some Qt programs were deployed with a bundle of Qt plugins in
their prefix. If we miss these dirs, they won't run.
[1]: https://issues.guix.gnu.org/45193
--
Retrieve my PGP public key:
gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F
Zihao
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#45221: [PATCH] guix: qt-build-system: Wrapped executables honor user's envvars.
2020-12-18 4:14 ` Zhu Zihao
@ 2021-01-11 16:04 ` Hartmut Goebel
2021-01-11 16:06 ` bug#44892: " Hartmut Goebel
1 sibling, 0 replies; 4+ messages in thread
From: Hartmut Goebel @ 2021-01-11 16:04 UTC (permalink / raw)
To: 45221-close
This patch has been superseded by http://issues.guix.gnu.org/45784 and
following, esp. http://issues.guix.gnu.org/45785
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#44892: [PATCH] guix: qt-build-system: Wrapped executables honor user's envvars.
2020-12-18 4:14 ` Zhu Zihao
2021-01-11 16:04 ` bug#45221: " Hartmut Goebel
@ 2021-01-11 16:06 ` Hartmut Goebel
1 sibling, 0 replies; 4+ messages in thread
From: Hartmut Goebel @ 2021-01-11 16:06 UTC (permalink / raw)
To: 44892-close
This patch has been superseded by http://issues.guix.gnu.org/45784 and
following, esp. http://issues.guix.gnu.org/45785
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-11 16:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-13 15:41 [bug#45221] [PATCH] guix: qt-build-system: Wrapped executables honor user's envvars Hartmut Goebel
2020-12-18 4:14 ` Zhu Zihao
2021-01-11 16:04 ` bug#45221: " Hartmut Goebel
2021-01-11 16:06 ` bug#44892: " Hartmut Goebel
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).