Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 34 lines 1.1 kB view raw
1{ lib, stdenv, kernel }: 2 3stdenv.mkDerivation { 4 inherit (kernel) version src; 5 6 pname = "freefall"; 7 8 postPatch = '' 9 cd tools/laptop/freefall 10 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)" 14 ''; 15 16 makeFlags = [ "PREFIX=$(out)" ]; 17 18 meta = with lib; { 19 inherit (kernel.meta) homepage license; 20 21 description = "Free-fall protection for spinning HP/Dell laptop hard drives"; 22 mainProgram = "freefall"; 23 longDescription = '' 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! 30 ''; 31 32 platforms = platforms.linux; 33 }; 34}