2023-09-06 05:56:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
# Testing this requires a Thinkpad or the presence of /proc/acpi/ibm/fan
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "zcfan";
|
2024-02-29 10:21:20 +00:00
|
|
|
version = "1.3.0";
|
2023-09-06 05:56:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cdown";
|
|
|
|
repo = "zcfan";
|
|
|
|
rev = finalAttrs.version;
|
2024-02-29 10:21:20 +00:00
|
|
|
hash = "sha256-zpYQEHXt8LBNX+luM4YxP0dKH+hb2c8Z0BEeGP09oZo=";
|
2023-09-06 05:56:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "/usr/local" $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
|
|
|
|
$out/bin/${finalAttrs.pname} -h
|
|
|
|
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A zero-configuration fan daemon for ThinkPads";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "zcfan";
|
2023-09-06 05:56:18 +00:00
|
|
|
homepage = "https://github.com/cdown/zcfan";
|
|
|
|
changelog = "https://github.com/cdown/zcfan/tags/${finalAttrs.version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kashw2 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
})
|