From patchwork Sat Nov 5 11:59:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivien Kraus X-Patchwork-Id: 44344 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 0772327BBEA; Sat, 5 Nov 2022 20:09:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B774227BBE9 for ; Sat, 5 Nov 2022 20:09:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orPTU-0000s0-GB; Sat, 05 Nov 2022 16:09:04 -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 1orPTS-0000rl-Qt for guix-patches@gnu.org; Sat, 05 Nov 2022 16:09: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 1orPTS-0006pU-Ce for guix-patches@gnu.org; Sat, 05 Nov 2022 16:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1orPTS-0000jl-1J for guix-patches@gnu.org; Sat, 05 Nov 2022 16:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#59048] [PATCH v2] guix: modify-input: Recommend prepend instead of append. References: <7c0fbbe321c736a5757c637b33bf3a9909a6f63e.camel@planete-kraus.eu> In-Reply-To: <7c0fbbe321c736a5757c637b33bf3a9909a6f63e.camel@planete-kraus.eu> Resent-From: Vivien Kraus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Nov 2022 20:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59048 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59048@debbugs.gnu.org Received: via spool by 59048-submit@debbugs.gnu.org id=B59048.16676789282813 (code B ref 59048); Sat, 05 Nov 2022 20:09:01 +0000 Received: (at 59048) by debbugs.gnu.org; 5 Nov 2022 20:08:48 +0000 Received: from localhost ([127.0.0.1]:58144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orPTE-0000jJ-EK for submit@debbugs.gnu.org; Sat, 05 Nov 2022 16:08:48 -0400 Received: from planete-kraus.eu ([89.234.140.182]:56118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1orPTB-0000j9-NU for 59048@debbugs.gnu.org; Sat, 05 Nov 2022 16:08:46 -0400 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id c07262ca for <59048@debbugs.gnu.org>; Sat, 5 Nov 2022 20:08:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h=from :date:subject:to:message-id:mime-version; s=dkim; bh=ANAw7pNFcme ftcznuBI0O4A1nOo=; b=B1OqRM2X3SgI8/x6nnnR/8tMDbalgqss6egku9YXQe2 eNwiMMqRzbLOh2YVLtYRwZnxyksrzd2c7+rElhB1gsxgre5LLHdX6u3DSAF7nzhh Eqjrmrm8QReS08C8iH/dguYB8BneRkwEetsfwV6+ioYaYQSLxpXdipkm0Wcrl5uk = Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 75f89cbb (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO) for <59048@debbugs.gnu.org>; Sat, 5 Nov 2022 20:08:40 +0000 (UTC) Date: Sat, 5 Nov 2022 12:59:01 +0100 Message-ID: <13852d418ac206841fbb2abb3c19b95641338a94.camel@planete-kraus.eu> MIME-Version: 1.0 User-Agent: Evolution 3.46.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: , Sender: "Guix-patches" Reply-to: Vivien Kraus X-ACL-Warn: , Vivien Kraus via Guix-patches X-Patchwork-Original-From: Vivien Kraus via Guix-patches via From: Vivien Kraus Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Most packages use prepend rather than append. If guix has to decide on an official policy, it should favor prepend. * doc/guix.texi (Defining Package Variants): Document the "prepend" clause of modify-inputs first. * guix/packages.scm (modify-inputs): use "prepend" in the docstring. --- doc/guix.texi | 12 ++++++------ guix/packages.scm | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) base-commit: e5a0381e6defd9c1ffd1b57d9de7f31636c87b68 diff --git a/doc/guix.texi b/doc/guix.texi index 7806b21a0f..f818643ecd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8057,20 +8057,20 @@ following forms: @item (delete @var{name}@dots{}) Delete from the inputs packages with the given @var{name}s (strings). -@item (append @var{package}@dots{}) -Add @var{package}s to the end of the input list. - @item (prepend @var{package}@dots{}) Add @var{package}s to the front of the input list. + +@item (append @var{package}@dots{}) +Add @var{package}s to the end of the input list. @end table The example below removes the GMP and ACL inputs of Coreutils and adds -libcap to the back of the input list: +libcap to the front of the input list: @lisp (modify-inputs (package-inputs coreutils) (delete "gmp" "acl") - (append libcap)) + (prepend libcap)) @end lisp The example below replaces the @code{guile} package from the inputs of @@ -8081,7 +8081,7 @@ The example below replaces the @code{guile} package from the inputs of (replace "guile" guile-2.2)) @end lisp -The last type of clause is @code{prepend}, to add inputs to the front of +The last type of clause is @code{append}, to add inputs at the back of the list. @end deffn diff --git a/guix/packages.scm b/guix/packages.scm index 704b4ee710..502df7fdd1 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1176,9 +1176,9 @@ (define-syntax modify-inputs (modify-inputs (package-inputs coreutils) (delete \"gmp\" \"acl\") - (append libcap)) + (prepend libcap)) -Other types of clauses include 'prepend' and 'replace'. +Other types of clauses include 'append' and 'replace'. The first argument must be a labeled input list; the result is also a labeled input list."