From patchwork Fri Jun 25 18:08:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 30714 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D1DB327BC81; Fri, 25 Jun 2021 19:09:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8D23227BC78 for ; Fri, 25 Jun 2021 19:09:14 +0100 (BST) Received: from localhost ([::1]:42286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwqGP-0005G2-Ku for patchwork@mira.cbaines.net; Fri, 25 Jun 2021 14:09:13 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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