Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
kernel,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
inherit (kernel) version src;
|
|
|
|
pname = "freefall";
|
|
|
|
postPatch = ''
|
|
cd tools/laptop/freefall
|
|
|
|
# Default time-out is a little low, probably because the AC/lid status
|
|
# functions were never implemented. Because no-one still uses HDDs, right?
|
|
substituteInPlace freefall.c --replace "alarm(2)" "alarm(5)"
|
|
'';
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
meta = with lib; {
|
|
inherit (kernel.meta) homepage license;
|
|
|
|
description = "Free-fall protection for spinning HP/Dell laptop hard drives";
|
|
mainProgram = "freefall";
|
|
longDescription = ''
|
|
Provides a shock protection facility in modern laptops with spinning hard
|
|
drives, by stopping all input/output operations on the internal hard drive
|
|
and parking its heads on the ramp when critical situations are anticipated.
|
|
Requires support for the ATA/ATAPI-7 IDLE IMMEDIATE command with unload
|
|
feature, which should cause the drive to switch to idle mode and unload the
|
|
disk heads, and an accelerometer device. It has no effect on SSD devices!
|
|
'';
|
|
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|