all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: 38678@debbugs.gnu.org
Cc: zimoun <zimon.toutoune@gmail.com>
Subject: [bug#38678] [PATCH v2 4/4] edit: Add '--load-path' option.
Date: Wed,  8 Jan 2020 19:56:24 +0100	[thread overview]
Message-ID: <20200108185624.8609-4-zimon.toutoune@gmail.com> (raw)
In-Reply-To: <20200108185624.8609-1-zimon.toutoune@gmail.com>

* guix/scripts/edit.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
---
 doc/guix.texi         |  4 ++++
 guix/scripts/edit.scm | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index bee4c3b2c9..00eb85a4f7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8705,6 +8705,10 @@ have created your own packages on @code{GUIX_PACKAGE_PATH}
 recipes.  In other cases, you will be able to examine the read-only recipes
 for packages currently in the store.
 
+Instead of @code{GUIX_PACKAGE_PATH}, the command-line option
+@code{--load-path=@var{directory}} (or in short @code{-L
+@var{directory}}) allows you to add @var{directory} to the front of the
+package module search path and so make your own packages visible.
 
 @node Invoking guix download
 @section Invoking @command{guix download}
diff --git a/guix/scripts/edit.scm b/guix/scripts/edit.scm
index da3d2775e8..a6fd1d2751 100644
--- a/guix/scripts/edit.scm
+++ b/guix/scripts/edit.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,6 +21,7 @@
 (define-module (guix scripts edit)
   #:use-module (guix ui)
   #:use-module (guix scripts)
+  #:use-module ((guix scripts build) #:select (%standard-build-options))
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (srfi srfi-1)
@@ -28,7 +30,10 @@
             guix-edit))
 
 (define %options
-  (list (option '(#\h "help") #f #f
+  (list (find (lambda (option)
+                (member "load-path" (option-names option)))
+              %standard-build-options)
+        (option '(#\h "help") #f #f
                 (lambda args
                   (show-help)
                   (exit 0)))
@@ -39,6 +44,9 @@
 (define (show-help)
   (display (G_ "Usage: guix edit PACKAGE...
 Start $VISUAL or $EDITOR to edit the definitions of PACKAGE...\n"))
+  (newline)
+  (display (G_ "
+  -L, --load-path=DIR    prepend DIR to the package module search path"))
   (newline)
   (display (G_ "
   -h, --help             display this help and exit"))
-- 
2.23.0

  parent reply	other threads:[~2020-01-08 18:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 21:09 [bug#38678] [PATCH 0/2] Add '--load-path' to subcommands zimoun
2019-12-19 21:13 ` [bug#38678] [PATCH 1/2] graph: Add '--load-path' option zimoun
2019-12-19 21:14 ` [bug#38678] [PATCH 2/2] size: " zimoun
2019-12-19 21:35   ` Pierre Neidhardt
2019-12-19 21:43     ` zimoun
2019-12-19 21:48       ` Pierre Neidhardt
2020-01-08 18:53 ` [bug#38678] [PATCH v2 0/4] Add '--load-path' to subcommands zimoun
2020-01-08 19:12   ` [bug#38678] [PATCH v3] better filter in 'refresh' zimoun
2020-01-08 18:56 ` [bug#38678] [PATCH v2 1/4] graph: Add '--load-path' option zimoun
2020-01-08 18:56   ` [bug#38678] [PATCH v2 2/4] size: " zimoun
2020-01-08 18:56   ` [bug#38678] [PATCH v2 3/4] refresh: " zimoun
2020-01-08 18:56   ` zimoun [this message]
2020-01-08 19:12 ` [bug#38678] [PATCH v3] " zimoun
2020-01-08 20:59 ` [bug#38678] what about "guix repl"? zimoun
2020-01-08 21:27   ` Pierre Neidhardt
2020-01-09 13:19     ` zimoun
2020-01-09 13:21 ` [bug#38678] [PATCH 1/2] repl: Add '--load-path' option zimoun
2020-01-09 13:21   ` [bug#38678] [PATCH 2/2] repl: Fix '--help' message zimoun
2020-01-15 17:00 ` [bug#38678] [PATCH v4 1/6] graph: Add '--load-path' option zimoun
2020-01-15 17:00   ` [bug#38678] [PATCH v4 2/6] size: " zimoun
2020-01-15 17:00   ` [bug#38678] [PATCH v4 3/6] refresh: " zimoun
2020-01-15 17:00   ` [bug#38678] [PATCH v4 4/6] edit: " zimoun
2020-01-15 17:00   ` [bug#38678] [PATCH v4 5/6] repl: " zimoun
2020-01-15 17:00   ` [bug#38678] [PATCH v4 6/6] repl: Fix '--help' message 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=20200108185624.8609-4-zimon.toutoune@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=38678@debbugs.gnu.org \
    /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.