mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
43 lines
955 B
Nix
43 lines
955 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
# Testing this requires a Thinkpad or the presence of /proc/acpi/ibm/fan
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "zcfan";
|
|
version = "1.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cdown";
|
|
repo = "zcfan";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-zpYQEHXt8LBNX+luM4YxP0dKH+hb2c8Z0BEeGP09oZo=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace "/usr/local" $out
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/${finalAttrs.pname} -h
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Zero-configuration fan daemon for ThinkPads";
|
|
mainProgram = "zcfan";
|
|
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;
|
|
};
|
|
})
|