help-guix
[Top][All Lists]
Advanced

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

Re: set environment variables with guix shell [-m manifest.scm]


From: Kenny Ballou
Subject: Re: set environment variables with guix shell [-m manifest.scm]
Date: Wed, 04 May 2022 20:29:10 -0600
User-agent: mu4e 1.6.10; emacs 28.1.50


> ```
> (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 via email to

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