help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Package request inxi


From: Pierre Neidhardt
Subject: Re: Package request inxi
Date: Thu, 12 Apr 2018 12:54:03 +0530
User-agent: mu4e 1.0; emacs 26.1

Going on with the package, I think we only need this patch beside the
shabang adjustment:

         ## System
         my ($bsd_type,$language,$os) = ('','','');
         my ($cpu_sleep,$dl_timeout,$limit,$ps_count,$usb_level) = 
(0.35,4,10,5,0);
        -my @paths = qw(/sbin /bin /usr/sbin /usr/bin /usr/X11R6/bin 
/usr/local/sbin /usr/local/bin);
        -$ENV{'PATH'} = 
'sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin';
        +my @paths = qw(/sbin /bin /run/setuid-programs 
/run/current-system/profile/bin /run/current-system/profile/sbin);
        +push (@paths, "$ENV{'HOME'}/.guix-profile/bin");
        +push (@paths, "$ENV{'HOME'}/.guix-profile/sbin");
        +$ENV{'PATH'} = 
'/sbin:/bin:/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin';
        +$ENV{'PATH'} = '$ENV:$ENV{'HOME'}/.guix-profile/bin";
        +$ENV{'PATH'} = '$ENV:$ENV{'HOME'}/.guix-profile/sbin";
         my $sensors_cpu_nu = 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
- a patch,
- a substitute,
- a snippet?

I only know very little about Perl so the above code might look very clumsy.

-- 
Pierre Neidhardt

There is very little future in being right when your boss is wrong.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]