From patchwork Thu Jan 16 16:12:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 19840 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 60CCE17AD6; Thu, 16 Jan 2020 16:13:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id CF20A17A2D for ; Thu, 16 Jan 2020 16:13:18 +0000 (GMT) Received: from localhost ([::1]:44428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is7lm-0003RR-DE for patchwork@mira.cbaines.net; Thu, 16 Jan 2020 11:13:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39192) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1is7la-0003R5-5u for guix-patches@gnu.org; Thu, 16 Jan 2020 11:13:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1is7lW-00055N-Nq for guix-patches@gnu.org; Thu, 16 Jan 2020 11:13:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60545) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1is7lW-00055H-Kc for guix-patches@gnu.org; Thu, 16 Jan 2020 11:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1is7lW-00013T-Go for guix-patches@gnu.org; Thu, 16 Jan 2020 11:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38678] Command line option in addition to GUIX_PACKAGE_PATH - Reason? Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Jan 2020 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38678 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Pierre Neidhardt , 38678@debbugs.gnu.org Cc: Guix Devel Received: via spool by 38678-submit@debbugs.gnu.org id=B38678.15791911534017 (code B ref 38678); Thu, 16 Jan 2020 16:13:02 +0000 Received: (at 38678) by debbugs.gnu.org; 16 Jan 2020 16:12:33 +0000 Received: from localhost ([127.0.0.1]:38285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is7kz-00012g-MP for submit@debbugs.gnu.org; Thu, 16 Jan 2020 11:12:33 -0500 Received: from mail-qk1-f175.google.com ([209.85.222.175]:34188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1is7ku-00012N-8V for 38678@debbugs.gnu.org; Thu, 16 Jan 2020 11:12:27 -0500 Received: by mail-qk1-f175.google.com with SMTP id j9so19634451qkk.1 for <38678@debbugs.gnu.org>; Thu, 16 Jan 2020 08:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EbRkHzHDXZNELAK8Ods8hdA1u3DPnn5r/wvbxa1J3rE=; b=EOrEziW5+YBxtN0JiuEgqsaq9LSquaqVMhDcvoNs3y+lY6vFdPdoknsJy6+z7Wi0hU gx9GosAs/ybGj0hc1vZwjyieXAycRMfc1nWZIUWHp6aof3k15aa/YhCoDS5c0NEfG/92 vIyAMGqUVPBdHnf51XFiMD8jXQuYmP4Z/yuQJzZt2SncYutX4iVwFntKOBdoqbvfbP9L wgbzv5bKIbjDaG27Z0HLQ22pfpB85Fh9m35jzWzItr4XN+HfzaGfcRjaDcjALzKMAcyi I/d1uLPdtTMOfeWzfLU1H+j7V2ejNS8PuBQn9VxYt0KDsDPKeoXpux7XyoLrBOzAThs+ uJaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EbRkHzHDXZNELAK8Ods8hdA1u3DPnn5r/wvbxa1J3rE=; b=GiYVRzuqG0qYy1tYg8emnhBgS/d+YpavWeqV05lR9ItsmUk3XyHCM/MOoYtxcD/kNr N/mOacVhvsCCjWZ9XF23swHwXPT+JVTb63sTA1io30PhDlrb+7yiWR/a2A7gbk6qN9XB pcKO0NJvHI48ks6/W0pcvZ9OLeItgMRYQMwbIP0p08640Z518vQOPGgB9vx8gqgCqQGn dlRqQkviFMwZyOB91kcL3zInheJ+mEc5JLsV0tM++f5MgUAWEldRCF5ZamHbuSvjYP2S +Gbpi80nyfWdQy6tUvTmq/KHa5jx46wJdVaCVs3MWA3DV84xBOX4QiLnsYr6tZHPNkEB 87Kg== X-Gm-Message-State: APjAAAWPXGeXP2g9cOqQrBlvPNnidiHyANIqDdOxf01Plr4KsR86Q7iI ikSE7RSnh7jGOyTCQrFwblTtbbCtWBZc2dmENCE= X-Google-Smtp-Source: APXvYqzVAOQF2CGkM7QGSzFCc+oZ6twx0yhcvtfJnlyH1aY02e5Z8E+zZcOJwHqrXvj0rSaEHzr2QeULv9sdoWkoBZY= X-Received: by 2002:a37:63c7:: with SMTP id x190mr33510516qkb.232.1579191138774; Thu, 16 Jan 2020 08:12:18 -0800 (PST) MIME-Version: 1.0 References: <87pnglj2ka.fsf@ambrevar.xyz> <87sglgsiey.fsf@lassieur.org> <878sn8inru.fsf@ambrevar.xyz> <87o8w4mewg.fsf@gnu.org> <87tv5wfdrm.fsf@ambrevar.xyz> <87lfr8fd9u.fsf@ambrevar.xyz> <20191226213108.753f8ab7@scratchpost.org> <87blr3eao0.fsf@ambrevar.xyz> In-Reply-To: <87blr3eao0.fsf@ambrevar.xyz> From: zimoun Date: Thu, 16 Jan 2020 17:12:07 +0100 Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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 On Thu, 16 Jan 2020 at 15:30, Pierre Neidhardt wrote: > I've merged your patch 38678. Cool! Thank you. > Should I fix this for you? Yes, for sure. Patch attached. Cheers, simon From 7ec82e221fdb42b6776ae4c41708d9ec361b4ebf Mon Sep 17 00:00:00 2001 From: zimoun Date: Wed, 8 Jan 2020 18:53:01 +0100 Subject: [PATCH v5 3/6] refresh: Add '--load-path' option. * guix/scripts/refresh.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it. --- doc/guix.texi | 9 ++++++++- guix/scripts/refresh.scm | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3d26facd2e..bee4c3b2c9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -69,7 +69,7 @@ Copyright @copyright{} 2019 Jakob L. Kreuze@* Copyright @copyright{} 2019 Kyle Andrews@* Copyright @copyright{} 2019 Alex Griffin@* Copyright @copyright{} 2019 Guillaume Le Vaillant@* -Copyright @copyright{} 2019 Simon Tournier@* +Copyright @copyright{} 2019, 2020 Simon Tournier@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -9552,6 +9552,13 @@ the user whether to download it or not. This is the default behavior. @item --key-server=@var{host} Use @var{host} as the OpenPGP key server when importing a public key. +@item --load-path=@var{directory} +Add @var{directory} to the front of the package module search path +(@pxref{Package Modules}). + +This allows users to define their own packages and make them visible to +the command-line tools. + @end table The @code{github} updater uses the diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index daf6fcf947..efada1df5a 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2018 Efraim Flashner ;;; Copyright © 2019 Ricardo Wurmus +;;; Copyright © 2020 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (guix ui) #:use-module (gcrypt hash) #:use-module (guix scripts) + #:use-module ((guix scripts build) #:select (%standard-build-options)) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix packages) @@ -116,6 +118,19 @@ (leave (G_ "unsupported policy: ~a~%") arg))))) + ;; The short option -L is already used by --list-updaters, therefore + ;; it needs to be removed from %standard-build-options. + (let ((load-path-option (find (lambda (option) + (member "load-path" + (option-names option))) + %standard-build-options))) + (option + (filter (lambda (name) (not (equal? #\L name))) + (option-names load-path-option)) + (option-required-arg? load-path-option) + (option-optional-arg? load-path-option) + (option-processor load-path-option))) + (option '(#\h "help") #f #f (lambda args (show-help) @@ -165,6 +180,9 @@ specified with `--select'.\n")) 'always', 'never', and 'interactive', which is also used when 'key-download' is not specified")) (newline) + (display (G_ " + --load-path=DIR prepend DIR to the package module search path")) + (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " -- 2.23.0