From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: [PATCH] scripts: Add 'environment' command. Date: Thu, 9 Oct 2014 12:54:17 -0400 Message-ID: References: <87oatmch5i.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <8738axw5kp.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcGyx-0005bS-P7 for guix-devel@gnu.org; Thu, 09 Oct 2014 12:54:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcGyq-0000lo-9Q for guix-devel@gnu.org; Thu, 09 Oct 2014 12:54:27 -0400 Received: from na6sys009bog021.obsmtp.com ([74.125.150.82]:59374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcGyq-0000ld-0U for guix-devel@gnu.org; Thu, 09 Oct 2014 12:54:20 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa1so94216pad.33 for ; Thu, 09 Oct 2014 09:54:17 -0700 (PDT) In-Reply-To: <8738axw5kp.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Eric Bavier Cc: guix-devel On Thu, Oct 9, 2014 at 12:50 PM, Eric Bavier 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