From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nils Gillmann Subject: Re: Environment variables in Guix and GuixSD Date: Fri, 9 Nov 2018 13:49:43 +0000 Message-ID: <20181109134943.rmx24nlmxo4wxiu6@abyayala> References: <7d565897-cc97-6dc1-7663-8f140e1b77fd@riseup.net> <877ehq5tmq.fsf@gnu.org> <87a7mksgcl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL79Z-0002zP-6l for guix-devel@gnu.org; Fri, 09 Nov 2018 08:48:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gL79U-0000yR-3o for guix-devel@gnu.org; Fri, 09 Nov 2018 08:48:53 -0500 Content-Disposition: inline In-Reply-To: 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" To: =?utf-8?B?R8OhYm9y?= Boskovits Cc: Guix-devel Gábor Boskovits transcribed 3.2K bytes: > Hello Ludo, > > 2018. nov. 7., Sze 22:55 dátummal Ludovic Courtès ezt írta: > > > Hi, > > > > Gábor Boskovits skribis: > > > > > I have seen in the /etc/profile file that it suggest you to do something > > like > > > > > > source $GUIX_PROFILE/etc/profile. > > > > Right, you see this advice in $GUIX_PROFILE/etc/profile itself. > > > > > This causes problems on systems where the startup file is executed by > > > a posix /bin/sh, as this is bash specific. > > > > $GUIX_PROFILE/etc/profile is not honored by any shell. One has to > > specifically put the ‘source’ line above in whichever file is > > appropriate (~/.bash_profile, ~/.profile, /etc/profile, etc.) > > > > I did not express myself cleanly. What my problem was that 'source' is bash > specific, while we can use '.' in posix shells. But you are just scratching on the surface. As I noted long time ago, the file itself is bash specific. To have bash in there makes sense as the project was and is Bash focused. For other shells you end up either maintaining your own codebase or constructing bash->YOUR_SHELL translators. If anything it makes sense to throw (part of) this into /etc/bash/, which at least on Gentoo is the way to define systemwide data for Bash. > > > On GuixSD this happens automatically but on a foreign distro users have > > to add the ‘source’ line somewhere. > > > > Does that make sense? > > > > Thanks, > > Ludo’. > > > g_bor > > >