2017-12-02 15:46:14 +00:00
|
|
|
{ sensord ? false,
|
|
|
|
stdenv, fetchurl, bison, flex, which, perl,
|
|
|
|
rrdtool ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert sensord -> rrdtool != null;
|
2011-12-21 10:28:09 +00:00
|
|
|
|
2009-09-15 23:06:38 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2013-09-07 15:10:27 +01:00
|
|
|
name = "lm-sensors-${version}";
|
2016-05-18 14:57:09 +01:00
|
|
|
version = "3.4.0"; # don't forget to tweak fedoraproject mirror URL hash
|
2017-12-02 15:46:14 +00:00
|
|
|
|
2008-09-01 12:42:43 +01:00
|
|
|
src = fetchurl {
|
2016-05-18 14:57:09 +01:00
|
|
|
urls = [
|
2018-09-03 15:53:02 +01:00
|
|
|
# "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${version}.tar.bz2" # dead
|
|
|
|
# https://github.com/lm-sensors/lm-sensors/releases/... # only generated tarballs
|
2018-06-28 19:43:35 +01:00
|
|
|
"https://src.fedoraproject.org/repo/pkgs/lm_sensors/lm_sensors-${version}.tar.bz2/c03675ae9d43d60322110c679416901a/lm_sensors-${version}.tar.bz2"
|
2016-05-18 14:57:09 +01:00
|
|
|
];
|
2016-05-10 20:05:31 +01:00
|
|
|
sha256 = "07q6811l4pp0f7pxr8bk3s97ippb84mx5qdg7v92s9hs10b90mz0";
|
2008-09-01 12:42:43 +01:00
|
|
|
};
|
|
|
|
|
2017-12-02 15:46:14 +00:00
|
|
|
buildInputs = [ bison flex which perl ]
|
|
|
|
++ stdenv.lib.optional sensord rrdtool;
|
2008-09-01 12:42:43 +01:00
|
|
|
|
2017-05-28 13:48:17 +01:00
|
|
|
patches = [ ./musl-fix-includes.patch ];
|
|
|
|
|
2008-09-01 12:42:43 +01: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 12:42:43 +01:00
|
|
|
'';
|
|
|
|
|
2018-08-30 20:35:57 +01:00
|
|
|
meta = with stdenv.lib; {
|
2018-09-03 15:53:02 +01:00
|
|
|
homepage = https://hwmon.wiki.kernel.org/lm_sensors;
|
2008-09-01 12:42:43 +01:00
|
|
|
description = "Tools for reading hardware sensors";
|
2018-08-30 20:35:57 +01:00
|
|
|
license = with licenses; [ gpl2 lgpl21 ];
|
|
|
|
platforms = platforms.linux;
|
2008-09-01 12:42:43 +01:00
|
|
|
};
|
|
|
|
}
|