From patchwork Mon Jan 15 17:21:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 58885 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 B2C2E27BBEA; Mon, 15 Jan 2024 17:22:27 +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_H5,RCVD_IN_MSPIKE_WL, 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 CD9E427BBE2 for ; Mon, 15 Jan 2024 17:22:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPQf5-0000CD-Nx; Mon, 15 Jan 2024 12:22:11 -0500 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 1rPQf1-0000Bg-7K for guix-patches@gnu.org; Mon, 15 Jan 2024 12:22:08 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPQex-0005sO-GN; Mon, 15 Jan 2024 12:22:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rPQew-0007AL-3Z; Mon, 15 Jan 2024 12:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68479] [PATCH] weather: Add =?utf-8?b?4oCYLWXigJku?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Mon, 15 Jan 2024 17:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68479 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68479@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.170533931027526 (code B ref -1); Mon, 15 Jan 2024 17:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jan 2024 17:21:50 +0000 Received: from localhost ([127.0.0.1]:46777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPQej-00079u-Tf for submit@debbugs.gnu.org; Mon, 15 Jan 2024 12:21:50 -0500 Received: from lists.gnu.org ([2001:470:142::17]:52154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPQeg-00079g-OC for submit@debbugs.gnu.org; Mon, 15 Jan 2024 12:21:48 -0500 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 1rPQeb-0000Aa-1T for guix-patches@gnu.org; Mon, 15 Jan 2024 12:21:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rPQea-0005rX-2z; Mon, 15 Jan 2024 12:21:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=BLhD2ZmKymWc64fJmZ/d/QnVwDMkiXhJ+f8mQni9j9Y=; b=gHKgKYHHhWO1tV O8F31cn0VZnxrlFDzvYWcEhauUKW1gh4gfmlvpm2DgwIztXAFtSWEwv/sygIFV4uZzcmhYZrwguFI UPQihSHGj1IKaHrTA4CMNu+bEXDMBBILtP61mhmU4ih5xeXZws+SzyPUU2svAzKEsL380yCJ2PtOL MC8utm7t//cImUQ2Qw7ucQHoIUip+qFIeItmq2aESsEdV+bDKu70c5Iy2YshJoMt0Cu/g7YxPxd4u SP+p/VCs6hO0UayxiwTvRIZS4iLSt74bnPbxmbkKmOtNiCLYN1776Z+5inAEt/jVmwnQCkONjYxvY RGJHugcSGngaejH4gaCw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 15 Jan 2024 18:21:32 +0100 Message-ID: X-Mailer: git-send-email 2.41.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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/scripts/weather.scm (show-help, %options): Add ‘-e’. (guix-weather): Handle it. * doc/guix.texi (Invoking guix weather): Document it. Change-Id: I6dc97ec2b8226b57be33247b05a34c23b573a64f --- doc/guix.texi | 16 +++++++++++++++- guix/scripts/weather.scm | 9 ++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) Hi! This patch adds to ‘guix weather’ the ‘-e’ option that ‘guix build’ and most other commands already support. Thoughts? Ludo’. base-commit: 162d6a2fdd6af13272967c77347a54934ecb45e6 diff --git a/doc/guix.texi b/doc/guix.texi index a66005ee9d..fe16dd30e6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -22,7 +22,7 @@ @set SUBSTITUTE-URLS https://@value{SUBSTITUTE-SERVER-1} https://@value{SUBSTITUTE-SERVER-2} @copying -Copyright @copyright{} 2012-2023 Ludovic Courtès@* +Copyright @copyright{} 2012-2024 Ludovic Courtès@* Copyright @copyright{} 2013, 2014, 2016 Andreas Enge@* Copyright @copyright{} 2013 Nikita Karetnikov@* Copyright @copyright{} 2014, 2015, 2016 Alex Kost@* @@ -16721,6 +16721,20 @@ Invoking guix weather This option can be repeated several times, in which case the manifests are concatenated. +@item --expression=@var{expr} +@itemx -e @var{expr} +Consider the package @var{expr} evaluates to. + +A typical use case for this option is specifying a package that is +hidden and thus cannot be referred to in the usual way, as in this +example: + +@example +guix weather -e '(@@@@ (gnu packages rust) rust-bootstrap)' +@end example + +This option can be repeated. + @item --coverage[=@var{count}] @itemx -c [@var{count}] Report on substitute coverage for packages: list packages with at least diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index 2f8985593d..08a1b22a74 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017-2023 Ludovic Courtès +;;; Copyright © 2017-2024 Ludovic Courtès ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2018 Kyle Meyer ;;; Copyright © 2020 Simon Tournier @@ -388,6 +388,8 @@ (define (show-help) -m, --manifest=MANIFEST look up substitutes for packages specified in MANIFEST")) (display (G_ " + -e, --expression=EXPR build the object EXPR evaluates to")) + (display (G_ " -c, --coverage[=COUNT] show substitute coverage for packages with at least COUNT dependents")) @@ -426,6 +428,9 @@ (define %options (option '(#\m "manifest") #t #f (lambda (opt name arg result) (alist-cons 'manifest arg result))) + (option '(#\e "expression") #t #f + (lambda (opt name arg result) + (alist-cons 'expression arg result))) (option '(#\c "coverage") #f #t (lambda (opt name arg result) (alist-cons 'coverage @@ -611,6 +616,8 @@ (define-command (guix-weather . args) (base (filter-map (match-lambda (('argument . spec) (specification->package spec)) + (('expression . str) + (read/eval-package-expression str)) (_ #f)) opts)))