From mboxrd@z Thu Jan 1 00:00:00 1970 From: sirgazil Subject: Re: Adding a subcommand "load-profile" Date: Tue, 28 Apr 2020 17:34:40 +0000 Message-ID: <171c1dae752.b806970b21211.4448157853317564236@zoho.com> References: <490f77b9f9b0829f985ba717f6fbe008f54a816d.camel@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43236) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTU97-0005bx-Kt for guix-devel@gnu.org; Tue, 28 Apr 2020 13:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTU8t-0003kw-Ap for guix-devel@gnu.org; Tue, 28 Apr 2020 13:35:49 -0400 In-Reply-To: <490f77b9f9b0829f985ba717f6fbe008f54a816d.camel@gnu.org> 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-mx.org@gnu.org Sender: "Guix-devel" To: Roel Janssen Cc: guix-devel ---- On Tue, 28 Apr 2020 22:42:53 +0000 Roel Janssen wrote ---- > Dear Guix, > > Years ago we implemented GNU Guix on the high-performance computing cluster in > Utrecht. One of the things we added was a wrapper around the "guix" command > (called "guixr") to enable communication between the guix-daemon (on one node), > and the client-side "guix" command. (We actually copied the great "guixr" > script from Ricardo at the time.) > > Lots of improvements have been made for the HPC use-case that the need for the > "guixr" wrapper script is no longer needed. Except for one thing. > > We added a subcommand in the "guixr" script called "load-profile". It allows a > user to do the following: > -------------------------------------------------------------------------------- > $ guixr package -i ... -p /my/profile > $ guixr load-profile /my/profile > [env]$ > # ... A new shell is spawned here. > # Inside this shell only the environment variables in > # /my/profile/etc/profile are set ... > [env]$ exit > # Return to the normal shell state > -------------------------------------------------------------------------------- > > The code of "guixr" is available at [1]. > > I sometimes wish I had this command available in "guix" itself. So I'd like to > implement the "load-profile" subcommand in Scheme, so that it can be part of > Guix. > > Would there be any interest from others to have this as well? And also, the > shell implementation heavy relies on Bash. What other shells should I attempt > to implement? Personally, I think managing Guix profiles is currently difficult, and I would like to have commands like this one to make it easier. Actually, I've been exploring using profiles to create development environments for my own projects (using information in the Cookbook), but it turned out to be too much manual work, so I've been prototyping a Guile-based CLI for my personal needs (https://gitlab.com/sirgazil/guix-entorno). I would like these kinds of things to be possible with Guix commands instead, though.