--- Begin Message ---
Subject: |
Running a script with `guix repl` doesn't "see" additional channels using (%package-module-path) |
Date: |
Mon, 3 Aug 2020 04:33:31 +0100 |
Running the following in `guix repl` returns additional channels:
```
itsme@antelope ~> guix repl
GNU Guile 3.0.4
Copyright (C) 1995-2020 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guix-user)> (use-modules (gnu packages))
scheme@(guix-user)> (%package-module-path)
$1 =
(("/gnu/store/kds0mq06qpin125gkikwzdm6mjfwjffc-guix-module-union/share/guile/site/3.0"
. "gnu/packages")
"/gnu/store/96pa4rc57zgqf36y2kv8z20p2jvlgypq-pkill9-free-channel-dependency/share/guile/site/3.0"
"/gnu/store/3ilx18ywdm6xk9f5l1mznrn45vcbncsq-pkill9-free/share/guile/site/3.0")
scheme@(guix-user)>
```
But running the following in "test.scm" with `guix repl /tmp/test.scm
doesn't return additional channels:
```
(use-modules (gnu packages))
(display (%package-module-path))
```
```
((/gnu/store/kds0mq06qpin125gkikwzdm6mjfwjffc-guix-module-union/share/guile/site/3.0
. gnu/packages))
```
fold-available-packages uses this to search for packages, which I am
using for a script. As a result, the script doesn't know about packages
from the additional channels.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#42688: Running a script with `guix repl` doesn't "see" additional channels using (%package-module-path) |
Date: |
Sat, 19 Sep 2020 23:03:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hello,
Leo Prikler <leo.prikler@student.tugraz.at> skribis:
> With that however, I am no longer so sure. The initial program
> arguments are part of the UI, but at the same time, that would make it
> not UI-free to begin with. Kinda strengthens the argument, that it
> should be made a fluid/parameter/what have you, that gets initialized
> with program-arguments at some point.
Alright. I went with something along these lines in commit
1b179d7876f19f04009a2f9e248ac10711f4c660.
I tested that it works as intended with ‘guix pull --url=$PWD’ and
running a script from there that accesses modules of a secondary
channel.
Thank you!
Ludo’.
--- End Message ---