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