ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / zc / zcfan / package.nix
blob430026d16f12c98482257f3fa0836db50fb69975
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 }:
6 # Testing this requires a Thinkpad or the presence of /proc/acpi/ibm/fan
7 stdenv.mkDerivation (finalAttrs: {
8   pname = "zcfan";
9   version = "1.3.0";
11   src = fetchFromGitHub {
12     owner = "cdown";
13     repo = "zcfan";
14     rev = finalAttrs.version;
15     hash = "sha256-zpYQEHXt8LBNX+luM4YxP0dKH+hb2c8Z0BEeGP09oZo=";
16   };
18   postPatch = ''
19     substituteInPlace Makefile \
20       --replace "/usr/local" $out
21   '';
23   doInstallCheck = true;
25   installCheckPhase = ''
26     runHook preInstallCheck
28     $out/bin/${finalAttrs.pname} -h
30     runHook postInstallCheck
31   '';
33   meta = with lib; {
34     description = "Zero-configuration fan daemon for ThinkPads";
35     mainProgram = "zcfan";
36     homepage = "https://github.com/cdown/zcfan";
37     changelog = "https://github.com/cdown/zcfan/tags/${finalAttrs.version}";
38     license = licenses.mit;
39     maintainers = with maintainers; [ kashw2 ];
40     platforms = platforms.linux;
41   };