From 56c7019d58d4a064fe44e626a1396b62cbf808b0 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 13 May 2017 19:36:01 -0500 Subject: [PATCH 1/2] gnu: Add thermald. * gnu/packages/admin.scm (thermald): New variable. --- gnu/packages/admin.scm | 54 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index ff0431999..20cb8f180 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2016 John Darrington ;;; Copyright © 2017 Ben Sturmfels ;;; Copyright © 2017 Ethan R. Jones +;;; Copyright © 2017 Christopher Allan Webber ;;; ;;; This file is part of GNU Guix. ;;; @@ -80,7 +81,8 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages gnome) #:use-module (gnu packages kerberos) - #:use-module (gnu packages gtk)) + #:use-module (gnu packages gtk) + #:use-module (gnu packages xml)) (define-public aide (package @@ -2130,3 +2132,53 @@ logo, or any ASCII file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what operating system or distribution you are running, what theme or icon set you are using, etc.") (license license:expat))) + +(define-public thermald + (package + (name "thermald") + (version "1.6") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/01org/thermal_daemon/archive/v" + version ".tar.gz")) + (sha256 (base32 + "14klz9fnvi9jdlaqwrp61xa5nh051n8ykrs1fh1wxd7j66qf2fn6")))) + (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after + 'unpack 'autogen.sh-and-fix-paths + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; upstartconfir is hardcoded to /etc/init and the build + ;; system tries to mkdir that. We don't even need upstart + ;; files at all; this is a fast and kludgy workaround + (substitute* "data/Makefile.am" + (("upstartconfdir = /etc/init") + (string-append "upstartconfdir = " + out "/etc/init"))) + ;; Now run autogen + (zero? (system* "sh" "autogen.sh")))))) + #:configure-flags + (let ((out (assoc-ref %outputs "out"))) + (list (string-append "--sysconfdir=" + out "/etc") + (string-append "--with-udev-dir=" + out "/lib/udev") + (string-append "--with-dbus-sys-dir=" + out "/etc/dbus-1/system.d") + "--localstatedir=/var")))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("glib" ,glib "bin") ; for glib-genmarshal, etc. + ("pkg-config" ,pkg-config))) + (inputs + `(("dbus-glib" ,dbus-glib) + ("libxml2" ,libxml2))) + (home-page "https://01.org/linux-thermal-daemon/") + (synopsis "CPU scaling for thermal management") + (description "The Linux Thermal Daemon helps monitor and control temperature +on systems running the Linux kernel.") + (license license:gpl2+))) -- 2.12.2