diff options
author | Will Dietz <w@wdtz.org> | 2017-05-28 07:48:17 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-02-13 09:44:50 -0600 |
commit | e2ef21d9b5dddc0996c453f65a686ff871b6ac94 (patch) | |
tree | 037ed7bb447b6cb2be197dfbae2e9d01cec7963d /pkgs/os-specific/linux/lm-sensors | |
parent | 5d3af4225074cecbf43fc70740e616ee03406f02 (diff) | |
download | nixpkgs-e2ef21d9b5dddc0996c453f65a686ff871b6ac94.tar nixpkgs-e2ef21d9b5dddc0996c453f65a686ff871b6ac94.tar.gz nixpkgs-e2ef21d9b5dddc0996c453f65a686ff871b6ac94.tar.bz2 nixpkgs-e2ef21d9b5dddc0996c453f65a686ff871b6ac94.tar.lz nixpkgs-e2ef21d9b5dddc0996c453f65a686ff871b6ac94.tar.xz nixpkgs-e2ef21d9b5dddc0996c453f65a686ff871b6ac94.tar.zst nixpkgs-e2ef21d9b5dddc0996c453f65a686ff871b6ac94.zip |
lm_sensors: add musl patch from alpine.
Doesn't fix build yet due to use of unconventional object file extensions (which shouldn't matter but do).
Diffstat (limited to 'pkgs/os-specific/linux/lm-sensors')
-rw-r--r-- | pkgs/os-specific/linux/lm-sensors/default.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch | 62 |
2 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/lm-sensors/default.nix b/pkgs/os-specific/linux/lm-sensors/default.nix index 25b64499838..4f35d546538 100644 --- a/pkgs/os-specific/linux/lm-sensors/default.nix +++ b/pkgs/os-specific/linux/lm-sensors/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { buildInputs = [ bison flex which 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"}) diff --git a/pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch b/pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch new file mode 100644 index 00000000000..501f2dd762c --- /dev/null +++ b/pkgs/os-specific/linux/lm-sensors/musl-fix-includes.patch @@ -0,0 +1,62 @@ +--- 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 <sys/io.h> +-#else +-#include <asm/io.h> +-#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 <string.h> + #include "util.h" + +- +-/* To keep glibc2 happy */ +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 + #include <sys/io.h> +-#else +-#include <asm/io.h> +-#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 <stdlib.h> +- +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 + #include <sys/io.h> +-#else +-#include <asm/io.h> +-#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 <stdio.h> + #include "util.h" + +-/* To keep glibc2 happy */ +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 + #include <sys/io.h> +-#else +-#include <asm/io.h> +-#endif + + /* Return 1 if we should continue, 0 if we should abort */ + int user_ack(int def) |