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 OH1pNnzbeGFNbQAAgWs5BA (envelope-from ) for ; Wed, 27 Oct 2021 06:54:20 +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 8CMAMnzbeGHLcQAAbx9fmQ (envelope-from ) for ; Wed, 27 Oct 2021 04:54:20 +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 97F682A8AF for ; Wed, 27 Oct 2021 06:54:20 +0200 (CEST) Received: from localhost ([::1]:37182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfax9-0001tT-Np for larch@yhetil.org; Wed, 27 Oct 2021 00:54:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfaws-0001sF-NN for guix-patches@gnu.org; Wed, 27 Oct 2021 00:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfaws-0003nl-Ew for guix-patches@gnu.org; Wed, 27 Oct 2021 00:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfaws-00058L-CO for guix-patches@gnu.org; Wed, 27 Oct 2021 00:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51428] [PATCH core-update-frozen 01/13] build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase. References: <87v91jcdvy.fsf@gmail.com> In-Reply-To: <87v91jcdvy.fsf@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 04:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51428 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 51428@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 51428-submit@debbugs.gnu.org id=B51428.163531038319407 (code B ref 51428); Wed, 27 Oct 2021 04:54:02 +0000 Received: (at 51428) by debbugs.gnu.org; 27 Oct 2021 04:53:03 +0000 Received: from localhost ([127.0.0.1]:48099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfavv-00052v-BH for submit@debbugs.gnu.org; Wed, 27 Oct 2021 00:53:03 -0400 Received: from mail-qv1-f50.google.com ([209.85.219.50]:37873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfavt-00052R-PH for 51428@debbugs.gnu.org; Wed, 27 Oct 2021 00:53:02 -0400 Received: by mail-qv1-f50.google.com with SMTP id h11so976885qvk.4 for <51428@debbugs.gnu.org>; Tue, 26 Oct 2021 21:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vC/g/xLr1mTfYLCLdAy6IbbiRpzaiWbeYpv4fWgwurU=; b=KOf+4RJ4bs4NLOmlPLDs5laY638Yzu3fwByRbLMcy0RW07wcNYzQxIJQiz55tu0zRE 210+Vs55qfr/EuUEPGqLBrvh7mTP0Sp9PHvgeCn0PTKNPgZ7o/4yMkCBpHgZrnU5JqXX Zg1qV4HWNkvzBqnRNhfA17CenOG34qoN4n0M3IGhwQabzrr8frWnKs9CGXw6q3SD01Rn 6p/B6Y78DDv/3xVxA3ozN8KhFM7HxyYa0ArEffMmVkS9R42oXYeOj3AejIEpqc9zQVQ7 MKF34/9oLe/VAQvVAyKXijUj6/i5/Pmnc3dxv48uot8dGxJQ/pItxD1f6Jg4HqieoHvO 7PZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vC/g/xLr1mTfYLCLdAy6IbbiRpzaiWbeYpv4fWgwurU=; b=JVs1McoPVzSWNgYkpgATnKJCTuNS3gLJ7a4yMTAS1cbV0BJqB5I/EfKAU7f+uxjNfw opK484UHpLarhzikJnouQB7mGgw9ZLtdtl0hM27BanylV7fwHKE+ir6+VcetA/frfpr8 05kMGI4EwQ8CLuGeRvVnGURHYIYLuC7TcQJuQMqHXBq3YMDsOBD7+jTPapiddbDt9SVi e/V+LTt0wQ04RMgVaORybV+P35NDrVNz/yXyBQFqCHT+PE+PIOeqgy3fMHw5ABzQxSIF XSbXUL2zWOiOAg3bEd8ceg8BYCYCEKxjzLQQwiKAaJFwoxpO4c6pFcHVH/qk07Ao/vEf gzRQ== X-Gm-Message-State: AOAM532Q1gwkEEOXgogIXaGIXwQvRoD8S5S/jenrBxJCOqyeOYTaCCEr HEwdOlix2/qlYRqyFZ+caNmjZfhAxlA= X-Google-Smtp-Source: ABdhPJyEFbHrzRdQ3FEBdrZRg+mjc8dGdTUPpl1qABYvsJg0mLVrm5d2Ql363GnnEdEeqlIk8lfNFg== X-Received: by 2002:a05:6214:21ac:: with SMTP id t12mr27386393qvc.18.1635310375849; Tue, 26 Oct 2021 21:52:55 -0700 (PDT) Received: from localhost.localdomain (dsl-10-133-98.b2b2c.ca. [72.10.133.98]) by smtp.gmail.com with ESMTPSA id bk13sm11868197qkb.58.2021.10.26.21.52.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 21:52:55 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 27 Oct 2021 00:51:32 -0400 Message-Id: <20211027045151.9889-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.33.1 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=1635310460; 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=vC/g/xLr1mTfYLCLdAy6IbbiRpzaiWbeYpv4fWgwurU=; b=Ju6/UGurQOsoPHrXHJHMM/1v9mkRKEklB9JW5mX619vpXvbtPFcJphr/wEuw6RFdC65Cj5 gypTjVPr1wyKLqg8FnS87xQ/kVUusfb+McF2MA3J/XV+5Uvll0gZEGvQLW/Bdsi7pbQ4CV OoS8SGyrVXsuUfgzjMxsRB9DgFWzHv1yvm0kT4Fw4XocG5kyHR2AyCRAlgCxvx0jqyb/9D SNkt0/dIhG+mvHWXD+HnuyjwbHtWu33AhIMb9SW4xpeQsnsiB26xUi1DzOX+Dr3+7c37Pq RFXq/MmE1C/Cmjg0MB4dVm9Ytri94ingW+sFBY5PN703M7CAH+Y90vWh592law== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635310460; a=rsa-sha256; cv=none; b=oic9Mb3z1jQoJreAWXfhUNMxVWg+7NRrQaXkqq/3lzoFDW1+2WoioPGjc0K04PT5g1GW4h VWFgBa8W74qXtZcpIgjekB9Sfem+OInwfZfDZkPxR52NxBdexkpv/aNGbvD70lrNRtl/V3 cZ4mk1txEKp3rdqIfnMEPoz1qYqoWSSSQktCAY7ODo8dzeL72eeEiJ3yKRAux10cKIUne3 maVu1t3yjdIo03Eqy2XJvaJ+OmuuB7xbDJpWHDe1niDnFC6o+xOc7UZks/pIbQ6xq/X2vI /xbYFz9yUsm5IvFA2XnTw1FfOme3M8f7EqVq7BXc5iIxl2NNK08QdSFagy5pYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KOf+4RJ4; 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: 4.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KOf+4RJ4; 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: 97F682A8AF X-Spam-Score: 4.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: xIss9OBVYuIp * guix/build/glib-or-gtk-build-system.scm (wrap-all-programs) : Precisely build the list of variable specifications, rather than relying on a bunch of conditionals. --- guix/build/glib-or-gtk-build-system.scm | 59 ++++++------------------- 1 file changed, 13 insertions(+), 46 deletions(-) diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm index 9f4cc09eeb..655f20cd12 100644 --- a/guix/build/glib-or-gtk-build-system.scm +++ b/guix/build/glib-or-gtk-build-system.scm @@ -169,52 +169,19 @@ (define handle-output (alist-cons output directory inputs))) (gio-mod-dirs (gio-module-directories (alist-cons output directory inputs))) - (data-env-var - (if (not (null? datadirs)) - `("XDG_DATA_DIRS" ":" prefix ,datadirs) - #f)) - (gtk-mod-env-var - (if (not (null? gtk-mod-dirs)) - `("GTK_PATH" ":" prefix ,gtk-mod-dirs) - #f)) - (gio-mod-env-var - (if (not (null? gio-mod-dirs)) - `("GIO_EXTRA_MODULES" ":" prefix ,gio-mod-dirs) - #f))) - (cond - ((and data-env-var gtk-mod-env-var gio-mod-env-var) - (for-each (cut wrap-program <> #:sh (sh) - data-env-var - gtk-mod-env-var - gio-mod-env-var) - bin-list)) - ((and data-env-var gtk-mod-env-var (not gio-mod-env-var)) - (for-each (cut wrap-program <> #:sh (sh) - data-env-var - gtk-mod-env-var) - bin-list)) - ((and data-env-var (not gtk-mod-env-var) gio-mod-env-var) - (for-each (cut wrap-program <> #:sh (sh) - data-env-var - gio-mod-env-var) - bin-list)) - ((and (not data-env-var) gtk-mod-env-var gio-mod-env-var) - (for-each (cut wrap-program <> #:sh (sh) - gio-mod-env-var - gtk-mod-env-var) - bin-list)) - ((and data-env-var (not gtk-mod-env-var) (not gio-mod-env-var)) - (for-each (cut wrap-program <> #:sh (sh) - data-env-var) - bin-list)) - ((and (not data-env-var) gtk-mod-env-var (not gio-mod-env-var)) - (for-each (cut wrap-program <> #:sh (sh) - gtk-mod-env-var) - bin-list)) - ((and (not data-env-var) (not gtk-mod-env-var) gio-mod-env-var) - (for-each (cut wrap-program <> #:sh (sh) - gio-mod-env-var) - bin-list)))))))) + (env-vars `(,@(if (not (null? datadirs)) + (list `("XDG_DATA_DIRS" ":" prefix ,datadirs)) + '()) + ,@(if (not (null? gtk-mod-dirs)) + (list `("GTK_PATH" ":" prefix ,gtk-mod-dirs)) + '()) + ,@(if (not (null? gio-mod-dirs)) + (list `("GIO_EXTRA_MODULES" ":" + prefix ,gio-mod-dirs)) + '())))) + (for-each (lambda (program) + (apply wrap-program program #:sh (sh) env-vars)) + bin-list)))))) (for-each handle-output outputs) #t) -- 2.33.1