diff options
author | Benjamin Staffin <benley@gmail.com> | 2023-08-23 13:32:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-23 13:32:37 -0400 |
commit | 5b198578db9f366032d0e0e084cfebdf7cda0747 (patch) | |
tree | bf122735ed1938cdba855d5f690f9e0436aa5e4b /pkgs/tools/system/hddfancontrol/default.nix | |
parent | ff67dad5711efe6daf0b1a0038b17093617ae502 (diff) | |
parent | 12b3178bd22e0b11ba44a6db2cbb1069178f8e14 (diff) |
Merge pull request #239801 from benley/hddfancontrol
hddfancontrol: init at 1.5.1 (plus nixos module)
Diffstat (limited to 'pkgs/tools/system/hddfancontrol/default.nix')
-rw-r--r-- | pkgs/tools/system/hddfancontrol/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/system/hddfancontrol/default.nix b/pkgs/tools/system/hddfancontrol/default.nix new file mode 100644 index 0000000000000..5a4aeaa3a53ea --- /dev/null +++ b/pkgs/tools/system/hddfancontrol/default.nix @@ -0,0 +1,34 @@ +{ lib, python3Packages, fetchFromGitHub, hddtemp, hdparm, smartmontools }: + +python3Packages.buildPythonPackage rec { + pname = "hddfancontrol"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "desbma"; + repo = pname; + rev = version; + sha256 = "0b2grf98qnikayn18xll01dkm5pjpcjxdffgx1nyw9s0gqig8dg0"; + }; + + propagatedBuildInputs = [ + python3Packages.python-daemon + hddtemp + hdparm + smartmontools + ]; + + postInstall = '' + mkdir -p $out/etc/systemd/system + substitute systemd/hddfancontrol.service $out/etc/systemd/system/hddfancontrol.service \ + --replace /usr/bin/hddfancontrol $out/bin/hddfancontrol + sed -i -e '/EnvironmentFile=.*/d' $out/etc/systemd/system/hddfancontrol.service + ''; + + meta = with lib; { + description = "Dynamically control fan speed according to hard drive temperature on Linux"; + homepage = "https://github.com/desbma/hddfancontrol"; + license = licenses.gpl3; + maintainers = with maintainers; [ benley ]; + }; +} |