about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/e2fsprogs
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-09-24 10:39:35 -0500
committerWill Dietz <w@wdtz.org>2018-09-24 10:50:39 -0500
commitdf1dcbf07fb91b9b9ecf676d57682e310625f2fe (patch)
tree6e1fb50026766bed8aad99276eff4727e963167d /pkgs/tools/filesystems/e2fsprogs
parentc3b2c31b2f18c4cf4cae64c090e06fab24fe6b3e (diff)
downloadnixlib-df1dcbf07fb91b9b9ecf676d57682e310625f2fe.tar
nixlib-df1dcbf07fb91b9b9ecf676d57682e310625f2fe.tar.gz
nixlib-df1dcbf07fb91b9b9ecf676d57682e310625f2fe.tar.bz2
nixlib-df1dcbf07fb91b9b9ecf676d57682e310625f2fe.tar.lz
nixlib-df1dcbf07fb91b9b9ecf676d57682e310625f2fe.tar.xz
nixlib-df1dcbf07fb91b9b9ecf676d57682e310625f2fe.tar.zst
nixlib-df1dcbf07fb91b9b9ecf676d57682e310625f2fe.zip
e2fsprogs: patch out glibc instead of local fix so headers are usable
Diffstat (limited to 'pkgs/tools/filesystems/e2fsprogs')
-rw-r--r--pkgs/tools/filesystems/e2fsprogs/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix
index e2b87007b09f..168bf7d076ce 100644
--- a/pkgs/tools/filesystems/e2fsprogs/default.nix
+++ b/pkgs/tools/filesystems/e2fsprogs/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPackages, fetchurl, pkgconfig, libuuid, gettext, texinfo, perl }:
+{ stdenv, buildPackages, fetchurl, fetchpatch, pkgconfig, libuuid, gettext, texinfo, perl }:
 
 stdenv.mkDerivation rec {
   name = "e2fsprogs-1.44.4";
@@ -15,8 +15,14 @@ stdenv.mkDerivation rec {
   buildInputs = [ libuuid gettext ];
 
   # Only use glibc's __GNUC_PREREQ(X,Y) (checks if compiler is gcc version >= X.Y) when using glibc
-  NIX_CFLAGS_COMPILE = stdenv.lib.optional (stdenv.hostPlatform.libc != "glibc")
-    "-D__GNUC_PREREQ(maj,min)=0";
+  patches = if stdenv.hostPlatform.libc == "glibc" then null
+    else [
+      (fetchpatch {
+      url = "https://raw.githubusercontent.com/void-linux/void-packages/1f3b51493031cc0309009804475e3db572fc89ad/srcpkgs/e2fsprogs/patches/fix-glibcism.patch";
+      sha256 = "1q7y8nhsfwl9r1q7nhrlikazxxj97p93kgz5wh7723cshlji2vaa";
+      extraPrefix = "";
+      })
+    ];
 
   configureFlags =
     if stdenv.isLinux then [