From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mCkoIMwb1mA5IwEAgWs5BA (envelope-from ) for ; Fri, 25 Jun 2021 20:09:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kDDJG8wb1mBpbwAAbx9fmQ (envelope-from ) for ; Fri, 25 Jun 2021 18:09:16 +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 BBE5B2316B for ; Fri, 25 Jun 2021 20:09:15 +0200 (CEST) Received: from localhost ([::1]:42286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwqGQ-0005G2-Iq for larch@yhetil.org; Fri, 25 Jun 2021 14:09:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwqGE-0005Cn-UA for guix-patches@gnu.org; Fri, 25 Jun 2021 14:09:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwqGE-0006eP-Lz for guix-patches@gnu.org; Fri, 25 Jun 2021 14:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwqGE-0003e6-GU for guix-patches@gnu.org; Fri, 25 Jun 2021 14:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49227] [PATCH 1/3] build: qt-build-system: Allow users to override/extend XDG_DATA_DIRS. References: <20210625180414.10045-1-maxim.cournoyer@gmail.com> In-Reply-To: <20210625180414.10045-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 25 Jun 2021 18:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49227 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49227@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 49227-submit@debbugs.gnu.org id=B49227.162464451513955 (code B ref 49227); Fri, 25 Jun 2021 18:09:02 +0000 Received: (at 49227) by debbugs.gnu.org; 25 Jun 2021 18:08:35 +0000 Received: from localhost ([127.0.0.1]:46773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwqFn-0003d1-Gd for submit@debbugs.gnu.org; Fri, 25 Jun 2021 14:08:35 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:39923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwqFk-0003ck-4t for 49227@debbugs.gnu.org; Fri, 25 Jun 2021 14:08:34 -0400 Received: by mail-qt1-f178.google.com with SMTP id f13so1975834qtb.6 for <49227@debbugs.gnu.org>; Fri, 25 Jun 2021 11:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YuYr9M55pG5IH/fUfHD6sXrxVTTVRA4cj0WYwKF4Kmk=; b=SRWBRyql6+yheFrP+uqaG6ZTEy/uXKTvijvCY9eWlBT+vjNKiOzvY8vrhHAsf8jZEW JgFhTLic7lBJi15MoMNOw0P/IdwyKwIzaVv2YG530cYIprNfOJ3yod/JxeUIbF2u1XxV 5yiXt46PeodcqpeuNwAW8SrDMngG6McfCxhPixhtnj6TNBSO31OS9V3LUiOljFYs6KUb 701vjYWMVPJc/nha8Nolfo/RgidlR4kH3/i+2rxQhuzLZvR/asZdUjs2kFyLWSOLBOBn AMP+MJkIzVlX2rTqYDnvLRMpJcii7xIost4pCXgieRKylnnw6ewz6YJDzPcTrjvsCYwj Un3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YuYr9M55pG5IH/fUfHD6sXrxVTTVRA4cj0WYwKF4Kmk=; b=EkPIN/x0DygqDvPVA1f5OaStISN+qzx3qlambRvCH2YaOCIGPLo4XUtQqjqEokiIaC gn1AFjyuwV+7WxOu1DwKEzJrbxt3K1/M4Vy3sKefRcoxuhP9kGriGC+O8cXGOOgstW+R HHhJWi9h94jzb0mOQi+MIg1av0GlMqHduuGkfbKbH6wB1v2g6JPga1Y8NhJ+rGxGrja+ QK3B+uDuqjDL6Kf3HYtjexe5BdEVJvl0eqYUFFtNjt4zq7rAMZRLKr7JmYZqgRkqOMer X1kDDdCEluPqmw2OXobSuwIlE3GQrkcuIWIr4xCF5RlZ5ruGiIg7/pzhT6+IB+j3PgMe pGWg== X-Gm-Message-State: AOAM533ppJPhghh6F6uwkqJDzWa60uRQ7VYCw+qzosEmp2PKaVg5rvRJ w2HCk6Wf+JBPuWwo1wVP4CU7gy0JClVyVpjM X-Google-Smtp-Source: ABdhPJyT+P4Ly+QFf0H6py9uNTu7rrSlPwXJYCVEZTR9za3PxuP4TsKnJ8DPAfzHdPAja38Qql3eWA== X-Received: by 2002:ac8:5895:: with SMTP id t21mr10449803qta.353.1624644506550; Fri, 25 Jun 2021 11:08:26 -0700 (PDT) Received: from localhost.localdomain (dsl-10-149-111.b2b2c.ca. [72.10.149.111]) by smtp.gmail.com with ESMTPSA id v5sm5428036qkh.39.2021.06.25.11.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 11:08:26 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 25 Jun 2021 14:08:21 -0400 Message-Id: <20210625180823.10382-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624644556; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YuYr9M55pG5IH/fUfHD6sXrxVTTVRA4cj0WYwKF4Kmk=; b=bZ7fbomBylA0Fb1j5ay9AK+uO2ShkL4cyjR+wEFfMzdB21809/gCl/JQJ2gSuwL9KSeBWm tSVfQAaDTXEngf/GRiLCiBiQNMpa1TPSXpsirW8kKRqQE/YFYik5aeH6jt+dXVrgK0EYD6 T6vGpog9q/7dTHzd6o9JSAB4l45fF/x0vRQMd1O5s5tSlrx0qPoyf/3FVTtIIQTdOdRXAA S/3WWQUTBofXc6/bdV3Ko5ViApUz9ifGktMlOG1e/E7PGEpIxmZyAy07JL/cMNowwOv8/S g56psh0Kd0WpW70ggq+6YfZKIAwspVSfSHhpjlqvy5aCLwj7MzkRomx/2TqN9Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624644556; a=rsa-sha256; cv=none; b=Rn/6DPB37TInSpwoKIYRjHXz84SCzZQ0YOe6anZYG8HMccV/6KhD7P36vRN6ztRSVDTODQ mOcYea4cZBg7uALJanGcC8Zuli0CilcbIjZS1ddxOFSh2a1PTMi1OIUp57vzMuUHgXm0T8 IRR09+VFYi5fUGWxnaW3MU9jgIdxQX1PPeMb+hCJonDgvA1g9y+ox/67EOB74dW9/smPPS F28wAe2/7ai4oN8xCHzfyov5GZfRFyKp30kD1mqoA3qkh1DOocoP97lDVEiP5R3AEeYsi9 197t82GCBH7TWXpMX7dFYgikAqAJ9NT/hTBvalx9aUMHdbDmzSJiEwu+D6XYMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=SRWBRyql; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Spam-Score: 2.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=SRWBRyql; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: BBE5B2316B X-Spam-Score: 2.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: AdwwtherAqsD Before this change, XDG_DATA_DIRS was wrapped using '=, which meant that it wouldn't pick up extra icons from the user's profile, for example. When enabling gtk+ theming support in qtbase, that led to crashes due to GTK not finding icons from even the hicolor icon theme fallback (which is assumed to exist). * guix/build/qt-build-system.scm (variables-for-wrapping): Specify an extra 'wrap-type' information per variable that gets passed to the wrap-program procedure. Set the XDG_DATA_DIRS variable wrapping type to 'suffix', which allows the user to both extend and override its value. --- guix/build/qt-build-system.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm index f59b0c420f..59242f5fab 100644 --- a/guix/build/qt-build-system.scm +++ b/guix/build/qt-build-system.scm @@ -73,17 +73,17 @@ (filter-map (match-lambda - ((variable file-type directory selectors ...) + ((variable wrap-type file-type directory selectors ...) (match (collect-sub-dirs base-directories file-type directory selectors) (() #f) (directories - `(,variable = ,directories))))) + `(,variable ,wrap-type ,directories))))) ;; These shall match the search-path-specification for Qt and KDE ;; libraries. - (list '("XDG_DATA_DIRS" directory "/share" + (list '("XDG_DATA_DIRS" suffix directory "/share" ;; These are "selectors": consider /share if and only if at least ;; one of these sub-directories exist. This avoids adding @@ -91,10 +91,10 @@ ;; /share sub-directory. "/glib-2.0/schemas" "/sounds" "/themes" "/cursors" "/wallpapers" "/icons" "/mime") - '("XDG_CONFIG_DIRS" directory "/etc/xdg") - '("QT_PLUGIN_PATH" directory "/lib/qt5/plugins") - '("QML2_IMPORT_PATH" directory "/lib/qt5/qml") - '("QTWEBENGINEPROCESS_PATH" regular + '("XDG_CONFIG_DIRS" = directory "/etc/xdg") + '("QT_PLUGIN_PATH" = directory "/lib/qt5/plugins") + '("QML2_IMPORT_PATH" = directory "/lib/qt5/qml") + '("QTWEBENGINEPROCESS_PATH" = regular "/lib/qt5/libexec/QtWebEngineProcess")))) (define* (wrap-all-programs #:key inputs outputs -- 2.32.0