unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel <guix-devel@gnu.org>, 27097@debbugs.gnu.org
Subject: Re: Combining Guix, direnv and Emacs for environment customisation
Date: Tue, 29 Aug 2017 15:02:44 -0400	[thread overview]
Message-ID: <CAJ=RwfZeS1BfaWd=YnRbdKf3iDw90sCfZ6jLx=AZ7r0NCGaAYw@mail.gmail.com> (raw)
In-Reply-To: <20170527123113.1ca668e7@cbaines.net>

Hello Christopher,

Reviving this old thread, if you don't mind. :)

On Sat, May 27, 2017 at 7:31 AM, Christopher Baines <mail@cbaines.net> wrote:
>
> In summary, using direnv provides a convinient way to manage different
> environments created from Guix. There is now support for using direnv
> directly from Emacs.

This is great.  I need to try it out sometime.

> One issue with this is that running guix environment from direnv will
> slow down switching buffers. To make it a bit more useable, I found
> some bash code that caches the results of running commands, and wrapped
> that around guix environment when invoked from direnv. This helps speed
> things up, but I don't think its useful in the long term.
>
> For this particular use case, it would help if guix environment was
> faster, perhaps by doing caching internally? On my system, running guix
> environment --ad-hoc guile --search-paths repeatedly takes ~2 seconds,
> I haven't looked at what the breakdown of this is yet.
>
> I'd be interested in hearing if anyone does something similar for using
> Guix, or if anyone does something different, but to the same effect?

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?

(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)

- Dave

  parent reply	other threads:[~2017-08-29 19:02 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170527105641.9426-1-mail@cbaines.net>
2017-05-27 11:31 ` Combining Guix, direnv and Emacs for environment customisation Christopher Baines
2017-05-30 15:03   ` Ludovic Courtès
2017-06-01 13:17     ` Roel Janssen
2017-06-03 13:59       ` Ludovic Courtès
2017-06-03 21:08         ` Roel Janssen
2017-06-04 21:15           ` Ludovic Courtès
2017-06-05 22:37             ` Roel Janssen
2017-06-07 10:35               ` Performance on NFS Ludovic Courtès
2017-06-07 13:06                 ` Roel Janssen
2017-06-09 13:46                   ` Ludovic Courtès
2017-06-12  8:45                     ` Roel Janssen
2017-06-12 15:58                       ` Ludovic Courtès
2017-06-16 15:23                         ` Ludovic Courtès
2017-06-17  7:36                           ` Roel Janssen
2017-06-17 22:40                             ` Ludovic Courtès
2017-06-17 23:15                               ` Roel Janssen
2017-06-18  8:43                               ` Ricardo Wurmus
2017-06-19  8:01                                 ` RPC performance Ludovic Courtès
2017-06-19  8:15                                   ` Ludovic Courtès
2017-06-19 14:25                                     ` Ricardo Wurmus
2017-06-22 14:03                                     ` Andy Wingo
2017-06-22 16:05                                       ` Ludovic Courtès
2017-06-23  9:09                                         ` Andy Wingo
2017-06-23  9:24                                           ` Ludovic Courtès
2017-06-23  9:46                                             ` Andy Wingo
2017-06-26 11:54                                               ` Ludovic Courtès
2017-06-26 14:19                                                 ` Andy Wingo
2017-06-19 21:25                                   ` Ludovic Courtès
2017-06-22  8:04                                     ` Ricardo Wurmus
2017-06-07 11:01               ` Combining Guix, direnv and Emacs for environment customisation Ricardo Wurmus
2017-06-07 12:25                 ` Performance on NFS Ludovic Courtès
2017-06-07 12:59                   ` Ricardo Wurmus
2017-08-29 19:02   ` Thompson, David [this message]
2017-08-29 22:30     ` Combining Guix, direnv and Emacs for environment customisation Maxim Cournoyer
2017-08-30  5:52     ` Carlo Zancanaro
2017-08-30 10:09       ` Ludovic Courtès
2017-08-30 10:16     ` Ludovic Courtès

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='CAJ=RwfZeS1BfaWd=YnRbdKf3iDw90sCfZ6jLx=AZ7r0NCGaAYw@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=27097@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mail@cbaines.net \
    /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).