summary refs log tree commit diff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2016-03-16 21:45:12 +0100
committerLeo Famulari <leo@famulari.name>2016-03-17 00:25:41 -0400
commit08e9daf505eb41d8831bbd36e77ecebf3acd4ebc (patch)
tree810a0cec257d777923999996c4323fd4ad1f443d /gnu/packages/linux.scm
parente3bf5d2cb25e189a1c80eae852cf13f8c4fda082 (diff)
downloadguix-08e9daf505eb41d8831bbd36e77ecebf3acd4ebc.tar.gz
gnu: Add freefall.
* gnu/packages/linux.scm (freefall): New variable.

Signed-off-by: Leo Famulari <leo@famulari.name>
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a2412d0ea0..a320c6b38e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2524,3 +2524,35 @@ easy administration.")
     ;; GPL2+: crc32.c, radix-tree.c, raid6.c, rbtree.c.
     ;; GPL2: Everything else.
     (license (list license:gpl2 license:gpl2+))))
+
+(define-public freefall
+  (package
+    (name "freefall")
+    (version (package-version linux-libre))
+    (source (package-source linux-libre))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'enter-subdirectory
+                    (lambda _
+                      (chdir "tools/laptop/freefall")))
+                  (delete 'configure)
+                  (add-before 'build 'increase-timeout
+                    (lambda _
+                      ;; The default of 2 seconds is too low: it assumes an
+                      ;; open lid and AC power without actually checking.
+                      (substitute* "freefall.c"
+                        (("alarm\\(2\\)") "alarm(5)")))))
+       #:make-flags (list (string-append "PREFIX="
+                                         (assoc-ref %outputs "out")))
+       #:tests? #f)) ;no tests
+    (home-page (package-home-page linux-libre))
+    (synopsis "Free-fall protection for spinning laptop hard drives")
+    (description
+     "Prevents shock damage to the internal spinning hard drive(s) of some
+HP and Dell laptops.  When sudden movement is detected, all input/output
+operations on the drive are suspended and its heads are parked on the ramp,
+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)))