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