From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Package request inxi Date: Thu, 12 Apr 2018 12:54:03 +0530 Message-ID: <873700hoq4.fsf@gmail.com> References: <87h8p0wb6m.fsf@gmail.com> <87woxwkypg.fsf@gmail.com> <874ll09kn6.fsf@gmail.com> <87po353efj.fsf@gmail.com> <87bmepd5dc.fsf@gmail.com> <87o9ip3b3y.fsf@gmail.com> <87muy93aw5.fsf@gmail.com> <87y3htbofq.fsf@gmail.com> <874lkghp4a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6WaZ-0008Dx-7J for help-guix@gnu.org; Thu, 12 Apr 2018 03:24:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6WaW-0001UK-3N for help-guix@gnu.org; Thu, 12 Apr 2018 03:24:11 -0400 Received: from mail-it0-x230.google.com ([2607:f8b0:4001:c0b::230]:52478) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6WaV-0001U6-UR for help-guix@gnu.org; Thu, 12 Apr 2018 03:24:08 -0400 Received: by mail-it0-x230.google.com with SMTP id f6-v6so6090377ita.2 for ; Thu, 12 Apr 2018 00:24:07 -0700 (PDT) In-reply-to: <874lkghp4a.fsf@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Oleg Pykhalov Cc: help-guix --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Going on with the package, I think we only need this patch beside the shabang adjustment: ## System my ($bsd_type,$language,$os) =3D ('','',''); my ($cpu_sleep,$dl_timeout,$limit,$ps_count,$usb_level) =3D (0.35,4,10,5,= 0); -my @paths =3D qw(/sbin /bin /usr/sbin /usr/bin /usr/X11R6/bin /usr/local/= sbin /usr/local/bin); -$ENV{'PATH'} =3D 'sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/= sbin:/usr/local/bin'; +my @paths =3D qw(/sbin /bin /run/setuid-programs /run/current-system/prof= ile/bin /run/current-system/profile/sbin); +push (@paths, "$ENV{'HOME'}/.guix-profile/bin"); +push (@paths, "$ENV{'HOME'}/.guix-profile/sbin"); +$ENV{'PATH'} =3D '/sbin:/bin:/run/setuid-programs:/run/current-system/pro= file/bin:/run/current-system/profile/sbin'; +$ENV{'PATH'} =3D '$ENV:$ENV{'HOME'}/.guix-profile/bin"; +$ENV{'PATH'} =3D '$ENV:$ENV{'HOME'}/.guix-profile/sbin"; my $sensors_cpu_nu =3D 0; Basically inxi sets a 'paths' variable with the usual Unix paths and then forces the environment PATH to the same value. My suggestion instead: set 'paths' to /run/current-system/* and ~/.guix-profile/{sbin,bin}. What do you think? Is this generic enough? Is ~/.guix-profile a guaranteed location for the user profile? Last but not least, what's the better approach between =2D a patch, =2D a substitute, =2D a snippet? I only know very little about Perl so the above code might look very clumsy. =2D-=20 Pierre Neidhardt There is very little future in being right when your boss is wrong. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrPCZMACgkQm9z0l6S7 zH8nbggAh8aaT4WTjDJH0d4NmwiyMtrqnz33G82dedYnwyWwSXOsNqlQyhsB5I6L 8zQUaz15jt/5yYtuyhOECQuubw2daPN9dFVBUrQpLNUsvzFSwVRIkVUYCPoMrdXL 2/vSz5uWK07t2KW+ZW+Dx0RYYoEWwIQKOl7DQsVYopyip76Q8Fuk7nVbXklnkyED QNbVs0voqE6EjFSrxEyuAk3SlnrEbDEtUu4SR/oMcw6ErId3sPaOkRc6PLIJbsPb Wo+jD1f0yTC856/6vdvzRlQ96aBqm9VlWpw74Aw5She3AHhay7b6w2JGNrxADa3f 0anZiwwrdTgzMFQuzGPrVZ4AyuRvvg== =GqWk -----END PGP SIGNATURE----- --=-=-=--