2022-10-30 01:54:33 +02:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib, lm_sensors }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fan2go";
|
2023-09-11 03:11:03 +02:00
|
|
|
version = "0.8.1";
|
2022-10-30 01:54:33 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "markusressel";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-09-21 16:23:40 +02:00
|
|
|
hash = "sha256-w2Qwu3ZmBkoA86xa7V6pnIBAbfG9mtkAHePkQjefRW8=";
|
2022-10-30 01:54:33 +02:00
|
|
|
};
|
|
|
|
|
2023-09-21 16:23:40 +02:00
|
|
|
vendorHash = "sha256-6OEdl7ie0dTjXrG//Fvcg4ZyTW/mhrUievDljY2zi/4=";
|
2022-10-30 01:54:33 +02:00
|
|
|
|
|
|
|
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";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "fan2go";
|
2022-10-30 01:54:33 +02:00
|
|
|
homepage = "https://github.com/markusressel/fan2go";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ mtoohey ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|