guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] scripts: Add 'environment' command.


From: Thompson, David
Subject: Re: [PATCH] scripts: Add 'environment' command.
Date: Thu, 9 Oct 2014 12:54:17 -0400

On Thu, Oct 9, 2014 at 12:50 PM, Eric Bavier <address@hidden> wrote:
> David Thompson writes:
>
>> By default, running 'guix environment' spawns a new $SHELL process,
>> because it is usually what one would want to do.  However, the '--exec'
>> flag can be used to specify the command to run.
>
> For this option, together with the --search-paths option, would it be
> possible to customize the syntax of the output from the
> show-search-paths function?  This might be a question for other guix
> commands as well.  Either the current shell or the shell from --exec
> might set variables in a different way.  E.g. the user is using the
> "fish" shell, and doesn't want to spawn a new process, they should be
> able to::
>
>   eval (guix environment --search-paths guile)
>
> Btw, fish uses 'set -x PATH "..."' to export PATH set to "..."
>
> Just a thought.
>

I have thought about this, too.  I think it would be a good future
improvement for all guix commands that output search paths.

>> Finally, the '--load' flag can be used to read a package from a file
>> instead of searching $GUIX_PACKAGE_PATH.
>
> Could we instead have a -L or --load-path option like for `guix build`?
> This would be useful if the user wants to give multiple packages to
> `guix environment` that are all outside $GUIX_PACKAGE_PATH.
>

The -L flag also works to add to the load path.  Lower-case 'l' calls
'load' on the given file and expects a package or list of packages in
return.  For this I envision having  a 'package.scm' or similar file
in my git repos so that I can run 'guix environment -l package.scm' to
create a development environment without altering load paths or having
'package.scm' define a module.

> I'm very excited for this.
>

Thanks for the feedback!

- Dave



reply via email to

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