guix-devel
[Top][All Lists]
Advanced

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

A public Lisp programming interface provide feature like `guix environme


From: Leo Prikler
Subject: A public Lisp programming interface provide feature like `guix environment --container`
Date: Wed, 04 Nov 2020 08:38:19 +0100
User-agent: Evolution 3.34.2

Hello,

Am Mittwoch, den 04.11.2020, 11:49 +0800 schrieb Zhu Zihao
> "guix environment --container" is a very useful feature for me to
> isolate the untrusted software. But sadly it lacks a interface for
> user
> to use it in Lisp programming.
> 
> In (guix scripts environment), only `guix-environment` is exported.
> but
> it process unix style command line option.
(guix scripts …) *is* the command line interface, so it makes sense,
that its interface handles command line arguments.

> I'm wondering it's good to expose some interface suitable for Lisp,
> just
> like the internal function `launch-environment/container`. This can
> encourage me to port more container entry script from shell to Guile.
launch-environment/container still assumes the command to be a shell
script, which I think is not quite what you want.  You probably want to
take a look at call-with-container from (guix build linux-container) or
child-hurds.
I currently don't know of any procedure, that "directly" invokes Scheme
code through Guix environments, so you'd have to build that on your
own.  However, given that your stated goal is to port container entry
scripts [I read this as "the script called by the container at entry"]
to Guile, would it not make sense to have

  (guix-environment [ENVIRONMENT OPTIONS] "--" "guile" "entry.scm")

WDYT?

Regards, Leo




reply via email to

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