unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: Adam Faiz <adam.faiz@disroot.org>
Cc: 60106@debbugs.gnu.org
Subject: bug#60106: [Shepherd 0.9.3] ‘system*’ replacement cannot be passed environment variables
Date: Thu, 22 Dec 2022 17:47:37 +0100	[thread overview]
Message-ID: <87k02j1j2u.fsf@inria.fr> (raw)
In-Reply-To: <7bff0337-5bfd-22d9-8cc2-b7912eef0f66@disroot.org> (Adam Faiz's message of "Thu, 22 Dec 2022 16:17:59 +0000")

Adam Faiz <adam.faiz@disroot.org> skribis:

>> I think we’ll have to add a parameter to ‘spawn-command’ to specify
>> environment variables.
>> Ludo’.
> If you do this, can you add an #:append? flag which adds environment
> variables to the inherited environment instead of specifying the
> variables declaratively? It can be #f by default.
>
> It would be very useful for me using the shepherd as init on a foreign
> distro, so I don't have to use the `env` command.

You could always write something like:

  #:environment-variables `("EXTRA_VARIABLE=something" ,@(environ))

to append ‘EXTRA_VARIABLE’ to those of the environment.

So I don’t think we need #:append.

Thanks for your feedback,
Ludo’.




      reply	other threads:[~2022-12-22 16:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 22:47 bug#60106: [Shepherd 0.9.3] ‘system*’ replacement cannot be passed environment variables Ludovic Courtès
2022-12-22 16:17 ` Adam Faiz via Bug reports for GNU Guix
2022-12-22 16:47   ` Ludovic Courtès [this message]

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=87k02j1j2u.fsf@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=60106@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    /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.
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).