guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] gnu: powertop: Patch absolute file names.


From: Mathieu Lirzin
Subject: Re: [PATCH] gnu: powertop: Patch absolute file names.
Date: Thu, 21 Apr 2016 12:14:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Efraim Flashner <address@hidden> writes:

> On Mon, Apr 18, 2016 at 11:01:41PM +0200, Mathieu Lirzin wrote:
>
>> +    (arguments
>> +     '(#:phases
>> +       (modify-phases %standard-phases
>> +         ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
>> +         ;; allow calibrating the network interface in GuixSD.
>> +         (add-after 'unpack 'patch-absolute-file-names
>> +           (lambda* (#:key inputs #:allow-other-keys)
>> +             (let ((kmod (assoc-ref inputs "kmod")))
>> +               (substitute* (find-files "src" ".*\\.cpp" )
>> +                 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
>> +                 ;; These programs are only needed to calibrate, so using
>> +                 ;; relative file names avoids adding extra inputs.  When 
>> they
>> +                 ;; are missing powertop gracefully handle it.
>> +                 (("/usr/bin/xset") "xset")
>> +                 (("/usr/sbin/hciconfig") "hciconfig") ;XXX:not packaged yet
>> +                 (("/usr/bin/hcitool") "hcitool"))     ;XXX:not packaged yet
>
> hci* programs are part of the bluez package. According to apt-file,
> debian has xset as part of x11-xserver-utils.

Thank you for taking to search this.  :) I don't intend to package
"bluez" since I have no use of Bluetooth, and xset is already packaged
in Guix.  Those programs are called when doing ‘powertop --calibrate’
like this:

  if(!system("DISPLAY=:0 /usr/bin/xset dpms force off"))
    printf("System is not available\n");
                
So IMO adding them as explicit inputs will not make sense since those
‘system’ calls are meant as feature tests.  WDYT?

-- 
Mathieu Lirzin



reply via email to

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