all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>, 38678@debbugs.gnu.org
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Thu, 16 Jan 2020 17:12:07 +0100	[thread overview]
Message-ID: <CAJ3okZ3G5YteTpMJdsfUHHp=LrzZ593OrZAaupk=x7bp3CZ-3Q@mail.gmail.com> (raw)
In-Reply-To: <87blr3eao0.fsf@ambrevar.xyz>

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

On Thu, 16 Jan 2020 at 15:30, Pierre Neidhardt <mail@ambrevar.xyz> wrote:

> I've merged your patch 38678.

Cool! Thank you.


> Should I fix this for you?

Yes, for sure.
Patch attached.

Cheers,
simon

[-- Attachment #2: v5-0003-refresh-Add-load-path-option.patch --]
[-- Type: text/x-patch, Size: 3577 bytes --]

From 7ec82e221fdb42b6776ae4c41708d9ec361b4ebf Mon Sep 17 00:00:00 2001
From: zimoun <zimon.toutoune@gmail.com>
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 <m.othacehe@gmail.com>
 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; 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


  reply	other threads:[~2020-01-16 16:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 11:28 Document GUIX_LOAD_PATH? Pierre Neidhardt
2019-12-18 13:17 ` zimoun
2019-12-19 10:45   ` Clément Lassieur
2019-12-19 10:59     ` Pierre Neidhardt
2019-12-19 16:57       ` Ludovic Courtès
2019-12-19 17:04         ` Pierre Neidhardt
2019-12-19 17:09           ` zimoun
2019-12-19 17:14             ` Pierre Neidhardt
2019-12-26 20:31               ` Command line option in addition to GUIX_PACKAGE_PATH - Reason? Danny Milosavljevic
2019-12-28  9:56                 ` Pierre Neidhardt
2019-12-30 18:29                 ` zimoun
2020-01-16 14:30                   ` Pierre Neidhardt
2020-01-16 16:12                     ` zimoun [this message]
2020-01-17 15:56                       ` Pierre Neidhardt
2020-01-17 16:19                         ` [bug#38678] " zimoun
2020-01-17 16:56                           ` Pierre Neidhardt
2020-01-17 18:14                             ` zimoun
2020-01-17 18:38                               ` Pierre Neidhardt
2020-01-18 12:01                               ` Pierre Neidhardt
2020-01-18 12:09                                 ` Pierre Neidhardt
2020-01-20 16:21                                 ` zimoun
2020-01-20 18:12                                   ` Pierre Neidhardt
2020-01-20 18:35                                     ` zimoun
2019-12-19 21:13           ` Document GUIX_LOAD_PATH? zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ3okZ3G5YteTpMJdsfUHHp=LrzZ593OrZAaupk=x7bp3CZ-3Q@mail.gmail.com' \
    --to=zimon.toutoune@gmail.com \
    --cc=38678@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.