From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qLPxG1o21l/GKAAA0tVLHw (envelope-from ) for ; Sun, 13 Dec 2020 15:42:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UKHJF1o21l/eUQAA1q6Kng (envelope-from ) for ; Sun, 13 Dec 2020 15:42:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F19BF9402A5 for ; Sun, 13 Dec 2020 15:42:17 +0000 (UTC) Received: from localhost ([::1]:44106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koTVn-0007sY-Uk for larch@yhetil.org; Sun, 13 Dec 2020 10:42:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koTVa-0007ru-Lu for guix-patches@gnu.org; Sun, 13 Dec 2020 10:42:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koTVa-0000Tp-Dv for guix-patches@gnu.org; Sun, 13 Dec 2020 10:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koTVa-0007HA-An for guix-patches@gnu.org; Sun, 13 Dec 2020 10:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45221] [PATCH] guix: qt-build-system: Wrapped executables honor user's envvars. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Dec 2020 15:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45221 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45221@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160787410927941 (code B ref -1); Sun, 13 Dec 2020 15:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Dec 2020 15:41:49 +0000 Received: from localhost ([127.0.0.1]:49941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koTVN-0007Gb-4f for submit@debbugs.gnu.org; Sun, 13 Dec 2020 10:41:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:38110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koTVL-0007GQ-0S for submit@debbugs.gnu.org; Sun, 13 Dec 2020 10:41:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koTVK-0007nf-Pk for guix-patches@gnu.org; Sun, 13 Dec 2020 10:41:46 -0500 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:49373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koTVI-0000It-N0 for guix-patches@gnu.org; Sun, 13 Dec 2020 10:41:46 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Cv7zn5Qm3z1rwb8 for ; Sun, 13 Dec 2020 16:41:41 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Cv7zn5Hw6z1tTYt for ; Sun, 13 Dec 2020 16:41:41 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id IXFSGtKJ8QXz for ; Sun, 13 Dec 2020 16:41:41 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-53-196.dynamic.mnet-online.de [188.174.53.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Sun, 13 Dec 2020 16:41:41 +0100 (CET) Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 91FF7602A4 for ; Sun, 13 Dec 2020 16:49:14 +0100 (CET) From: Hartmut Goebel Date: Sun, 13 Dec 2020 16:41:38 +0100 Message-Id: <93d83462d1445ffd001039eebb1f2a84e6ccf3a9.1607873941.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2001:a60:0:28:0:1:25:1; envelope-from=h.goebel@crazy-compilers.com; helo=mail-out.m-online.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 2.70 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F19BF9402A5 X-Spam-Score: 2.70 X-Migadu-Scanner: scn1.migadu.com X-TUID: JnNCBYi5csIi 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