[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The future of 'guix environment'
From: |
Thompson, David |
Subject: |
Re: The future of 'guix environment' |
Date: |
Thu, 31 Aug 2017 09:28:28 -0400 |
On Thu, Aug 31, 2017 at 3:18 AM, Jan Nieuwenhuizen <address@hidden> wrote:
> Thompson, David writes:
>
>> Hi all, been awhile!
>
> Hi David!
>
> Great suggestions all! I use guix environment heavily and like it a
> lot.
Thanks!
>> 4) Make 'guix environment' with no other args operate like 'guix
>> environment --cache --load=guix.scm'. 'guix.scm' is a placeholder
>> name for whatever we decide the conventional name for an environment
>> config should be.
>
> Wouldn't that be
>
> guix environment --cache --dependencies --load=guix.scm
No, because guix.scm would no longer evaluate to a package object, but
an environment object. Flags like --dependencies are for environments
defined on the fly at the command line. I haven't yet decided if
--load should be mutually exclusive from all those other things, but I
think that should probably be the case. Perhaps introducing
subcommands is the best thing UX-wise. 'guix environment load
guix.scm', 'guix environment shell direnv --dependencies ruby', and
'guix environment' would be a shorthand for 'guix environment load'.
This will take some fiddling to see. I'm going to get the core
features implemented first, then work on the UX.
> I have been using an ugly hack to switch profiles (or environments; look
> at $GUIX_ENVIRONMENT) in Emacs, see attached. As discussed briefly on
> irc yesterday are various ways this could go: use emacs-direnv, read the
> manifest file in elisp, use guix repl to read it..etc
I took a look at emacs-direnv and did not like it because it's not
fully implemented in elisp. You also need the direnv tool itself,
which is written in Go. No thanks! I think the integration should
happen with emacs-guix, which could use the Guile REPL to read the
profile manifest, and send an sexp back to Emacs with key/value pairs
for the values of all environment variables. From there it's easy to
use setenv and tweak exec-path in the case of $PATH. Alex Kost would
know a lot better than I about how to get this done.
- Dave
- The future of 'guix environment', Thompson, David, 2017/08/30
- Re: The future of 'guix environment', Andreas Enge, 2017/08/30
- Re: The future of 'guix environment', Jan Nieuwenhuizen, 2017/08/31
- Re: The future of 'guix environment',
Thompson, David <=
- Re: The future of 'guix environment', Ludovic Courtès, 2017/08/31
- Re: The future of 'guix environment', Christopher Allan Webber, 2017/08/31