unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15286: Add the current directory as GUILE_LOAD_PATH by default
@ 2013-09-06  9:29 Arne Babenhauserheide
  2013-09-06 12:10 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Arne Babenhauserheide @ 2013-09-06  9:29 UTC (permalink / raw)
  To: 15286

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#15286: Add the current directory as GUILE_LOAD_PATH by default
  2013-09-06  9:29 bug#15286: Add the current directory as GUILE_LOAD_PATH by default Arne Babenhauserheide
@ 2013-09-06 12:10 ` Ludovic Courtès
  2013-09-13 23:05   ` Arne Babenhauserheide
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2013-09-06 12:10 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 15286-done

Arne Babenhauserheide <arne_bab@web.de> 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’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#15286: Add the current directory as GUILE_LOAD_PATH by default
  2013-09-06 12:10 ` Ludovic Courtès
@ 2013-09-13 23:05   ` Arne Babenhauserheide
  2013-09-14 12:13     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Arne Babenhauserheide @ 2013-09-13 23:05 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 15286-done

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

Am Freitag, 6. September 2013, 14:10:27 schrieb Ludovic Courtès:
> Arne Babenhauserheide <arne_bab@web.de> 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.

I now learned, that with guile I can use 

    guile -L .

which actually does what I need.

Providing this in guix would be consistent with guile and it would make it really easy to select overlays.

Best wishes,
Arne
-- 
1w6 sie zu achten,
sie alle zu finden,
in Spiele zu leiten
und sacht zu verbinden.
→ http://1w6.org


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#15286: Add the current directory as GUILE_LOAD_PATH by default
  2013-09-13 23:05   ` Arne Babenhauserheide
@ 2013-09-14 12:13     ` Ludovic Courtès
  2013-09-15 11:24       ` Arne Babenhauserheide
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2013-09-14 12:13 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 15286-done

Arne Babenhauserheide <arne_bab@web.de> skribis:

> Am Freitag, 6. September 2013, 14:10:27 schrieb Ludovic Courtès:
>> Arne Babenhauserheide <arne_bab@web.de> 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.
>
> I now learned, that with guile I can use 
>
>     guile -L .
>
> which actually does what I need.
>
> Providing this in guix would be consistent with guile and it would make it really easy to select overlays.

If this is a ‘-L’ option, then I’d say no.  After all, Guix is just
another Guile library, and as such it must not fiddle with the search
path.

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#15286: Add the current directory as GUILE_LOAD_PATH by default
  2013-09-14 12:13     ` Ludovic Courtès
@ 2013-09-15 11:24       ` Arne Babenhauserheide
  2013-09-15 17:46         ` Mark H Weaver
  0 siblings, 1 reply; 6+ messages in thread
From: Arne Babenhauserheide @ 2013-09-15 11:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 15286-done

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

Am Samstag, 14. September 2013, 14:13:17 schrieb Ludovic Courtès:
> > I now learned, that with guile I can use 
> >
> >     guile -L .
> >
> > which actually does what I need.
> >
> > Providing this in guix would be consistent with guile and it would make it really easy to select overlays.
> 
> If this is a ‘-L’ option, then I’d say no.  After all, Guix is just
> another Guile library, and as such it must not fiddle with the search
> path.

Isn’t guix a standalone program?

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein, 
ohne es zu merken. 
- Arne (http://draketo.de)



[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#15286: Add the current directory as GUILE_LOAD_PATH by default
  2013-09-15 11:24       ` Arne Babenhauserheide
@ 2013-09-15 17:46         ` Mark H Weaver
  0 siblings, 0 replies; 6+ messages in thread
From: Mark H Weaver @ 2013-09-15 17:46 UTC (permalink / raw)
  To: Arne Babenhauserheide; +Cc: 15286-done

Arne Babenhauserheide <arne_bab@web.de> writes:

> Am Samstag, 14. September 2013, 14:13:17 schrieb Ludovic Courtès:
>> > I now learned, that with guile I can use 
>> >
>> >     guile -L .
>> >
>> > which actually does what I need.
>> >
>> > Providing this in guix would be consistent with guile and it would make it really easy to select overlays.
>> 
>> If this is a ‘-L’ option, then I’d say no.  After all, Guix is just
>> another Guile library, and as such it must not fiddle with the search
>> path.
>
> Isn’t guix a standalone program?

It's both a library and a standalone program.

If you're using one or more overlays, isn't it easier to set
GUILE_LOAD_PATH in your dot files?  I wouldn't want to have to
specify one or more -L arguments every time I use guix.

     Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-15 17:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-06  9:29 bug#15286: Add the current directory as GUILE_LOAD_PATH by default Arne Babenhauserheide
2013-09-06 12:10 ` Ludovic Courtès
2013-09-13 23:05   ` Arne Babenhauserheide
2013-09-14 12:13     ` Ludovic Courtès
2013-09-15 11:24       ` Arne Babenhauserheide
2013-09-15 17:46         ` Mark H Weaver

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).