diff options
author | Matthew Toohey <contact@mtoohey.com> | 2022-10-29 19:54:33 -0400 |
---|---|---|
committer | Matthew Toohey <contact@mtoohey.com> | 2022-10-29 21:16:46 -0400 |
commit | 093c82d2cfd97ccb2446d8d070f7ae3333fda1f9 (patch) | |
tree | d97d881ae85674bb80da71863298572b76bbe79a /pkgs/os-specific/linux/fan2go | |
parent | 04167b4037062451e682af86ea9494cdfe627e93 (diff) |
fan2go: init at 0.8.0
Diffstat (limited to 'pkgs/os-specific/linux/fan2go')
-rw-r--r-- | pkgs/os-specific/linux/fan2go/default.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/fan2go/default.nix b/pkgs/os-specific/linux/fan2go/default.nix new file mode 100644 index 0000000000000..e7ad27741062d --- /dev/null +++ b/pkgs/os-specific/linux/fan2go/default.nix @@ -0,0 +1,31 @@ +{ buildGoModule, fetchFromGitHub, lib, lm_sensors }: + +buildGoModule rec { + pname = "fan2go"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "markusressel"; + repo = pname; + rev = version; + sha256 = "3pnJaLD+FEQWAAwIiTkcs9VgqO0JwRaK7JLdIygeChY="; + }; + + vendorSha256 = "9EeiYPNTUEFHxTdvVb2JLU6Qi0oazH+n9MB8Dg+RLJ4="; + + postConfigure = '' + substituteInPlace vendor/github.com/md14454/gosensors/gosensors.go \ + --replace '"/etc/sensors3.conf"' '"${lm_sensors}/etc/sensors3.conf"' + ''; + + CGO_CFLAGS = "-I ${lm_sensors}/include"; + CGO_LDFLAGS = "-L ${lm_sensors}/lib"; + + meta = with lib; { + description = "A simple daemon providing dynamic fan speed control based on temperature sensors"; + homepage = "https://github.com/markusressel/fan2go"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ mtoohey ]; + platforms = platforms.linux; + }; +} |