summary refs log tree commit diff
path: root/pkgs/tools/text/replace
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2008-02-21 14:01:19 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2008-02-21 14:01:19 +0000
commitc9f2559e30c07065d727a9be6e65eaa53a4e85d7 (patch)
tree3786ff6b95ebfb2b1b23e18ecb77d5e939d09c07 /pkgs/tools/text/replace
parent289a6dd48aec18e67ff46e6133201b2e312c1a94 (diff)
downloadnixpkgs-c9f2559e30c07065d727a9be6e65eaa53a4e85d7.tar
nixpkgs-c9f2559e30c07065d727a9be6e65eaa53a4e85d7.tar.gz
nixpkgs-c9f2559e30c07065d727a9be6e65eaa53a4e85d7.tar.bz2
nixpkgs-c9f2559e30c07065d727a9be6e65eaa53a4e85d7.tar.lz
nixpkgs-c9f2559e30c07065d727a9be6e65eaa53a4e85d7.tar.xz
nixpkgs-c9f2559e30c07065d727a9be6e65eaa53a4e85d7.tar.zst
nixpkgs-c9f2559e30c07065d727a9be6e65eaa53a4e85d7.zip
* Don't include <malloc.h>, it doesn't exist on all platforms.
svn path=/nixpkgs/branches/stdenv-updates-merge/; revision=10803
Diffstat (limited to 'pkgs/tools/text/replace')
-rw-r--r--pkgs/tools/text/replace/default.nix4
-rw-r--r--pkgs/tools/text/replace/malloc.patch13
2 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/tools/text/replace/default.nix b/pkgs/tools/text/replace/default.nix
index ca96309e40e..85e2fe2caca 100644
--- a/pkgs/tools/text/replace/default.nix
+++ b/pkgs/tools/text/replace/default.nix
@@ -1,6 +1,6 @@
 {stdenv, fetchurl}:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation ({
   name = "replace-2.24";
 
   src = fetchurl {
@@ -16,4 +16,4 @@ stdenv.mkDerivation {
     homepage = http://replace.richardlloyd.org.uk/;
     description = "A tool to replace verbatim strings";
   };
-}
+} // (if stdenv.system == "i686-darwin" then {patches = [./malloc.patch];} else {}))
diff --git a/pkgs/tools/text/replace/malloc.patch b/pkgs/tools/text/replace/malloc.patch
new file mode 100644
index 00000000000..1ee95c4bae1
--- /dev/null
+++ b/pkgs/tools/text/replace/malloc.patch
@@ -0,0 +1,13 @@
+diff -rc replace-2.24-orig/replace.h replace-2.24/replace.h
+*** replace-2.24-orig/replace.h	2004-10-07 15:15:06.000000000 +0200
+--- replace-2.24/replace.h	2008-02-21 14:57:47.000000000 +0100
+***************
+*** 11,17 ****
+  #include <ctype.h>
+  #include <unistd.h>
+  #include <string.h>
+- #include <malloc.h>
+  #include <sys/stat.h>
+  #include <ftw.h>
+  #include <utime.h>
+--- 11,16 ----