blob: e7ad27741062dcd51b0717d3258e699927780669 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
};
}
|