1 { lib, python3Packages, fetchFromGitHub, hddtemp, hdparm, smartmontools, nixosTests }:
3 python3Packages.buildPythonPackage rec {
4 pname = "hddfancontrol";
7 src = fetchFromGitHub {
11 sha256 = "0b2grf98qnikayn18xll01dkm5pjpcjxdffgx1nyw9s0gqig8dg0";
14 propagatedBuildInputs = [
15 python3Packages.python-daemon
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
28 passthru.tests = { inherit (nixosTests) hddfancontrol; };
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";