guix-devel
[Top][All Lists]
Advanced

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

Re: Combining Guix, direnv and Emacs for environment customisation


From: Ludovic Courtès
Subject: Re: Combining Guix, direnv and Emacs for environment customisation
Date: Wed, 30 Aug 2017 12:16:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi!

"Thompson, David" <address@hidden> skribis:

> There is a feature missing in 'guix environment': saving the resulting
> profile for easy access later.  I often want to build an environment
> once and not update it for awhile, but with the current state of 'guix
> environment' it's not possible. This leads me to pulling my hair out
> when I do an upgrade of Guix and have to rebuild all of my development
> environments. What was supposed to be a quick hack turns into a Guix
> maintenance session.
>
> Let's imagine that the first time `guix environment` is invoked it
> creates a symlink in $PWD to the generated profile named
> .guix-environment.  Future invocations of 'guix environment' would
> short-circuit all the daemon communication, package module loading,
> etc. and just apply the environment variables in the already built
> profile.  Once we have that built, emacs-direnv integration is as
> simple as sourcing .guix-environment/etc/profile, or running 'guix
> environment' if the profile is not yet built.
>
> WDYT?

Like Carlo wrote, --root probably gets us halfway there already.  Maybe
a new “--save” could be added and be equivalent to
“--root=$PWD/.guix-environment”.  And then, indeed, “guix environment”
without any argument could simply source .guix-environment/etc/profile
and start from there.

How does that sound?

FWIW I’m interested in making ‘guix environment’ a drop-in replacement
for the “modules” command found on HPC clusters¹, which means startup
times below one second.  A simple cache like what you write above could
get us very close to that.

¹ http://modules.sourceforge.net/

> (If time permits, I'd like to start contributing to Guix again by
> overhauling 'guix environment' to be more convenient for day-to-day
> development)

Your inspiration and hack power would be welcome!  :-)

Ludo’.



reply via email to

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