Subject: bug#42688: closed (Re: bug#42688: Running a script with `guix repl` doesn't "see" additional channels using (%package-module-path))

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 19 Sep 2020 21:04:01 +0000

Your bug report

#42688: Running a script with `guix repl` doesn't "see" additional channels using (%package-module-path)

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42688: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42688
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#42688: Running a script with `guix repl` doesn't "see" additional channels using (%package-module-path)
From: Ludovic Courtès <[email-masked]>
To: Leo Prikler <[email-masked]>
Cc: [email-masked]
Date: Sat, 19 Sep 2020 23:03:07 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Leo Prikler <[email-masked]> 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’.

Subject: Running a script with `guix repl` doesn't "see" additional channels using (%package-module-path)
From: pkill9 <[email-masked]>
To: [email-masked]
Date: Mon, 3 Aug 2020 04:33:31 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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.