diff options
author | kashw2 <supra4keanu@hotmail.com> | 2023-09-06 15:56:18 +1000 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-09-08 19:43:02 +0200 |
commit | 7a7d94c2423f22ced14413e7c13836569656814a (patch) | |
tree | 06d91db139a956e5ec5c99f94b029f05cd574c54 /pkgs/by-name/zc | |
parent | f95a262d751ad6678c81065f6b2391b54b5a5a0a (diff) |
zcfan: init at 1.2.1
Diffstat (limited to 'pkgs/by-name/zc')
-rw-r--r-- | pkgs/by-name/zc/zcfan/package.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/by-name/zc/zcfan/package.nix b/pkgs/by-name/zc/zcfan/package.nix new file mode 100644 index 0000000000000..4534a71fa3e4d --- /dev/null +++ b/pkgs/by-name/zc/zcfan/package.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, fetchFromGitHub +}: + +# Testing this requires a Thinkpad or the presence of /proc/acpi/ibm/fan +stdenv.mkDerivation (finalAttrs: { + pname = "zcfan"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "cdown"; + repo = "zcfan"; + rev = finalAttrs.version; + hash = "sha256-XngchR06HP2iExKJVe+XKBDgsv98AEYWOkl1a/Hktgs="; + }; + + 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"; + 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; + }; +}) |