unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: sirgazil <sirgazil@zoho.com>
To: "Konrad Hinsen" <konrad.hinsen@fastmail.net>
Cc: "zimoun" <zimon.toutoune@gmail.com>,
	"Marius Bakke" <mbakke@fastmail.com>,
	"Guix Help" <help-guix@gnu.org>
Subject: Re: Appropriate way to use Guix API from a Guile program
Date: Fri, 22 May 2020 09:28:16 -0500	[thread overview]
Message-ID: <1723cc8decb.faa996e533509.5321030884090407291@zoho.com> (raw)
In-Reply-To: <m1d06wza7a.fsf@khs-macbook.home>

 ---- On Fri, 22 May 2020 02:43:21 -0500 Konrad Hinsen <konrad.hinsen@fastmail.net> wrote ----
 > zimoun <zimon.toutoune@gmail.com> 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
!#




  parent reply	other threads:[~2020-05-22 14:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 21:38 Appropriate way to use Guix API from a Guile program sirgazil
2020-05-21 12:31 ` Efraim Flashner
2020-05-21 12:44 ` Marius Bakke
2020-05-21 13:25   ` sirgazil
2020-05-21 20:43   ` sirgazil
2020-05-21 20:52     ` Marius Bakke
2020-05-21 22:28       ` sirgazil
2020-05-21 23:02       ` zimoun
2020-05-22  7:43         ` Konrad Hinsen
2020-05-22  8:14           ` zimoun
2020-05-26  8:25             ` Konrad Hinsen
2020-05-26 16:00               ` Konrad Hinsen
2020-05-22  8:56           ` Alex Sassmannshausen
2020-05-22 14:28           ` sirgazil [this message]
2020-05-22 13:52         ` sirgazil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1723cc8decb.faa996e533509.5321030884090407291@zoho.com \
    --to=sirgazil@zoho.com \
    --cc=help-guix@gnu.org \
    --cc=konrad.hinsen@fastmail.net \
    --cc=mbakke@fastmail.com \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).