biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / system / hddfancontrol / default.nix
blob7af08d9108bfd3962ebcdcee1fda0c15779b2869
1 { lib, python3Packages, fetchFromGitHub, hddtemp, hdparm, smartmontools, nixosTests }:
3 python3Packages.buildPythonPackage rec {
4   pname = "hddfancontrol";
5   version = "1.5.1";
7   src = fetchFromGitHub {
8     owner = "desbma";
9     repo = pname;
10     rev = version;
11     sha256 = "0b2grf98qnikayn18xll01dkm5pjpcjxdffgx1nyw9s0gqig8dg0";
12   };
14   propagatedBuildInputs = [
15     python3Packages.python-daemon
16     hddtemp
17     hdparm
18     smartmontools
19   ];
21   postInstall = ''
22     mkdir -p $out/etc/systemd/system
23     substitute systemd/hddfancontrol.service $out/etc/systemd/system/hddfancontrol.service \
24         --replace /usr/bin/hddfancontrol $out/bin/hddfancontrol
25     sed -i -e '/EnvironmentFile=.*/d' $out/etc/systemd/system/hddfancontrol.service
26   '';
28   passthru.tests = { inherit (nixosTests) hddfancontrol; };
30   meta = with lib; {
31     description = "Dynamically control fan speed according to hard drive temperature on Linux";
32     homepage = "https://github.com/desbma/hddfancontrol";
33     license = licenses.gpl3Only;
34     maintainers = with maintainers; [ benley ];
35     mainProgram = "hddfancontrol";
36   };