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: Wed, 06 May 2015 18:35:47 +0200 Message-ID: <87fv79u0ik.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]:34380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq2In-0003T3-7P for bug-guix@gnu.org; Wed, 06 May 2015 12:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq2Im-0002um-9A for bug-guix@gnu.org; Wed, 06 May 2015 12:36:05 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:54721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq2Im-0002ua-5X for bug-guix@gnu.org; Wed, 06 May 2015 12:36:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yq2Ik-0005Vc-Vl for bug-guix@gnu.org; Wed, 06 May 2015 12:36:03 -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 I ended up doing that in d664f1b. Please check d664f1b and d995942 and report and issues/bugs. Part of the initial problem you reported had to do with combining profiles (perl in one profile, perl-xml-parser in another.) This part is not addressed yet, and it turns out to be more common than I initially thought: consider for instance MANPATH (with man-db installed in the system profile and man pages in the user=E2=80=99s profile.) Unfortunately the etc/profile files are not going to allow us to solve that. =E2=80=98guix package --search-paths=E2=80=99 could do the actual co= mbination, though. Thanks, Ludo=E2=80=99.