From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#20255: 'search-paths' should respect both user and system profile. Date: Tue, 05 May 2015 14:35:01 +0200 Message-ID: <87h9rr5hje.fsf@gnu.org> References: <877ftschjt.fsf@gmail.com> <87fv8fip01.fsf@gnu.org> <87d23j1bxk.fsf@gmail.com> <87lhh43tn0.fsf@gnu.org> <87k2wnqvga.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypc4y-0000fj-3m for bug-guix@gnu.org; Tue, 05 May 2015 08:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypc4x-0004I8-1R for bug-guix@gnu.org; Tue, 05 May 2015 08:36:04 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:52693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypc4w-0004I2-PK for bug-guix@gnu.org; Tue, 05 May 2015 08:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Ypc4w-0008NN-Jp for bug-guix@gnu.org; Tue, 05 May 2015 08:36:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87k2wnqvga.fsf@gmail.com> ("=?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?="'s message of "Tue, 05 May 2015 16:28:53 +0800") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 20255@debbugs.gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > How about using a shell variable as input for the location: > (replace /gnu/store/xxx with $GUIX_PROFILE) > > # etc/profile > export PATH=3D$GUIX_PROFILE/bin:$PATH > export MANPATH=3D$GUIX_PROFILE/share/man:$MANPATH > ... > > Then when 'source' it, we pass the location: > (we did know where $GUIX_PROFILE is when do the 'source') > > # ~/.bash_profile > GUIX_PROFILE=3D$HOME/.guix-profile > if [ -f $GUIX_PROFILE/etc/profile ]; then > . $GUIX_PROFILE/etc/profile > fi > > # /etc/profile > GUIX_PROFILE=3D/run/current-system/profile > source $GUIX_PROFILE/etc/profile Yes, but we would also like users to be able to source ~/.guix-profile/etc/profile themselves directly, and it wouldn=E2=80=99t be= nice to ask them to set GUIX_PROFILE before sourcing it. Ludo=E2=80=99.