From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add thinkfan. Date: Wed, 04 May 2016 00:12:48 +0200 Message-ID: <877ffalrj3.fsf@saiph.selenimh> References: <87mvoay9wo.fsf@saiph.selenimh> <20160501211418.GA10221@jasmine> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axiZI-0001ka-PI for guix-devel@gnu.org; Tue, 03 May 2016 18:13:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axiZ6-0006XI-G4 for guix-devel@gnu.org; Tue, 03 May 2016 18:13:19 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:38408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axiZ6-0006V6-8j for guix-devel@gnu.org; Tue, 03 May 2016 18:13:12 -0400 In-Reply-To: <20160501211418.GA10221@jasmine> (Leo Famulari's message of "Sun, 1 May 2016 17:14:18 -0400") 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: Leo Famulari Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hello, Leo Famulari writes: > Can you add a brief comment explaining this flag? Done. > Also, can you add a phase that installs the "rcscripts"? They will be > useful for Guix users on foreign distros. Done. > I'm not sure where to install them. Since they will probably have to be > copied or symlinked out of ~/.guix-profile anyways, how about installing > them into 'share/misc'? > > I'm open to better ideas! What about share/thinkfan instead? I changed the patch accordingly. Feel free to use share/misc instead if you think this is better. >> + (synopsis "Simple fan control program") > > Is it specific to ThinkPads? No, it isn't. Quoting README: Thinkfan is a simple, lightweight fan control program. Originally designed specifically for IBM/Lenovo Thinkpads, it now supports any kind of system via the sysfs hwmon interface (/sys/class/hwmon). Here is the updated patch. Thank you for the review. 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 (take 2) >From b804f745864eb06613a51e6055b8b0b4c4865401 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 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index aa778be..97958eb 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) @@ -2591,3 +2593,47 @@ 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 + `(#:modules ((guix build cmake-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + #:tests? #f ;no test target + #:configure-flags + ;; Allow reading temperatures from hard disks via S.M.A.R.T. + `("-DUSE_ATASMART:BOOL=3DON") + #:phases + (modify-phases %standard-phases + ;; Install scripts for various foreign init systems. + (add-after 'install 'install-rc-scripts + (lambda* (#:key outputs #:allow-other-keys) + (for-each (cute install-file <> + (string-append (assoc-ref outputs "out") + "/share/thinkfan")) + (find-files "../source/rcscripts" ".*")) + #t))))) + (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 --=-=-=--