GNU bug report logs - #38678
[PATCH 0/2] Add '--load-path' to subcommands

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Thu, 19 Dec 2019 21:11:01 UTC

Severity: normal

Tags: patch

Done: Pierre Neidhardt <mail <at> ambrevar.xyz>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38678 in the body.
You can then email your comments to 38678 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 19 Dec 2019 21:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to zimoun <zimon.toutoune <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 19 Dec 2019 21:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 0/2] Add '--load-path' to subcommands
Date: Thu, 19 Dec 2019 22:09:58 +0100
Dear,

Here [1] has been discussed the addition of '--load-path' to the commands that
need it. What come in mind is:

 + guix graph
 + guix size

Done by these 2 patches.


Note that "guix size -L" is not tested because the file "tests/guix-size.sh"
does exist and does the option "--load-path" needs to be tested at the Scheme
level?


Then, what about:

 - guix refresh: -L already means --list-updaters
   Only --load-path? Nothing?

 - guix edit: I am not convinced it is useful because if you apply -L
   path/to/your/modules then it is easy to find the correct file to open.
   What do you think?


Thanks
simon

[1] https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00281.html


zimoun (2):
  graph: Add '--load-path' option.
  size: Add '--load-path' option.

 doc/guix.texi          | 15 +++++++++++++++
 guix/scripts/graph.scm | 10 +++++++++-
 guix/scripts/size.scm  |  8 ++++++++
 tests/guix-graph.sh    | 27 +++++++++++++++++++++++++--
 4 files changed, 57 insertions(+), 3 deletions(-)

-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 19 Dec 2019 21:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 1/2] graph: Add '--load-path' option.
Date: Thu, 19 Dec 2019 22:13:49 +0100
* guix/scripts/graph.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
* tests/guix-graph.sh: Test it.
---
 doc/guix.texi          |  9 +++++++++
 guix/scripts/graph.scm | 10 +++++++++-
 tests/guix-graph.sh    | 27 +++++++++++++++++++++++++--
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7fa1eca097..02f7cf5b39 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -69,6 +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@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -10037,6 +10038,14 @@ Display the graph for @var{system}---e.g., @code{i686-linux}.
 
 The package dependency graph is largely architecture-independent, but there
 are some architecture-dependent bits that this option allows you to visualize.
+
+@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
 
 On top of that, @command{guix graph} supports all the usual package
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index 7558cb1e85..9bbb867147 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,7 +36,8 @@
   #:use-module ((guix scripts build)
                 #:select (show-transformation-options-help
                           options->transformation
-                          %transformation-options))
+                          %transformation-options
+                          %standard-build-options))
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
   #:use-module (srfi srfi-34)
