From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: [PATCH] Add thinkfan. Date: Sun, 01 May 2016 01:05:59 +0200 Message-ID: <87mvoay9wo.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awdy2-0000oF-Qt for guix-devel@gnu.org; Sat, 30 Apr 2016 19:06:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awdxq-0002OP-Oa for guix-devel@gnu.org; Sat, 30 Apr 2016 19:06:25 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:50789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awdxq-0002M1-HD for guix-devel@gnu.org; Sat, 30 Apr 2016 19:06:18 -0400 Received: from saiph.selenimh (unknown [IPv6:2a03:a0a0:0:4301::b3c]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 02F5217209F for ; Sun, 1 May 2016 01:06:05 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hello, I'd like to submit the following patch for inclusion. There are a few caveats 1. It has to be run as root. 2. There is no default configuration since it is hardware-dependant, and it will not run without one. 3. It requires to load a kernel module with a specific option, namely: modprobe thinkpad_acpi fan_control=1 I guess we cannot handle any of these requirements at the package definition level, anyway. As icing on the cake, one could define a service to load it at boot (the tarball contains scripts for at least 4 init systems), but my service-fu is feeble. Regards, -- Nicolas Goaziou 0x80A93738 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-thinkfan.patch Content-Transfer-Encoding: quoted-printable Content-Description: Add thinkfan >From e82ba2f266a144e05f16cf41602b9c2bd203b3ec Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 30 Apr 2016 10:31:13 +0200 Subject: [PATCH] gnu: Add thinkfan. * gnu/packages/linux.scm (thinkfan): New variable. --- gnu/packages/linux.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a26e641..4ed83d1 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -11,6 +11,7 @@ ;;; Copyright =C2=A9 2016 Alex Kost ;;; Copyright =C2=A9 2016 Raymond Nicholson ;;; Copyright =C2=A9 2016 Mathieu Lirzin +;;; Copyright =C2=A9 2016 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,6 +64,7 @@ #:use-module (gnu packages readline) #:use-module (gnu packages calendar) #:use-module (gnu packages tls) + #:use-module (gnu packages freedesktop) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) @@ -2571,3 +2573,32 @@ where they are less likely to cause damage to the sp= inning disc. Requires a drive that supports the ATA/ATAPI-7 IDLE IMMEDIATE command with unload feature, and a laptop with an accelerometer. It has no effect on SSDs.") (license license:gpl2))) + +(define-public thinkfan + (package + (name "thinkfan") + (version "0.9.2") + (source (origin + (method url-fetch/tarbomb) + (file-name (string-append name "-" version)) + (uri (string-append "mirror://sourceforge/thinkfan/" + version "/thinkfan-" version ".tar.gz")) + (sha256 + (base32 + "0ydgabk2758f6j64g1r9vdsd221nqsv5rwnphm81s7i2vgra1nlh")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;no test target + #:configure-flags + `("-DUSE_ATASMART:BOOL=3DON"))) + (inputs + `(("libatasmart" ,libatasmart))) + (home-page "http://thinkfan.sourceforge.net/") + (synopsis "Simple fan control program") + (description + "Thinkfan is a simple fan control program. It reads temperatures, +checks them against configured limits and switches to appropriate (also +pre-configured) fan level. It requires a working @code{thinkpad_acpi} or = any +other @code{hwmon} driver that enables temperature reading and fan control +from userspace.") + (license license:gpl3+))) --=20 2.7.4 --=-=-=--