unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Kenny Ballou <kb@devnulllabs.io>
To: help-guix@gnu.org
Subject: Re: set environment variables with guix shell [-m manifest.scm]
Date: Wed, 04 May 2022 20:29:10 -0600	[thread overview]
Message-ID: <87levgk8sb.fsf@devnulllabs.io> (raw)
In-Reply-To: <87tua4kcoh.fsf@devnulllabs.io>



> ```
> (let ((z3-dir (run-with-store (open-connection)
>                 (package-file z3-with-java))))
>   (setenv "LD_LIBRARY_PATH" (string-append z3-dir "/lib"))
>   (setenv "Z3_DIR" z3-dir))
> ...
> ```

Because I cannot sit well enough alone.  I have learned some more
things: it appears these `setenv` calls work if manually invoking `guix
shell`.  However, they do not work when using direnv to invoke `guix
shell`.  This may come down to _how_ direnv invokes `guix shell`.
Worse, if corrected, direnv may not be able to guarantee the `setenv`
variables are hermetic to the project since it seems to be completely
unaware of them (i.e., leaving the directory may not unset the
added environment variables).

Perhaps, this helps stir some insight?

-Kenny


  reply	other threads:[~2022-05-05  4:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  0:53 set environment variables with guix shell [-m manifest.scm] Kenny Ballou
2022-05-05  2:29 ` Kenny Ballou [this message]
2022-05-05  9:05 ` zimoun
2022-05-06 22:20   ` Kenny Ballou

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=87levgk8sb.fsf@devnulllabs.io \
    --to=kb@devnulllabs.io \
    --cc=help-guix@gnu.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.
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).