From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8BDBAcwnNGRjKgAASxT56A (envelope-from ) for ; Mon, 10 Apr 2023 17:14:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id V/nQAcwnNGRFPAAAauVa8A (envelope-from ) for ; Mon, 10 Apr 2023 17:14:20 +0200 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 B861B27105 for ; Mon, 10 Apr 2023 17:14:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pltDZ-0003Ix-Qm; Mon, 10 Apr 2023 11:14:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pltDX-0003Il-Fl for guix-patches@gnu.org; Mon, 10 Apr 2023 11:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pltDX-00058t-3O for guix-patches@gnu.org; Mon, 10 Apr 2023 11:14:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pltDW-0007Gs-F2 for guix-patches@gnu.org; Mon, 10 Apr 2023 11:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62754] [PATCH] doc: Use G-Expressions for package definition example. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 10 Apr 2023 15:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62754 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62754@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168113963027923 (code B ref -1); Mon, 10 Apr 2023 15:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Apr 2023 15:13:50 +0000 Received: from localhost ([127.0.0.1]:35664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pltDJ-0007GI-R2 for submit@debbugs.gnu.org; Mon, 10 Apr 2023 11:13:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:43162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pltDI-0007GB-Dc for submit@debbugs.gnu.org; Mon, 10 Apr 2023 11:13:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pltDI-0003Hv-2b for guix-patches@gnu.org; Mon, 10 Apr 2023 11:13:48 -0400 Received: from smtpm1.myservices.hosting ([185.26.105.232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pltDG-000567-4A for guix-patches@gnu.org; Mon, 10 Apr 2023 11:13:47 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id 95B1920525 for ; Mon, 10 Apr 2023 17:13:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 3A6F5800A8; Mon, 10 Apr 2023 17:13:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kJ-eELBNxVyz; Mon, 10 Apr 2023 17:13:34 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id B30DE800A7; Mon, 10 Apr 2023 17:13:34 +0200 (CEST) From: Bruno Victal Date: Mon, 10 Apr 2023 16:13:30 +0100 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.232; envelope-from=mirai@makinata.eu; helo=smtpm1.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681139659; a=rsa-sha256; cv=none; b=shE4ytLQHzpShD455aChJtBTFsP5JlNMk2dvXMx8UNFY+O5AyIGSyNe7HrUrGCI8faeZj2 4LkMkeDX6VXvaxrXnhfq8kxiYpEXf9/9S+R4vPlK80WQAdtV78nRrGoHeKV9J4edHHVapP DNKWVbkMAnb5izQQ63LkIMxisWG/N2Xb35ulxv62dTRDd6fJkLr5i68dW0QcOZffEeweS8 WsyysuAz71HNyU50ryr1u5aSSXFcbIxh9u97IBhEmCPP8OTMONC3k9LQc99eth3EQXAyDk CqFdtbi522gnw4+kT/v8xNW2zHOdizidbHkHHd6q/+uJdNO6dPJGCqgKMgaG3g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681139659; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Yj0SmizOCh1Y4w7XZ6+weROWWbox4/mO9ubKKBHhlc0=; b=mH3CbX1TAgM594rXd20dToZhhl+pYcCLvMsN0U73o/S5X2iL98rw5GjJa4Pq/AWZrmAv+U X2Sqdes4FyGDpT0O/cr1Cq94DFnGZf5YXw/I5uHVBA14Alo3ruGt0NUlvGtAw9uepj7qjB LOZBJn2S9qzq+LZA8iZc4QTMKpOSKJwodd+jba4raMOasQoRS2IcJ1604dMIZoOwdGxKe+ lCJnNEJlLC/06ki/pJ/VFDsGrjtOnomFqoKOcCxhFiaW0X+nXE7e/xEo4QnFPwY6d3a31u ZOz+N75zDs2E9ugrE5bzGY0nIxaJXLQ97fW5uHznLTBQJmXwJ6Ir7RHVhw6TlA== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.52 X-Spam-Score: -3.52 X-Migadu-Queue-Id: B861B27105 X-TUID: O1q9TlU9/321 * doc/guix.texi (Build Phases): Use G-Expressions for example. --- doc/guix.texi | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ed42488882..100ad93a3e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10131,21 +10131,26 @@ Build Phases ;; other fields omitted (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (delete 'configure) - (add-before 'build 'set-prefix-in-makefile - (lambda* (#:key outputs #:allow-other-keys) - ;; Modify the makefile so that its - ;; 'PREFIX' variable points to "out". - (let ((out (assoc-ref outputs "out"))) - (substitute* "Makefile" - (("PREFIX =.*") - (string-append "PREFIX = " - out "\n"))))))))))) + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'set-prefix-in-makefile + (lambda* (#:key inputs #:allow-other-keys) + ;; Modify the makefile so that its + ;; 'PREFIX' variable points to "out" and + ;; 'XMLLINT' points to the correct path. + (substitute* "Makefile" + (("PREFIX =.*") + (string-append "PREFIX = " #$output "\n")) + (("XMLLINT =.*") + (string-append "XMLLINT = " + (search-input-file inputs "/bin/xmllint") + "\n")))))))))) @end lisp The new phase that is inserted is written as an anonymous procedure, -introduced with @code{lambda*}; it honors the @code{outputs} parameter +introduced with @code{lambda*}; it honors the @code{inputs} parameter we have seen before. @xref{Build Utilities}, for more about the helpers used by this phase, and for more examples of @code{modify-phases}. base-commit: b78d6ceaa07be3c7582627cd28712b67102e521c -- 2.39.2