2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchzip, bison, flex, which, perl
|
2018-12-01 17:02:49 +01:00
|
|
|
, sensord ? false, rrdtool ? null
|
2017-12-02 16:46:14 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert sensord -> rrdtool != null;
|
2011-12-21 11:28:09 +01:00
|
|
|
|
2009-09-16 00:06:38 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "lm-sensors";
|
2019-10-25 20:21:49 +02:00
|
|
|
version = "3.6.0";
|
2021-01-15 15:45:37 +01:00
|
|
|
dashedVersion = lib.replaceStrings ["."] ["-"] version;
|
2017-12-02 16:46:14 +01:00
|
|
|
|
2018-12-01 17:02:49 +01:00
|
|
|
src = fetchzip {
|
2019-10-25 20:21:49 +02:00
|
|
|
url = "https://github.com/lm-sensors/lm-sensors/archive/V${dashedVersion}.tar.gz";
|
|
|
|
sha256 = "1ipf6wjx037sqyhy0r5jh4983h216anq9l68ckn2x5c3qc4wfmzn";
|
2008-09-01 13:42:43 +02:00
|
|
|
};
|
|
|
|
|
2018-12-01 17:02:49 +01:00
|
|
|
nativeBuildInputs = [ bison flex which ];
|
|
|
|
buildInputs = [ perl ]
|
2021-01-15 15:45:37 +01:00
|
|
|
++ lib.optional sensord rrdtool;
|
2008-09-01 13:42:43 +02:00
|
|
|
|
2020-10-04 19:57:53 +02:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
"AR=${stdenv.cc.targetPrefix}ar"
|
2021-01-15 15:45:37 +01:00
|
|
|
] ++ lib.optional sensord "PROG_EXTRA=sensord";
|
2008-09-01 13:42:43 +02:00
|
|
|
|
2021-03-22 06:58:04 +01:00
|
|
|
installFlags = [
|
|
|
|
"ETCDIR=${placeholder "out"}/etc"
|
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-10-25 20:21:49 +02:00
|
|
|
homepage = "https://hwmon.wiki.kernel.org/lm_sensors";
|
|
|
|
changelog = "https://raw.githubusercontent.com/lm-sensors/lm-sensors/V${dashedVersion}/CHANGES";
|
2008-09-01 13:42:43 +02:00
|
|
|
description = "Tools for reading hardware sensors";
|
2019-10-25 20:21:49 +02:00
|
|
|
license = with licenses; [ lgpl21Plus gpl2Plus ];
|
2021-03-22 06:58:04 +01:00
|
|
|
maintainers = with maintainers; [ pengmeiyu ];
|
2018-08-30 21:35:57 +02:00
|
|
|
platforms = platforms.linux;
|
2021-04-27 19:25:57 +02:00
|
|
|
mainProgram = "sensors";
|
2008-09-01 13:42:43 +02:00
|
|
|
};
|
|
|
|
}
|