[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: powertop: Patch absolute file names.
From: |
Efraim Flashner |
Subject: |
Re: [PATCH] gnu: powertop: Patch absolute file names. |
Date: |
Thu, 21 Apr 2016 03:34:00 +0300 |
User-agent: |
Mutt/1.6.0 (2016-04-01) |
On Mon, Apr 18, 2016 at 11:01:41PM +0200, Mathieu Lirzin wrote:
> * gnu/packages/linux.scm (powertop)[inputs]: Add kmod.
> [arguments]: Patch absolute file names. Before that launching powertop
> was failing because 'modprobe' was not found.
> ---
> gnu/packages/linux.scm | 25 ++++++++++++++++++++++---
> 1 file changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index d554ecc..88afa8e 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -10,6 +10,7 @@
> ;;; Copyright © 2016 Tobias Geerinckx-Rice <address@hidden>
> ;;; Copyright © 2016 Alex Kost <address@hidden>
> ;;; Copyright © 2016 Raymond Nicholson <address@hidden>
> +;;; Copyright © 2016 Mathieu Lirzin <address@hidden>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -1202,11 +1203,29 @@ devices. It replaces 'iwconfig', which is
> deprecated.")
> (base32
> "0nlwazxbnn0k6q5f5b09wdhw0f194lpzkp3l7vxansqhfczmcyx8"))))
> (build-system gnu-build-system)
> + (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.
> + #t))))))
> (inputs
> - `(("zlib" ,zlib)
> - ("pciutils" ,pciutils)
> + `(("kmod" ,kmod)
> ("ncurses" ,ncurses)
> - ("libnl" ,libnl)))
> + ("pciutils" ,pciutils)
> + ("libnl" ,libnl)
> + ("zlib" ,zlib)))
> (native-inputs
> `(("pkg-config" ,pkg-config)))
> (home-page "https://01.org/powertop/")
>
--
Efraim Flashner <address@hidden> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
signature.asc
Description: PGP signature