From: Maxime Devos <maximedevos@telenet.be>
To: "Théo Maxime Tyburn" <theo.tyburn@gmail.com>, guix-devel@gnu.org
Subject: Re: Setting environment variables in a profile
Date: Thu, 19 May 2022 22:34:46 +0200 [thread overview]
Message-ID: <c9bc099ddaa1e00b038b621d7561921662f06e9d.camel@telenet.be> (raw)
In-Reply-To: <877d6h47bw.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]
Théo Maxime Tyburn schreef op do 19-05-2022 om 21:43 [+0200]:
> (files '("/home/teddd/..."
> "/home/teddd/..."
> "/home/teddd/...")))
This will do PYTHONPATH=$GUIX_ENVIRONMENT/home/tedd/...:$GUIX_ENVIRONMENT/home/tedd/...
where $GUIX_ENVIRONMENT is something like '/gnu/store/sgx9l505s7gw1axqnyqvz7iabgsni243-profile',
which I don't think is what you want here. Additionally, most likely /home/tedd does
not exist in the profile, so they will be ignored and PYTHONPATH won't be set.
> Another problem I would have with this method is that the last environment
> variable I want to set (BLENDER_OPTIONS) is not even a path. I am not
> sure it is possible to sepcify a file-type to be "just a string".
> Anyway I think this seems to be the wrong approach.
>
> How would you approach this?
I don't think this is currently supported, but I suppose it would be
possible to extend guix/profiles.scm and <manifest> to support this.
Maybe an API like:
contents of manifest.scm:
(manifest
(packages->manifest (list python3 blender ...))
(environment-variables ; <-- new field
(list (extend-search-path ; <--- new procedure
(search-path [...] "PYTHONPATH" [...])
"/home/tedd/...")
(with-environment-variable "BLENDER_USER_CONFIG" "...") ; <-- new procedure
[...])))
WDYT of this API?
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2022-05-19 20:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-19 19:43 Setting environment variables in a profile Théo Maxime Tyburn
2022-05-19 20:34 ` Maxime Devos [this message]
2022-05-19 21:41 ` Théo Maxime Tyburn
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=c9bc099ddaa1e00b038b621d7561921662f06e9d.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=guix-devel@gnu.org \
--cc=theo.tyburn@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.
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).