diff --git a/pkgs/os-specific/linux/lm-sensors/default.nix b/pkgs/os-specific/linux/lm-sensors/default.nix index 04ce60c87b04..0536ba064a3d 100644 --- a/pkgs/os-specific/linux/lm-sensors/default.nix +++ b/pkgs/os-specific/linux/lm-sensors/default.nix @@ -1,28 +1,22 @@ -{ sensord ? false, - stdenv, fetchurl, bison, flex, which, perl, - rrdtool ? null +{ stdenv, fetchzip, bison, flex, which, perl +, sensord ? false, rrdtool ? null }: assert sensord -> rrdtool != null; stdenv.mkDerivation rec { name = "lm-sensors-${version}"; - version = "3.4.0"; # don't forget to tweak fedoraproject mirror URL hash + version = "3.5.0"; - src = fetchurl { - urls = [ - # "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 - "https://src.fedoraproject.org/repo/pkgs/lm_sensors/lm_sensors-${version}.tar.bz2/c03675ae9d43d60322110c679416901a/lm_sensors-${version}.tar.bz2" - ]; - sha256 = "07q6811l4pp0f7pxr8bk3s97ippb84mx5qdg7v92s9hs10b90mz0"; + src = fetchzip { + url = "https://github.com/lm-sensors/lm-sensors/archive/V${stdenv.lib.replaceStrings ["."] ["-"] version}.tar.gz"; + sha256 = "1mdrnb9r01z1xfdm6dpkywvf9yy9a4yzb59paih9sijwmigv19fj"; }; - buildInputs = [ bison flex which perl ] + nativeBuildInputs = [ bison flex which ]; + buildInputs = [ perl ] ++ stdenv.lib.optional sensord rrdtool; - patches = [ ./musl-fix-includes.patch ]; - preBuild = '' makeFlagsArray=(PREFIX=$out ETCDIR=$out/etc ${stdenv.lib.optionalString sensord "PROG_EXTRA=sensord"}) @@ -31,7 +25,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { homepage = https://hwmon.wiki.kernel.org/lm_sensors; description = "Tools for reading hardware sensors"; - license = with licenses; [ gpl2 lgpl21 ]; + license = with licenses; [ gpl2Plus lgpl21Plus ]; platforms = platforms.linux; }; } diff --git a/pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch b/pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch deleted file mode 100644 index 501f2dd762c6..000000000000 --- a/pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- lm_sensors-3.3.4.orig/prog/dump/isadump.c -+++ lm_sensors-3.3.4/prog/dump/isadump.c -@@ -36,13 +36,7 @@ - #include "util.h" - #include "superio.h" - -- --/* To keep glibc2 happy */ --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 - #include --#else --#include --#endif - - #ifdef __powerpc__ - unsigned long isa_io_base = 0; /* XXX for now */ ---- lm_sensors-3.3.4.orig/prog/dump/isaset.c -+++ lm_sensors-3.3.4/prog/dump/isaset.c -@@ -32,13 +32,7 @@ - #include - #include "util.h" - -- --/* To keep glibc2 happy */ --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 - #include --#else --#include --#endif - - #ifdef __powerpc__ - unsigned long isa_io_base = 0; /* XXX for now */ ---- lm_sensors-3.3.4.orig/prog/dump/superio.c -+++ lm_sensors-3.3.4/prog/dump/superio.c -@@ -20,12 +20,7 @@ - */ - - #include -- --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 - #include --#else --#include --#endif - - #include "superio.h" - ---- lm_sensors-3.3.4.orig/prog/dump/util.c -+++ lm_sensors-3.3.4/prog/dump/util.c -@@ -11,12 +11,7 @@ - #include - #include "util.h" - --/* To keep glibc2 happy */ --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 - #include --#else --#include --#endif - - /* Return 1 if we should continue, 0 if we should abort */ - int user_ack(int def)