[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: size: Add '--load-path' option.
From: |
guix-commits |
Subject: |
02/06: size: Add '--load-path' option. |
Date: |
Thu, 16 Jan 2020 09:28:20 -0500 (EST) |
ambrevar pushed a commit to branch master
in repository guix.
commit 2d4688c1ea64f07866ffe976391d7ec3d371f6b5
Author: zimoun <address@hidden>
AuthorDate: Wed Jan 15 18:00:02 2020 +0100
size: Add '--load-path' option.
* guix/scripts/size.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
---
doc/guix.texi | 7 +++++++
guix/scripts/size.scm | 8 ++++++++
2 files changed, 15 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index a490a09..cbaca4a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9838,6 +9838,13 @@ the case, @command{guix size} fails as it tries to load
it.
@itemx -s @var{system}
Consider packages for @var{system}---e.g., @code{x86_64-linux}.
+@item --load-path=@var{directory}
+@itemx -L @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
@node Invoking guix graph
diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm
index f549ce0..2446b84 100644
--- a/guix/scripts/size.scm
+++ b/guix/scripts/size.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <address@hidden>
+;;; Copyright © 2019 Simon Tournier <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +20,7 @@
(define-module (guix scripts size)
#:use-module (guix ui)
#:use-module (guix scripts)
+ #:use-module (guix scripts build)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix combinators)
@@ -242,6 +244,9 @@ Report the size of PACKAGE and its dependencies.\n"))
-m, --map-file=FILE write to FILE a graphical map of disk usage"))
(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"))
@@ -273,6 +278,9 @@ Report the size of PACKAGE and its dependencies.\n"))
(option '(#\m "map-file") #t #f
(lambda (opt name arg result)
(alist-cons 'map-file arg result)))
+ (find (lambda (option)
+ (member "load-path" (option-names option)))
+ %standard-build-options)
(option '(#\h "help") #f #f
(lambda args
(show-help)
- branch master updated (ba07842 -> d14e474), guix-commits, 2020/01/16
- 02/06: size: Add '--load-path' option.,
guix-commits <=
- 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, 2020/01/16
- 06/06: repl: Fix '--help' message., guix-commits, 2020/01/16