Skip to content

Commit

Permalink
python2Packages.nixpart0/pyblock: patch for glibc >= 2.28
Browse files Browse the repository at this point in the history
(cherry picked from commit 912e1e8)
  • Loading branch information
pbogdan authored and aszlig committed Jun 14, 2020
1 parent 1ecfb2c commit 4fa1d54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/tools/filesystems/nixpart/0.4/pyblock-sysmacros.h.patch
@@ -0,0 +1,12 @@
diff --git a/dm.c b/dm.c
index 5daa0e5..d5b84c8 100644
--- a/dm.c
+++ b/dm.c
@@ -19,6 +19,7 @@
#define _GNU_SOURCE
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdarg.h>
6 changes: 6 additions & 0 deletions pkgs/tools/filesystems/nixpart/0.4/pyblock.nix
Expand Up @@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
sha256 = "f6cef88969300a6564498557eeea1d8da58acceae238077852ff261a2cb1d815";
};

patches = [
# Fix build with glibc >= 2.28
# https://github.com/NixOS/nixpkgs/issues/86403
./pyblock-sysmacros.h.patch
];

postPatch = ''
sed -i -e 's|/usr/include/python|${python}/include/python|' \
-e 's/-Werror *//' -e 's|/usr/|'"$out"'/|' Makefile
Expand Down

0 comments on commit 4fa1d54

Please sign in to comment.