lol
1{ buildGoModule, fetchFromGitHub, lib, lm_sensors }:
2
3buildGoModule rec {
4 pname = "fan2go";
5 version = "0.8.1";
6
7 src = fetchFromGitHub {
8 owner = "markusressel";
9 repo = pname;
10 rev = version;
11 hash = "sha256-w2Qwu3ZmBkoA86xa7V6pnIBAbfG9mtkAHePkQjefRW8=";
12 };
13
14 vendorHash = "sha256-6OEdl7ie0dTjXrG//Fvcg4ZyTW/mhrUievDljY2zi/4=";
15
16 postConfigure = ''
17 substituteInPlace vendor/github.com/md14454/gosensors/gosensors.go \
18 --replace '"/etc/sensors3.conf"' '"${lm_sensors}/etc/sensors3.conf"'
19 '';
20
21 CGO_CFLAGS = "-I ${lm_sensors}/include";
22 CGO_LDFLAGS = "-L ${lm_sensors}/lib";
23
24 meta = with lib; {
25 description = "A simple daemon providing dynamic fan speed control based on temperature sensors";
26 homepage = "https://github.com/markusressel/fan2go";
27 license = licenses.agpl3Plus;
28 maintainers = with maintainers; [ mtoohey ];
29 platforms = platforms.linux;
30 };
31}