@@ -473,6 +475,9 @@ package modules, while attempting to retain user package modules."
                  (lambda (opt name arg result)
                    (alist-cons 'system arg
                                (alist-delete 'system result eq?))))
+         (find (lambda (option)
+                (member "load-path" (option-names option)))
+              %standard-build-options)
          (option '(#\h "help") #f #f
                  (lambda args
                    (show-help)
@@ -501,6 +506,9 @@ Emit a representation of the dependency graph of PACKAGE...\n"))
   (display (G_ "
   -s, --system=SYSTEM    consider the graph for SYSTEM--e.g., \"i686-linux\""))
   (newline)
+  (display (G_ "
+  -L, --load-path=DIR    prepend DIR to the package module search path"))
+  (newline)
   (show-transformation-options-help)
   (newline)
   (display (G_ "
diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh
index 2d4b3fac3f..4c37b61b38 100644
--- a/tests/guix-graph.sh
+++ b/tests/guix-graph.sh
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2015, 2016, 2019 Ludovic Courtès <ludo <at> gnu.org>
+# Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -20,10 +21,29 @@
 # Test the 'guix graph' command-line utility.
 #
 
-tmpfile1="t-guix-graph1-$$"
-tmpfile2="t-guix-graph2-$$"
+module_dir="t-guix-graph-$$"
+mkdir "$module_dir"
+trap "rm -rf $module_dir" EXIT
+
+tmpfile1="$module_dir/t-guix-graph1-$$"
+tmpfile2="$module_dir/t-guix-graph2-$$"
 trap 'rm -f "$tmpfile1" "$tmpfile2"' EXIT
 
+
+cat > "$module_dir/foo.scm"<<EOF
+(define-module (foo)
+  #:use-module (guix packages)
+  #:use-module (gnu packages base))
+
+(define-public dummy
+  (package (inherit hello)
+    (name "dummy")
+    (version "42")
+    (synopsis "dummy package")
+    (description "dummy package. Only used for testing purposes.")))
+EOF
+
+
 guix graph --version
 
 for package in guile-bootstrap coreutils python
@@ -59,3 +79,6 @@ guix graph git | grep 'label = "openssl'
 guix graph git --with-input=openssl=libressl | grep 'label = "libressl'
 if guix graph git --with-input=openssl=libressl | grep 'label = "openssl'
 then false; else true; fi
+
+# Try --load-path
+guix graph -L $module_dir dummy | grep 'label = "dummy'
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 19 Dec 2019 21:15:01 GMT) Full text and rfc822 format available.

Message #11 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 2/2] size: Add '--load-path' option.
Date: Thu, 19 Dec 2019 22:14:00 +0100
* guix/scripts/size.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
---
 doc/guix.texi         | 8 +++++++-
 guix/scripts/size.scm | 8 ++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 02f7cf5b39..c0fa6a3cab 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -69,7 +69,6 @@ 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@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -9837,6 +9836,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 f549ce05b8..2446b84587 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 <ludo <at> gnu.org>
+;;; Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; 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)
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 19 Dec 2019 21:36:02 GMT) Full text and rfc822 format available.

Message #14 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: [bug#38678] [PATCH 2/2] size: Add '--load-path' option.
Date: Thu, 19 Dec 2019 22:35:03 +0100
[Message part 1 (text/plain, inline)]
I haven't tested, but otherwise looks good to me!
Comments below:

> diff --git a/doc/guix.texi b/doc/guix.texi
> index 02f7cf5b39..c0fa6a3cab 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -69,7 +69,6 @@ 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@*

Did you remove the copyright line by mistake?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 19 Dec 2019 21:44:02 GMT) Full text and rfc822 format available.

Message #17 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: [bug#38678] [PATCH 2/2] size: Add '--load-path' option.
Date: Thu, 19 Dec 2019 22:43:23 +0100
On Thu, 19 Dec 2019 at 22:35, Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> I haven't tested, but otherwise looks good to me!

What do you think about the missing test?

Could also comment the cover letter (guix refresh, guix edit, etc.)?
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38678#5


> > diff --git a/doc/guix.texi b/doc/guix.texi
> > index 02f7cf5b39..c0fa6a3cab 100644
> > --- a/doc/guix.texi
> > +++ b/doc/guix.texi
> > @@ -69,7 +69,6 @@ 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@*
>
> Did you remove the copyright line by mistake?

Maybe. :-)


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 19 Dec 2019 21:49:02 GMT) Full text and rfc822 format available.

Message #20 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: [bug#38678] [PATCH 2/2] size: Add '--load-path' option.
Date: Thu, 19 Dec 2019 22:48:20 +0100
[Message part 1 (text/plain, inline)]
> - guix refresh: -L already means --list-updaters
>   Only --load-path? Nothing?

Yes, --load-path is good enough.

> - guix edit: I am not convinced it is useful because if you apply -L
>   path/to/your/modules then it is easy to find the correct file to open.
>   What do you think?

Makes sense, then it's OK to leave it out.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 18:55:02 GMT) Full text and rfc822 format available.

Message #23 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: [PATCH v2 0/4] Add '--load-path' to subcommands
Date: Wed, 8 Jan 2020 19:53:52 +0100
Dear,

Please find the amended patches about 'graph' and 'size'.

On Thu, 19 Dec 2019 at 22:10, zimoun <zimon.toutoune <at> gmail.com> wrote:

>  - guix refresh: -L already means --list-updaters
>    Only --load-path? Nothing?

The short option '-L' is dropped of the %standard-build-options.

Note that if I read correctly, nothing of the sucommand 'resfresh' is tested.

>  - guix edit: I am not convinced it is useful because if you apply -L
>    path/to/your/modules then it is easy to find the correct file to open.
>    What do you think?

Even it is easy to find the correct file to open, it adds consistency
with the other subcommands and it can help when using local channels.

Nothing about the subcommand 'edit' is tested neither.



All the best,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 18:57:01 GMT) Full text and rfc822 format available.

Message #26 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v2 1/4] graph: Add '--load-path' option.
Date: Wed,  8 Jan 2020 19:56:21 +0100
* guix/scripts/graph.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
* tests/guix-graph.sh: Test it.
---
 doc/guix.texi          |  9 +++++++++
 guix/scripts/graph.scm |  8 ++++++++
 tests/guix-graph.sh    | 27 +++++++++++++++++++++++++--
 3 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index bb0ef17ddd..37218eb847 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -69,6 +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@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -10037,6 +10038,14 @@ Display the graph for @var{system}---e.g., @code{i686-linux}.
 
 The package dependency graph is largely architecture-independent, but there
 are some architecture-dependent bits that this option allows you to visualize.
+
+@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
 
 On top of that, @command{guix graph} supports all the usual package
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index 7558cb1e85..53f407b2fc 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +36,7 @@
   #:use-module ((guix scripts build)
                 #:select (show-transformation-options-help
                           options->transformation
+                          %standard-build-options
                           %transformation-options))
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
@@ -473,6 +475,9 @@ package modules, while attempting to retain user package modules."
                  (lambda (opt name arg result)
                    (alist-cons 'system arg
                                (alist-delete 'system result eq?))))
+         (find (lambda (option)
+                (member "load-path" (option-names option)))
+              %standard-build-options)
          (option '(#\h "help") #f #f
                  (lambda args
                    (show-help)
@@ -501,6 +506,9 @@ Emit a representation of the dependency graph of PACKAGE...\n"))
   (display (G_ "
   -s, --system=SYSTEM    consider the graph for SYSTEM--e.g., \"i686-linux\""))
   (newline)
+  (display (G_ "
+  -L, --load-path=DIR    prepend DIR to the package module search path"))
+  (newline)
   (show-transformation-options-help)
   (newline)
   (display (G_ "
diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh
index 2d4b3fac3f..4c37b61b38 100644
--- a/tests/guix-graph.sh
+++ b/tests/guix-graph.sh
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2015, 2016, 2019 Ludovic Courtès <ludo <at> gnu.org>
+# Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -20,10 +21,29 @@
 # Test the 'guix graph' command-line utility.
 #
 
-tmpfile1="t-guix-graph1-$$"
-tmpfile2="t-guix-graph2-$$"
+module_dir="t-guix-graph-$$"
+mkdir "$module_dir"
+trap "rm -rf $module_dir" EXIT
+
+tmpfile1="$module_dir/t-guix-graph1-$$"
+tmpfile2="$module_dir/t-guix-graph2-$$"
 trap 'rm -f "$tmpfile1" "$tmpfile2"' EXIT
 
+
+cat > "$module_dir/foo.scm"<<EOF
+(define-module (foo)
+  #:use-module (guix packages)
+  #:use-module (gnu packages base))
+
+(define-public dummy
+  (package (inherit hello)
+    (name "dummy")
+    (version "42")
+    (synopsis "dummy package")
+    (description "dummy package. Only used for testing purposes.")))
+EOF
+
+
 guix graph --version
 
 for package in guile-bootstrap coreutils python
@@ -59,3 +79,6 @@ guix graph git | grep 'label = "openssl'
 guix graph git --with-input=openssl=libressl | grep 'label = "libressl'
 if guix graph git --with-input=openssl=libressl | grep 'label = "openssl'
 then false; else true; fi
+
+# Try --load-path
+guix graph -L $module_dir dummy | grep 'label = "dummy'
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 18:57:02 GMT) Full text and rfc822 format available.

Message #29 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v2 2/4] size: Add '--load-path' option.
Date: Wed,  8 Jan 2020 19:56:22 +0100
* 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 37218eb847..3d26facd2e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9837,6 +9837,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 f549ce05b8..2446b84587 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 <ludo <at> gnu.org>
+;;; Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; 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)
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 18:57:02 GMT) Full text and rfc822 format available.

Message #32 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v2 3/4] refresh: Add '--load-path' option.
Date: Wed,  8 Jan 2020 19:56:23 +0100
* 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..4695d0b517 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2018 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> 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) (equal? "load-path" 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





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 18:57:02 GMT) Full text and rfc822 format available.

Message #35 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v2 4/4] edit: Add '--load-path' option.
Date: Wed,  8 Jan 2020 19:56:24 +0100
* 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 <at> gnu.org>
 ;;; Copyright © 2015 Mathieu Lirzin <mthl <at> gnu.org>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 19:13:01 GMT) Full text and rfc822 format available.

Message #38 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: [PATCH v3] better filter in 'refresh'
Date: Wed, 8 Jan 2020 20:12:06 +0100
On Wed, 8 Jan 2020 at 19:53, zimoun <zimon.toutoune <at> gmail.com> wrote:

> The short option '-L' is dropped of the %standard-build-options.

My bad!
The patch v2 keeps only "load-path" when only #\L must be dropped out.
It is more about style than concrete issue.


All the best,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 19:13:02 GMT) Full text and rfc822 format available.

Message #41 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v3] refresh: Add '--load-path' option.
Date: Wed,  8 Jan 2020 20:12:22 +0100
* 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..bc8e906054 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2018 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 21:00:03 GMT) Full text and rfc822 format available.

Message #44 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: what about "guix repl"?
Date: Wed, 8 Jan 2020 21:59:14 +0100
Dear,

Do it make sense to add the option "--load-path" to the subcommand 'repl'?


All the best,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 08 Jan 2020 21:28:01 GMT) Full text and rfc822 format available.

Message #47 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>, 38678 <at> debbugs.gnu.org
Subject: Re: what about "guix repl"?
Date: Wed, 08 Jan 2020 22:27:43 +0100
[Message part 1 (text/plain, inline)]
I'd say yes, even though it has limited benefits.
In `guix repl`, you can see the load path with

--8<---------------cut here---------------start------------->8---
%load-path
--8<---------------cut here---------------end--------------->8---

The --load-path option would essentially be the same as appending the
path to the %load-path variable from the REPL.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 09 Jan 2020 13:20:02 GMT) Full text and rfc822 format available.

Message #50 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: what about "guix repl"?
Date: Thu, 9 Jan 2020 14:19:41 +0100
Hi Pierre,

On Wed, 8 Jan 2020 at 22:27, Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:
>
> I'd say yes, even though it has limited benefits.
> In `guix repl`, you can see the load path with
>
> --8<---------------cut here---------------start------------->8---
> %load-path
> --8<---------------cut here---------------end--------------->8---
>
> The --load-path option would essentially be the same as appending the
> path to the %load-path variable from the REPL.

Agree.

Note that 'guile' has the option too:
" -L DIRECTORY   add DIRECTORY to the front of the module load path"


Well, I send 2 patches about "guix repl":

 1. adding the 'load-path' option;
 2. adding the option '--listen' in the message outputted by '--help'.

Feel free to review and push if everything appear to you correct.


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 09 Jan 2020 13:22:01 GMT) Full text and rfc822 format available.

Message #53 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 1/2] repl: Add '--load-path' option.
Date: Thu,  9 Jan 2020 14:21:22 +0100
* guix/scripts/repl.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
---
 doc/guix.texi         | 8 ++++++++
 guix/scripts/repl.scm | 9 ++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 00eb85a4f7..ef6d1fc178 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7995,6 +7995,14 @@ Accept connections on localhost on port 37146.
 @item --listen=unix:/tmp/socket
 Accept connections on the Unix-domain socket @file{/tmp/socket}.
 @end table
+
+@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 tool.
 @end table
 
 @c *********************************************************************
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index e1cc759fc8..39a9b09656 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +20,7 @@
 (define-module (guix scripts repl)
   #:use-module (guix ui)
   #:use-module (guix scripts)
+  #:use-module ((guix scripts build) #:select (%standard-build-options))
   #:use-module (guix repl)
   #:use-module (guix utils)
   #:use-module (guix packages)
@@ -52,7 +54,10 @@
                   (alist-cons 'type (string->symbol arg) result)))
         (option '("listen") #t #f
                 (lambda (opt name arg result)
-                  (alist-cons 'listen arg result)))))
+                  (alist-cons 'listen arg result)))
+        (find (lambda (option)
+                (member "load-path" (option-names option)))
+              %standard-build-options)))
 
 
 (define (show-help)
@@ -60,6 +65,8 @@
 Start a Guile REPL in the Guix execution environment.\n"))
   (display (G_ "
   -t, --type=TYPE        start a REPL of the given TYPE"))
+  (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





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 09 Jan 2020 13:22:02 GMT) Full text and rfc822 format available.

Message #56 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH 2/2] repl: Fix '--help' message.
Date: Thu,  9 Jan 2020 14:21:23 +0100
* guix/scripts/repl.scm: (show-help): Add '--listen' option message.
---
 guix/scripts/repl.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 39a9b09656..fc3e4e2131 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -65,6 +65,9 @@
 Start a Guile REPL in the Guix execution environment.\n"))
   (display (G_ "
   -t, --type=TYPE        start a REPL of the given TYPE"))
+  (display (G_ "
+      --listen=ENDPOINT  listen ENDPOINT instead of standard I/O"))
+  (newline)
   (display (G_ "
   -L, --load-path=DIR    prepend DIR to the package module search path"))
   (newline)
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 15 Jan 2020 17:01:02 GMT) Full text and rfc822 format available.

Message #59 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v4 1/6] graph: Add '--load-path' option.
Date: Wed, 15 Jan 2020 18:00:01 +0100
* guix/scripts/graph.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
* tests/guix-graph.sh: Test it.
---
 doc/guix.texi          |  9 +++++++++
 guix/scripts/graph.scm |  8 ++++++++
 tests/guix-graph.sh    | 27 +++++++++++++++++++++++++--
 3 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index bb0ef17ddd..37218eb847 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -69,6 +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@*
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -10037,6 +10038,14 @@ Display the graph for @var{system}---e.g., @code{i686-linux}.
 
 The package dependency graph is largely architecture-independent, but there
 are some architecture-dependent bits that this option allows you to visualize.
+
+@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
 
 On top of that, @command{guix graph} supports all the usual package
diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm
index 7558cb1e85..53f407b2fc 100644
--- a/guix/scripts/graph.scm
+++ b/guix/scripts/graph.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +36,7 @@
   #:use-module ((guix scripts build)
                 #:select (show-transformation-options-help
                           options->transformation
+                          %standard-build-options
                           %transformation-options))
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
@@ -473,6 +475,9 @@ package modules, while attempting to retain user package modules."
                  (lambda (opt name arg result)
                    (alist-cons 'system arg
                                (alist-delete 'system result eq?))))
+         (find (lambda (option)
+                (member "load-path" (option-names option)))
+              %standard-build-options)
          (option '(#\h "help") #f #f
                  (lambda args
                    (show-help)
@@ -501,6 +506,9 @@ Emit a representation of the dependency graph of PACKAGE...\n"))
   (display (G_ "
   -s, --system=SYSTEM    consider the graph for SYSTEM--e.g., \"i686-linux\""))
   (newline)
+  (display (G_ "
+  -L, --load-path=DIR    prepend DIR to the package module search path"))
+  (newline)
   (show-transformation-options-help)
   (newline)
   (display (G_ "
diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh
index 2d4b3fac3f..4c37b61b38 100644
--- a/tests/guix-graph.sh
+++ b/tests/guix-graph.sh
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2015, 2016, 2019 Ludovic Courtès <ludo <at> gnu.org>
+# Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -20,10 +21,29 @@
 # Test the 'guix graph' command-line utility.
 #
 
-tmpfile1="t-guix-graph1-$$"
-tmpfile2="t-guix-graph2-$$"
+module_dir="t-guix-graph-$$"
+mkdir "$module_dir"
+trap "rm -rf $module_dir" EXIT
+
+tmpfile1="$module_dir/t-guix-graph1-$$"
+tmpfile2="$module_dir/t-guix-graph2-$$"
 trap 'rm -f "$tmpfile1" "$tmpfile2"' EXIT
 
+
+cat > "$module_dir/foo.scm"<<EOF
+(define-module (foo)
+  #:use-module (guix packages)
+  #:use-module (gnu packages base))
+
+(define-public dummy
+  (package (inherit hello)
+    (name "dummy")
+    (version "42")
+    (synopsis "dummy package")
+    (description "dummy package. Only used for testing purposes.")))
+EOF
+
+
 guix graph --version
 
 for package in guile-bootstrap coreutils python
@@ -59,3 +79,6 @@ guix graph git | grep 'label = "openssl'
 guix graph git --with-input=openssl=libressl | grep 'label = "libressl'
 if guix graph git --with-input=openssl=libressl | grep 'label = "openssl'
 then false; else true; fi
+
+# Try --load-path
+guix graph -L $module_dir dummy | grep 'label = "dummy'
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 15 Jan 2020 17:01:02 GMT) Full text and rfc822 format available.

Message #62 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v4 2/6] size: Add '--load-path' option.
Date: Wed, 15 Jan 2020 18:00:02 +0100
* 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 37218eb847..3d26facd2e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -9837,6 +9837,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 f549ce05b8..2446b84587 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 <ludo <at> gnu.org>
+;;; Copyright © 2019 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; 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)
-- 
2.23.0





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 15 Jan 2020 17:01:02 GMT) Full text and rfc822 format available.

Message #65 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v4 3/6] refresh: Add '--load-path' option.
Date: Wed, 15 Jan 2020 18:00:03 +0100
* 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..bc8e906054 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2018 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 15 Jan 2020 17:01:03 GMT) Full text and rfc822 format available.

Message #68 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v4 4/6] edit: Add '--load-path' option.
Date: Wed, 15 Jan 2020 18:00:04 +0100
* 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 <at> gnu.org>
 ;;; Copyright © 2015 Mathieu Lirzin <mthl <at> gnu.org>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 15 Jan 2020 17:01:03 GMT) Full text and rfc822 format available.

Message #71 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v4 5/6] repl: Add '--load-path' option.
Date: Wed, 15 Jan 2020 18:00:05 +0100
* guix/scripts/repl.scm (%option): Add '--load-path' option.
* doc/guix.texi: Document it.
---
 doc/guix.texi         | 8 ++++++++
 guix/scripts/repl.scm | 9 ++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 00eb85a4f7..ef6d1fc178 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -7995,6 +7995,14 @@ Accept connections on localhost on port 37146.
 @item --listen=unix:/tmp/socket
 Accept connections on the Unix-domain socket @file{/tmp/socket}.
 @end table
+
+@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 tool.
 @end table
 
 @c *********************************************************************
diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index e1cc759fc8..39a9b09656 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +20,7 @@
 (define-module (guix scripts repl)
   #:use-module (guix ui)
   #:use-module (guix scripts)
+  #:use-module ((guix scripts build) #:select (%standard-build-options))
   #:use-module (guix repl)
   #:use-module (guix utils)
   #:use-module (guix packages)
@@ -52,7 +54,10 @@
                   (alist-cons 'type (string->symbol arg) result)))
         (option '("listen") #t #f
                 (lambda (opt name arg result)
-                  (alist-cons 'listen arg result)))))
+                  (alist-cons 'listen arg result)))
+        (find (lambda (option)
+                (member "load-path" (option-names option)))
+              %standard-build-options)))
 
 
 (define (show-help)
@@ -60,6 +65,8 @@
 Start a Guile REPL in the Guix execution environment.\n"))
   (display (G_ "
   -t, --type=TYPE        start a REPL of the given TYPE"))
+  (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





Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Wed, 15 Jan 2020 17:01:04 GMT) Full text and rfc822 format available.

Message #74 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 38678 <at> debbugs.gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH v4 6/6] repl: Fix '--help' message.
Date: Wed, 15 Jan 2020 18:00:06 +0100
* guix/scripts/repl.scm: (show-help): Add '--listen' option message.
---
 guix/scripts/repl.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/scripts/repl.scm b/guix/scripts/repl.scm
index 39a9b09656..fc3e4e2131 100644
--- a/guix/scripts/repl.scm
+++ b/guix/scripts/repl.scm
@@ -65,6 +65,9 @@
 Start a Guile REPL in the Guix execution environment.\n"))
   (display (G_ "
   -t, --type=TYPE        start a REPL of the given TYPE"))
+  (display (G_ "
+      --listen=ENDPOINT  listen ENDPOINT instead of standard I/O"))
+  (newline)
   (display (G_ "
   -L, --load-path=DIR    prepend DIR to the package module search path"))
   (newline)
-- 
2.23.0





bug closed, send any further explanations to 38678 <at> debbugs.gnu.org and zimoun <zimon.toutoune <at> gmail.com> Request was from Pierre Neidhardt <mail <at> ambrevar.xyz> to control <at> debbugs.gnu.org. (Thu, 16 Jan 2020 14:31:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Thu, 16 Jan 2020 16:13:02 GMT) Full text and rfc822 format available.

Message #79 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>, 38678 <at> debbugs.gnu.org
Cc: Guix Devel <guix-devel <at> gnu.org>
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Thu, 16 Jan 2020 17:12:07 +0100
[Message part 1 (text/plain, inline)]
On Thu, 16 Jan 2020 at 15:30, Pierre Neidhardt <mail <at> 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
[v5-0003-refresh-Add-load-path-option.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Fri, 17 Jan 2020 15:57:02 GMT) Full text and rfc822 format available.

Message #82 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>, 38678 <at> debbugs.gnu.org
Cc: Guix Devel <guix-devel <at> gnu.org>
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Fri, 17 Jan 2020 16:56:22 +0100
[Message part 1 (text/plain, inline)]
I have already merged, can you rebase your changes against master? :)

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Fri, 17 Jan 2020 16:20:02 GMT) Full text and rfc822 format available.

Message #85 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Fri, 17 Jan 2020 17:19:12 +0100
On Fri, 17 Jan 2020 at 16:56, Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:
>
> I have already merged, can you rebase your changes against master? :)

By "merged", you mean pushed. ;-)

It is not a rebase, but another commit, right?
What will be the commit message?

--8<---------------cut here---------------start------------->8---
refresh: Fix internal variable name.

* guix/scripts/refresh.scm (%option): Fix internal variable name.
--8<---------------cut here---------------stop-------------->8---

It is ok?




Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Fri, 17 Jan 2020 16:58:02 GMT) Full text and rfc822 format available.

Message #88 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Fri, 17 Jan 2020 17:56:58 +0100
[Message part 1 (text/plain, inline)]
Sure thing!

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Fri, 17 Jan 2020 18:15:02 GMT) Full text and rfc822 format available.

Message #91 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Fri, 17 Jan 2020 19:14:15 +0100
[Message part 1 (text/plain, inline)]
What mess did you do Pierre? :-)

Why are you the author of ee9a735bc8 [1]?
Why there are lines modified in guix.texi 21f4fbdd84 [2] which are not
in the original patch [3]?

[1] https://git.savannah.gnu.org/cgit/guix.git/commit/?id=ee9a735bc8f544cf8eedc6c6a7e4ed2962663013
[2] https://git.savannah.gnu.org/cgit/guix.git/commit/?id=21f4fbdd8453e489fb89825c4226a0a0bda2bc17
[3] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38678#65

Or why I have missed?

Attached the change fix your early push of the 'refresh' patch. :-)

Cheers,
simon
[0001-refresh-Fix-internal-variable-name.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Fri, 17 Jan 2020 18:39:01 GMT) Full text and rfc822 format available.

Message #94 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Fri, 17 Jan 2020 19:38:10 +0100
[Message part 1 (text/plain, inline)]
zimoun <zimon.toutoune <at> gmail.com> writes:

> What mess did you do Pierre? :-)
>
> Why are you the author of ee9a735bc8 [1]?
> Why there are lines modified in guix.texi 21f4fbdd84 [2] which are not
> in the original patch [3]?

I just fixed the conflict of the copyright line because it got updated
in the meantime.  That's it :)

I'm the committer of the patch, not the author though.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Sat, 18 Jan 2020 12:02:02 GMT) Full text and rfc822 format available.

Message #97 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Sat, 18 Jan 2020 13:01:54 +0100
[Message part 1 (text/plain, inline)]
zimoun <zimon.toutoune <at> gmail.com> writes:

> What mess did you do Pierre? :-)
>
> Why are you the author of ee9a735bc8 [1]?

Good question :(  My apologies, it seems that when I resolve the
conflict your authorship was lost in the process.  Sorry about that.

> Why there are lines modified in guix.texi 21f4fbdd84 [2] which are not
> in the original patch [3]?

Hmmm... Looks like Emacs' ws-buttler had a hickup here.  I don't know
why, sorry about that.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Sat, 18 Jan 2020 12:10:02 GMT) Full text and rfc822 format available.

Message #100 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Sat, 18 Jan 2020 13:09:23 +0100
[Message part 1 (text/plain, inline)]
And I've merged your last patch.  Thanks!

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Mon, 20 Jan 2020 16:22:01 GMT) Full text and rfc822 format available.

Message #103 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Mon, 20 Jan 2020 17:21:26 +0100
On Sat, 18 Jan 2020 at 13:01, Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> > Why are you the author of ee9a735bc8 [1]?
>
> Good question :(  My apologies, it seems that when I resolve the
> conflict your authorship was lost in the process.  Sorry about that.

You owe me a beer at Guix Days 1. ;-)


> > Why there are lines modified in guix.texi 21f4fbdd84 [2] which are not
> > in the original patch [3]?
>
> Hmmm... Looks like Emacs' ws-buttler had a hickup here.  I don't know
> why, sorry about that.

Well, you owe me a beer at Guix Days 2. ;-)


Yes, extra spaces had been introduced by these commits:
21531add320
83db0205060
The good point is now, it is fixed. ;-)


What I do not understand is: why 'ws-buttler' had a hiccup? Did you
modify my patch? I mean ws-buttler generally works by hooking
(before-save-hook), therefore to have a hiccup, 'ws-buttler' needed a
modification then a save, right? Why?


Thank you for reviewing and pushing.
I will remind that you owe me 2 belgian beers. ;-)


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Mon, 20 Jan 2020 18:14:01 GMT) Full text and rfc822 format available.

Message #106 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Mon, 20 Jan 2020 19:12:48 +0100
[Message part 1 (text/plain, inline)]
zimoun <zimon.toutoune <at> gmail.com> writes:

> What I do not understand is: why 'ws-buttler' had a hiccup? Did you
> modify my patch? I mean ws-buttler generally works by hooking
> (before-save-hook), therefore to have a hiccup, 'ws-buttler' needed a
> modification then a save, right? Why?

I think this happened when I resolved the conflict (with Ediff).

> Thank you for reviewing and pushing.
> I will remind that you owe me 2 belgian beers. ;-)

Stella Artois? :D

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38678; Package guix-patches. (Mon, 20 Jan 2020 18:36:02 GMT) Full text and rfc822 format available.

Message #109 received at 38678 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 38678 <at> debbugs.gnu.org
Subject: Re: Command line option in addition to GUIX_PACKAGE_PATH - Reason?
Date: Mon, 20 Jan 2020 19:35:14 +0100
On Mon, 20 Jan 2020 at 19:12, Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:
>
> zimoun <zimon.toutoune <at> gmail.com> writes:
>
> > What I do not understand is: why 'ws-buttler' had a hiccup? Did you
> > modify my patch? I mean ws-buttler generally works by hooking
> > (before-save-hook), therefore to have a hiccup, 'ws-buttler' needed a
> > modification then a save, right? Why?
>
> I think this happened when I resolved the conflict (with Ediff).

You have not resolved a conflict for this one. It was for the previous
one. That's why I do not understand.

But it does not matter. Only the beers you owe me matter ;-)

Cheer,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 18 Feb 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.