1 { lib, stdenv, kernel }:
4 inherit (kernel) version src;
9 cd tools/laptop/freefall
11 # Default time-out is a little low, probably because the AC/lid status
12 # functions were never implemented. Because no-one still uses HDDs, right?
13 substituteInPlace freefall.c --replace "alarm(2)" "alarm(5)"
16 makeFlags = [ "PREFIX=$(out)" ];
19 inherit (kernel.meta) homepage license;
21 description = "Free-fall protection for spinning HP/Dell laptop hard drives";
22 mainProgram = "freefall";
24 Provides a shock protection facility in modern laptops with spinning hard
25 drives, by stopping all input/output operations on the internal hard drive
26 and parking its heads on the ramp when critical situations are anticipated.
27 Requires support for the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
28 feature, which should cause the drive to switch to idle mode and unload the
29 disk heads, and an accelerometer device. It has no effect on SSD devices!
32 platforms = platforms.linux;