unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] Add thinkfan.
Date: Sat, 07 May 2016 01:42:22 +0200	[thread overview]
Message-ID: <87mvo2bvoh.fsf@saiph.selenimh> (raw)
In-Reply-To: <20160506181314.GB2123@jasmine> (Leo Famulari's message of "Fri, 6 May 2016 14:13:14 -0400")

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

Hello,

Leo Famulari <leo@famulari.name> writes:

> Looks good! But I noticed they *just* released a new version. Can you
> take a look and submit a patch with that version if it works for you?

Here it is.


Regards,

-- 
Nicolas Goaziou                                                0x80A93738
 

[-- Attachment #2: add thinkfan (take 3) --]
[-- Type: text/x-diff, Size: 3650 bytes --]

From 9c82df26841b281fc9eeb751db76871e31c94339 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
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 | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e80c900..fcea499 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 Raymond Nicholson <rain1@openmailbox.org>
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
+;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;;
 ;;; 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,53 @@ where they are less likely to cause damage to the spinning 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.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/thinkfan/"
+                                  version "/thinkfan-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))
+              (modules '((guix build utils)))
+              ;; Fix erroneous man page location in Makefile leading to
+              ;; a compilation failure.
+              (snippet
+               '(substitute* "CMakeLists.txt"
+                  (("thinkfan\\.1") "src/thinkfan.1")))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:modules ((guix build cmake-build-system)
+                  (guix build utils)
+                  (srfi srfi-26))
+       #:tests? #f                      ;no test target
+       #:configure-flags
+       ;; Enable reading temperatures from hard disks via S.M.A.R.T.
+       `("-DUSE_ATASMART:BOOL=ON")
+       #: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 (string-append "../thinkfan-" ,version
+                                                  "/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+)))
-- 
2.7.4


  reply	other threads:[~2016-05-06 23:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30 23:05 [PATCH] Add thinkfan Nicolas Goaziou
2016-05-01 21:14 ` Leo Famulari
2016-05-01 21:24   ` Kei Yamashita
2016-05-03 22:12   ` Nicolas Goaziou
2016-05-06 18:13     ` Leo Famulari
2016-05-06 23:42       ` Nicolas Goaziou [this message]
2016-05-07  2:58         ` Leo Famulari
2016-05-07  9:47           ` Nicolas Goaziou
2016-05-09  8:31             ` Ludovic Courtès
2016-05-10 19:25               ` Nicolas Goaziou
2016-05-11 15:57                 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvo2bvoh.fsf@saiph.selenimh \
    --to=mail@nicolasgoaziou.fr \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).