From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: Adding a subcommand "load-profile" Date: Tue, 28 Apr 2020 18:54:14 +0200 Message-ID: References: <490f77b9f9b0829f985ba717f6fbe008f54a816d.camel@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37988) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTTbV-0000CG-33 for guix-devel@gnu.org; Tue, 28 Apr 2020 13:01:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTTZw-0000lU-VD for guix-devel@gnu.org; Tue, 28 Apr 2020 13:01:04 -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 Dear Roel, On Tue, 28 Apr 2020 at 17:43, Roel Janssen wrote: > -------------------------------------------------------------------------------- > $ 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 > -------------------------------------------------------------------------------- [...] > 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? It would be cool! However, if I remember correctly the previous discussion on such topic, the issue was to respect the user's shell ($SHELL). This argument is mitigated by the fact that "guix environment" already uses Bash to spawn the new shell, if I understand correctly. Well, I find annoying to not able to "go in" and "go out" in one profile and I prefer having a Bash specific implementation than nothing. So, thank you for the initiative. :-) > If there is interest in having this as a "load-profile" subcommand, I will post > an initial implementation to the mailing list ASAP. Instead of another subcommand, I would suggest to add an option to "guix environment". Then an another further step should maybe combine "--load-profile" and "--ad-hoc" in order to create a temporary "augmented" profile. All the best, simon