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: sirgazil
Subject: Re: Appropriate way to use Guix API from a Guile program
Date: Fri, 22 May 2020 09:28:16 -0500
User-agent: Zoho Mail

 ---- On Fri, 22 May 2020 02:43:21 -0500 Konrad Hinsen <address@hidden> wrote 
----
 > 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.

And if you wanted to run the script without typing "guix repl", what would be 
the first line of the script. This?

#!~/.config/guix/current/bin/guix repl
!#





reply via email to

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