mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: powertop: Use G-expressions, fix build.
* gnu/packages/linux.scm (powertop)[arguments]: Use gexps. <#:phases>{patch-absolute-file-names}: Substitute autoconf files. Fixes: guix/guix#1333 Change-Id: I9612732d97509a9fa2f1425d2b35bff58b0d3895 Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
parent
5fdb1d1cd8
commit
e13678abf1
1 changed files with 28 additions and 18 deletions
|
@ -4266,23 +4266,33 @@ devices. It replaces @code{iwconfig}, which is deprecated.")
|
||||||
(base32 "10vbk4vplmzp3p1mhwnhj81g6i5xvam9pdvmiy6cmd0xvnmdyy77"))))
|
(base32 "10vbk4vplmzp3p1mhwnhj81g6i5xvam9pdvmiy6cmd0xvnmdyy77"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:configure-flags
|
(list
|
||||||
(list "LDFLAGS=-pthread")
|
#:configure-flags #~(list "LDFLAGS=-pthread")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
|
;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.cpp to
|
||||||
;; allow calibrating the network interface in Guix System.
|
;; allow calibrating the network interface in Guix System.
|
||||||
(add-after 'unpack 'patch-absolute-file-names
|
(add-after 'unpack 'patch-absolute-file-names
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((kmod (assoc-ref inputs "kmod")))
|
(let ((kmod (assoc-ref inputs "kmod")))
|
||||||
(substitute* (find-files "src" "\\.cpp$")
|
;; Fix for using a more modern gettext.
|
||||||
|
(substitute* "autogen.sh"
|
||||||
|
(("autoreconf")
|
||||||
|
"autoreconf --force"))
|
||||||
|
(substitute* "configure.ac"
|
||||||
|
(("^AM_GNU_GETTEXT_VERSION.*$")
|
||||||
|
(string-append "AM_GNU_GETTEXT_VERSION(["
|
||||||
|
#$(package-version (this-package-native-input "gettext-minimal"))
|
||||||
|
"])\n")))
|
||||||
;; Give the right 'modprobe' file name so that essential
|
;; Give the right 'modprobe' file name so that essential
|
||||||
;; modules such as msr.ko can be loaded.
|
;; modules such as msr.ko can be loaded.
|
||||||
|
(substitute* (find-files "src" "\\.cpp$")
|
||||||
(("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
|
(("/sbin/modprobe") (string-append kmod "/bin/modprobe"))
|
||||||
;; These programs are only needed to calibrate, so using
|
;; These programs are only needed to calibrate, so using
|
||||||
;; relative file names avoids adding extra inputs. When they
|
;; relative file names avoids adding extra inputs. When they
|
||||||
;; are missing powertop gracefully handles it.
|
;; are missing powertop gracefully handles it.
|
||||||
(("/usr/s?bin/(hciconfig|hcitool|xset)" _ command)
|
(("/usr/s?bin/(hciconfig|hcitool|xset)" _ command)
|
||||||
|
command
|
||||||
command))))))))
|
command))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list autoconf
|
(list autoconf
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue