all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Jordan <matthewjordandevops@yandex.com>
To: "Thompson, David" <dthompson2@worcester.edu>
Cc: Help Guix <help-guix@gnu.org>
Subject: Re: Question about package environment variables
Date: Wed, 18 May 2016 16:23:31 -0400	[thread overview]
Message-ID: <87oa83xgho.fsf@mailerver.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <CAJ=RwfbWXe=TMFXqwr3HizDJiUgCEsFyWE4M-NcCfNavfXmiow@mail.gmail.com>


Hi David Thompson,

Thanks for your response, guess I'll have to use envstore or or create
file I can source into my current shell session.

I was just curious if there was a way to accomplish that from guix.
And thanks for the example link.

Thanks,

-- 
Matthew Jordan
Sent with my mu4e

Thompson, David writes:

> On Wed, May 18, 2016 at 2:24 PM, Matthew Jordan
> <matthewjordandevops@yandex.com> wrote:
>> Good Day everyone,
>>
>> I would like to know is it possible to set any environment variable to
>> any value from guix package.  The usecase I am thinking of is for a
>> project. Let's say you had a guix package file to automate and document
>> project dependencies.
>>
>> Let's say I wanted to declare a variable in project package file so that
>> "eval `guix environment --search-paths ...`" would set up the
>> environment with the needed variables plus the ones I wanted.
>>
>> Example environment variable;
>>
>> export MSG='Hello world!'
>
> See the 'native-search-paths' field of package objects.  From
> environment variables that aren't search paths, like the above $MSG,
> those have nothing to do with packages so they wouldn't need to use
> anything from Guix at all.
>
> Also, why the use of 'eval' here?  Just 'guix environment my-package'
> would spawn a shell (or any program you wanted) with access to the
> package's dependencies.
>
> I use this all the time in my personal projects, where I keep a
> 'guix.scm' file in the root of the source tree that I can make
> environment's from like so:
>
>     guix environment -l guix.scm
>
> Additionally, I can also build and/or install development snapshots:
>
>     guix build -f guix.scm
>     guix package -f guix.scm
>
> Here's a full example:
>
> https://git.dthompson.us/haunt.git/blob/HEAD:/guix.scm
>
> Hope this helps!
>
> - Dave

  reply	other threads:[~2016-05-18 20:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 18:24 Question about package environment variables Matthew Jordan
2016-05-18 18:33 ` Thompson, David
2016-05-18 20:23   ` Matthew Jordan [this message]
2016-05-18 20:30     ` Thompson, David
2016-05-18 20:44       ` Matthew Jordan

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oa83xgho.fsf@mailerver.i-did-not-set--mail-host-address--so-tickle-me \
    --to=matthewjordandevops@yandex.com \
    --cc=dthompson2@worcester.edu \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.