gnu: tlp: Update to 1.3.0.
* gnu/packages/linux.scm (tlp): Update to 1.3.0. [source]: Hard-code name in origin URI. [native-inputs]: Add "shellcheck". [arguments]: Activate some tests. Update environment variables. Ignore tlp-rdw man pages. * gnu/services/pm.scm (tlp-activation): Update configuration file name.master
parent
344619bbf6
commit
8a890f3c40
|
@ -11,7 +11,7 @@
|
||||||
;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
|
;;; Copyright © 2016, 2017 Alex Kost <alezost@gmail.com>
|
||||||
;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
|
;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
|
||||||
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
|
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
|
||||||
;;; Copyright © 2016, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
;;; Copyright © 2016, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||||
;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||||
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
||||||
|
@ -87,6 +87,7 @@
|
||||||
#:use-module (gnu packages gperf)
|
#:use-module (gnu packages gperf)
|
||||||
#:use-module (gnu packages gstreamer)
|
#:use-module (gnu packages gstreamer)
|
||||||
#:use-module (gnu packages gtk)
|
#:use-module (gnu packages gtk)
|
||||||
|
#:use-module (gnu packages haskell-apps)
|
||||||
#:use-module (gnu packages haskell-xyz)
|
#:use-module (gnu packages haskell-xyz)
|
||||||
#:use-module (gnu packages libunwind)
|
#:use-module (gnu packages libunwind)
|
||||||
#:use-module (gnu packages libusb)
|
#:use-module (gnu packages libusb)
|
||||||
|
@ -5170,42 +5171,46 @@ interface in sysfs, which can be accomplished with the included udev rules.")
|
||||||
(define-public tlp
|
(define-public tlp
|
||||||
(package
|
(package
|
||||||
(name "tlp")
|
(name "tlp")
|
||||||
(version "1.2.2")
|
(version "1.3.0")
|
||||||
(source (origin
|
(source
|
||||||
(method url-fetch)
|
(origin
|
||||||
(uri (string-append
|
(method url-fetch)
|
||||||
"https://github.com/linrunner/"
|
(uri (string-append "https://github.com/linrunner/TLP/archive/"
|
||||||
(string-upcase name)
|
version ".tar.gz"))
|
||||||
"/archive/" version ".tar.gz"))
|
(file-name (string-append name "-" version ".tar.gz"))
|
||||||
(file-name (string-append name "-" version ".tar.gz"))
|
(sha256
|
||||||
(sha256
|
(base32 "169k3xypq5rq0xiggrlpr73yr2r2x7b2d9vcr9ac96qrgph7sk7r"))))
|
||||||
(base32
|
(native-inputs
|
||||||
"059kxrpxx580mm6p0z2a421nxngszyh4yqqhbgvn04b6a7dbsa2w"))))
|
`(("shellcheck" ,shellcheck)))
|
||||||
(inputs `(("bash" ,bash)
|
(inputs
|
||||||
("dbus" ,dbus)
|
`(("bash" ,bash)
|
||||||
("ethtool" ,ethtool)
|
("dbus" ,dbus)
|
||||||
("eudev" ,eudev)
|
("ethtool" ,ethtool)
|
||||||
("grep" ,grep)
|
("eudev" ,eudev)
|
||||||
("hdparm" ,hdparm)
|
("grep" ,grep)
|
||||||
("inetutils" ,inetutils)
|
("hdparm" ,hdparm)
|
||||||
("iw" ,iw)
|
("inetutils" ,inetutils)
|
||||||
("kmod" ,kmod)
|
("iw" ,iw)
|
||||||
("pciutils" ,pciutils)
|
("kmod" ,kmod)
|
||||||
("perl" ,perl)
|
("pciutils" ,pciutils)
|
||||||
("rfkill" ,rfkill)
|
("perl" ,perl)
|
||||||
("sed" ,sed)
|
("rfkill" ,rfkill)
|
||||||
("usbutils" ,usbutils)
|
("sed" ,sed)
|
||||||
("util-linux" ,util-linux)
|
("usbutils" ,usbutils)
|
||||||
("wireless-tools" ,wireless-tools)
|
("util-linux" ,util-linux)
|
||||||
,@(if (let ((system (or (%current-target-system)
|
("wireless-tools" ,wireless-tools)
|
||||||
(%current-system))))
|
,@(if (let ((system (or (%current-target-system)
|
||||||
(or (string-prefix? "i686-" system)
|
(%current-system))))
|
||||||
(string-prefix? "x86_64-" system)))
|
(or (string-prefix? "i686-" system)
|
||||||
`(("x86-energy-perf-policy" ,x86-energy-perf-policy))
|
(string-prefix? "x86_64-" system)))
|
||||||
'())))
|
`(("x86-energy-perf-policy" ,x86-energy-perf-policy))
|
||||||
|
'())))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build gnu-build-system)
|
;; XXX: The full test suite is run with "checkall" but it requires
|
||||||
|
;; "checkbashisms" and "perlcritic", not yet packaged in Guix.
|
||||||
|
`(#:test-target "shellcheck"
|
||||||
|
#:modules ((guix build gnu-build-system)
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(srfi srfi-1))
|
(srfi srfi-1))
|
||||||
#:phases
|
#:phases
|
||||||
|
@ -5222,7 +5227,9 @@ interface in sysfs, which can be accomplished with the included udev rules.")
|
||||||
(setenv "TLP_TLIB" (string-append out "/share/tlp"))
|
(setenv "TLP_TLIB" (string-append out "/share/tlp"))
|
||||||
(setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
|
(setenv "TLP_FLIB" (string-append out "/share/tlp/func.d"))
|
||||||
(setenv "TLP_ULIB" (string-append out "/lib/udev"))
|
(setenv "TLP_ULIB" (string-append out "/lib/udev"))
|
||||||
(setenv "TLP_CONF" "/etc/tlp")
|
(setenv "TLP_CONFDEF"
|
||||||
|
(string-append out "/share/tlp/defaults.conf"))
|
||||||
|
(setenv "TLP_CONFDIR" (string-append out "/etc/tlp.d"))
|
||||||
(setenv "TLP_ELOD"
|
(setenv "TLP_ELOD"
|
||||||
(string-append out "/lib/elogind/system-sleep"))
|
(string-append out "/lib/elogind/system-sleep"))
|
||||||
(setenv "TLP_SHCPL"
|
(setenv "TLP_SHCPL"
|
||||||
|
@ -5230,17 +5237,15 @@ interface in sysfs, which can be accomplished with the included udev rules.")
|
||||||
(setenv "TLP_MAN" (string-append out "/share/man"))
|
(setenv "TLP_MAN" (string-append out "/share/man"))
|
||||||
(setenv "TLP_META" (string-append out "/share/metainfo"))
|
(setenv "TLP_META" (string-append out "/share/metainfo"))
|
||||||
#t)))
|
#t)))
|
||||||
(delete 'check) ; no tests
|
|
||||||
(add-before 'install 'fix-installation
|
(add-before 'install 'fix-installation
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Stop the Makefile from trying to create system directories.
|
;; Stop the Makefile from trying to create system directories.
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("\\[ -f \\$\\(_CONF\\) \\]") "#")
|
(("\\[ -f \\$\\(_CONFUSR\\) \\]") "#")
|
||||||
(("install -d -m 755 \\$\\(_VAR\\)") "#"))
|
(("install -d -m 755 \\$\\(_VAR\\)") "#"))
|
||||||
#t))
|
#t))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda _
|
(lambda _ (invoke "make" "install-tlp" "install-man-tlp")))
|
||||||
(invoke "make" "install-tlp" "install-man")))
|
|
||||||
(add-after 'install 'wrap
|
(add-after 'install 'wrap
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
|
(let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
|
||||||
|
|
|
@ -388,7 +388,7 @@ shutdown on system startup."))
|
||||||
(with-imported-modules '((guix build utils))
|
(with-imported-modules '((guix build utils))
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (guix build utils))
|
(use-modules (guix build utils))
|
||||||
(copy-file #$config-file "/etc/tlp")))))
|
(copy-file #$config-file "/etc/tlp.conf")))))
|
||||||
|
|
||||||
(define tlp-service-type
|
(define tlp-service-type
|
||||||
(service-type
|
(service-type
|
||||||
|
|
Reference in New Issue