help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appropriate way to use Guix API from a Guile program


From: Konrad Hinsen
Subject: Re: Appropriate way to use Guix API from a Guile program
Date: Fri, 22 May 2020 09:43:21 +0200

zimoun <address@hidden> writes:

> If you feel in an experimental mood, you can try the Konrad's patch
> [1].  It sets up the PATH accordingly and hides all the internals.

In particular it hides implementation details that are likely to
change. A look at the path in

  ~/.config/guix/current/share/guile/site/3.0

should be sufficient to suggest that not very long ago, this was

  ~/.config/guix/current/share/guile/site/2.2

and scripts have no way to figure out which one of the two is
appropriate on a given system.

> Well, if it is a script without command-line argument, then "guix repl
> foo.scm" is the thing that you would want, I guess.
> If it is a script with command-line argument, then extend
> "GUILE_LOAD_PATH" by '~/.config/guix/current/share/guile/site/3.0' and
> run "guile foo.scm arg1 arg2" is the thing that you would want, I
> guess.

Thanks for the reminder that my "guix repl" patch needs more work - it
should accept command line arguments for the script. Something like

   guix repl foo.scm –- [ARGS]

should be easily doable, and fits in with existing conventions.

Cheers,
  Konrad



reply via email to

[Prev in Thread] Current Thread [Next in Thread]