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 {
|
2013-09-07 14:10:27 +00:00
|
|
|
name = "lm-sensors-${version}";
|
2018-12-01 16:02:49 +00:00
|
|
|
version = "3.5.0";
|
2017-12-02 15:46:14 +00:00
|
|
|
|
2018-12-01 16:02:49 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/lm-sensors/lm-sensors/archive/V${stdenv.lib.replaceStrings ["."] ["-"] version}.tar.gz";
|
|
|
|
sha256 = "1mdrnb9r01z1xfdm6dpkywvf9yy9a4yzb59paih9sijwmigv19fj";
|
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
|
|
|
|
|
|
|
preBuild = ''
|
2017-12-02 15:46:14 +00:00
|
|
|
makeFlagsArray=(PREFIX=$out ETCDIR=$out/etc
|
|
|
|
${stdenv.lib.optionalString sensord "PROG_EXTRA=sensord"})
|
2008-09-01 11:42:43 +00:00
|
|
|
'';
|
|
|
|
|
2018-08-30 19:35:57 +00:00
|
|
|
meta = with stdenv.lib; {
|
2018-09-03 14:53:02 +00:00
|
|
|
homepage = https://hwmon.wiki.kernel.org/lm_sensors;
|
2008-09-01 11:42:43 +00:00
|
|
|
description = "Tools for reading hardware sensors";
|
2018-12-01 16:02:49 +00:00
|
|
|
license = with licenses; [ gpl2Plus lgpl21Plus ];
|
2018-08-30 19:35:57 +00:00
|
|
|
platforms = platforms.linux;
|
2008-09-01 11:42:43 +00:00
|
|
|
};
|
|
|
|
}
|