about summary refs log tree commit diff
path: root/pkgs/development/tools/misc
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2019-05-21 23:27:10 +0200
committerDaiderd Jordan <daiderd@gmail.com>2019-05-21 23:27:10 +0200
commit77908680f27882f7312c5b2c3dd34264e437eb49 (patch)
treec9fe6da39cca7de2f7a1a72df2171d832a0858de /pkgs/development/tools/misc
parent5c7ce21c5a592e3704af5d56fb0f5dffba928a78 (diff)
downloadnixlib-77908680f27882f7312c5b2c3dd34264e437eb49.tar
nixlib-77908680f27882f7312c5b2c3dd34264e437eb49.tar.gz
nixlib-77908680f27882f7312c5b2c3dd34264e437eb49.tar.bz2
nixlib-77908680f27882f7312c5b2c3dd34264e437eb49.tar.lz
nixlib-77908680f27882f7312c5b2c3dd34264e437eb49.tar.xz
nixlib-77908680f27882f7312c5b2c3dd34264e437eb49.tar.zst
nixlib-77908680f27882f7312c5b2c3dd34264e437eb49.zip
indent: fix darwin build
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r--pkgs/development/tools/misc/indent/darwin.patch15
-rw-r--r--pkgs/development/tools/misc/indent/default.nix7
2 files changed, 19 insertions, 3 deletions
diff --git a/pkgs/development/tools/misc/indent/darwin.patch b/pkgs/development/tools/misc/indent/darwin.patch
new file mode 100644
index 000000000000..5458a0d93bff
--- /dev/null
+++ b/pkgs/development/tools/misc/indent/darwin.patch
@@ -0,0 +1,15 @@
+diff --git a/config.h.in b/config.h.in
+index 07e6fce..0c57e2a 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -432,8 +432,8 @@
+ # endif
+ # define _GL_EXTERN_INLINE extern
+ #else
+-# define _GL_INLINE static _GL_UNUSED
+-# define _GL_EXTERN_INLINE static _GL_UNUSED
++# define _GL_INLINE static
++# define _GL_EXTERN_INLINE static
+ #endif
+ 
+ #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix
index d7bc90e3c26b..c4b5fecca741 100644
--- a/pkgs/development/tools/misc/indent/default.nix
+++ b/pkgs/development/tools/misc/indent/default.nix
@@ -8,11 +8,12 @@ stdenv.mkDerivation rec {
     sha256 = "12xvcd16cwilzglv9h7sgh4h1qqjd1h8s48ji2dla58m4706hzg7";
   };
 
+  patches = [ ./darwin.patch ];
+
   buildInputs = [ texinfo ];
 
-  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
-    sed -i 's|#include <malloc.h>|#include <malloc/malloc.h>|' ./man/texinfo2man.c
-  '';
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang
+    "-Wno-implicit-function-declaration";
 
   hardeningDisable = [ "format" ];