Subject: bug#15286: closed (Re: bug#15286: Add the current directory as GUILE_LOAD_PATH by default)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 06 Sep 2013 12:11:03 +0000

Your bug report

#15286: Add the current directory as GUILE_LOAD_PATH by default

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].

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

Subject: Re: bug#15286: Add the current directory as GUILE_LOAD_PATH by default
From: [email-masked] (Ludovic Courtès)
To: Arne Babenhauserheide <[email-masked]>
Cc: [email-masked]
Date: Fri, 06 Sep 2013 14:10:27 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Arne Babenhauserheide <[email-masked]> skribis:

> Currently to install a local package definition, I have to adjust the GUILE_LOAD_PATH by hand:
>
>       GUILE_LOAD_PATH=. guix package -e '(@ (mercurial) hg)'
>
> This could be much clearer if the $pwd were in the load path automatically.

As usual, it is a bad idea to include ‘.’ in the search path, because it
makes it easy to unwillingly execute untrusted code.

More generally, ‘GUILE_LOAD_PATH’ is a user environment variable (like
$PATH, $CPATH, etc.), so it’s up to the user, not to Guix, to set it up
correctly.

So I’m closing this bug, but of course, I remain open to discussions on
improving Guix to better support “overlays”.

Thanks!

Ludo’.

Subject: Add the current directory as GUILE_LOAD_PATH by default
From: Arne Babenhauserheide <[email-masked]>
To: [email-masked]
Date: Fri, 06 Sep 2013 11:29:15 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear Guix Hackers,

Currently to install a local package definition, I have to adjust the GUILE_LOAD_PATH by hand:

      GUILE_LOAD_PATH=. guix package -e '(@ (mercurial) hg)'

This could be much clearer if the $pwd were in the load path automatically.

Even clearer could be something like overlays as discussed on guix-devel.¹

Examples of usage could be:

# install from an explicit definition file
guix package --file mercurial.scm -i mercurial 

# install from a directory with many scheme files: essentially just
# adds the directory and subdirectories to the load path.
guix package --overlay . -i mercurial 

With the obvious short forms:
(--file | -f)
(--overlay | -o)

Overlay and file might be used multiple times to adjust the available
packages.

Adding the local path to the package would be a first step, but it
would be unnecessary if there were a way to define additional files
and overlays.

Best wishes,
Arne

¹: http://lists.gnu.org/archive/html/guix-devel/2013-08/msg00127.html