[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: edit: Add '--load-path' option.
From: |
guix-commits |
Subject: |
04/06: edit: Add '--load-path' option. |
Date: |
Thu, 16 Jan 2020 09:28:21 -0500 (EST) |
ambrevar pushed a commit to branch master
in repository guix.
commit 3c8396b578fe1b2efa942785e92a433c5f712b5d
Author: zimoun <address@hidden>
AuthorDate: Wed Jan 15 18:00:04 2020 +0100
edit: Add '--load-path' option.
* 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 a05ea17..87ad121 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8706,6 +8706,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 da3d277..a6fd1d2 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 <address@hidden>
;;; Copyright © 2015 Mathieu Lirzin <address@hidden>
+;;; Copyright © 2020 Simon Tournier <address@hidden>
;;;
;;; 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)))
@@ -41,6 +46,9 @@
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"))
(display (G_ "
-V, --version display version information and exit"))
- branch master updated (ba07842 -> d14e474), guix-commits, 2020/01/16
- 02/06: size: Add '--load-path' option., guix-commits, 2020/01/16
- 01/06: graph: Add '--load-path' option., guix-commits, 2020/01/16
- 03/06: refresh: Add '--load-path' option., guix-commits, 2020/01/16
- 05/06: repl: Add '--load-path' option., guix-commits, 2020/01/16
- 04/06: edit: Add '--load-path' option.,
guix-commits <=
- 06/06: repl: Fix '--help' message., guix-commits, 2020/01/16