From eb1bfefa91ac2528cf302e0d9c6ec8ea8aac2113 Mon Sep 17 00:00:00 2001
From: Wouter den Breejen <uu@denbreejen.net>
Date: Wed, 18 Jul 2007 10:32:20 +0000
Subject: [PATCH] Fixed a /bin/echo reference

svn path=/nixpkgs/trunk/; revision=8995
---
 pkgs/tools/misc/findutils/change_echo_path.patch | 12 ++++++++++++
 pkgs/tools/misc/findutils/default.nix            |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 pkgs/tools/misc/findutils/change_echo_path.patch

diff --git a/pkgs/tools/misc/findutils/change_echo_path.patch b/pkgs/tools/misc/findutils/change_echo_path.patch
new file mode 100644
index 000000000000..5bbd9aea9ac3
--- /dev/null
+++ b/pkgs/tools/misc/findutils/change_echo_path.patch
@@ -0,0 +1,12 @@
+diff -Naur findutils-4.2.30/xargs/xargs.c findutils-4.2.30_new/xargs/xargs.c
+--- findutils-4.2.30/xargs/xargs.c	2007-02-27 11:21:08.000000000 +0100
++++ findutils-4.2.30_new/xargs/xargs.c	2007-07-17 19:02:05.000000000 +0200
+@@ -402,7 +402,7 @@
+   int show_limits = 0;			/* --show-limits */
+   int always_run_command = 1;
+   char *input_file = "-"; /* "-" is stdin */
+-  char *default_cmd = "/bin/echo";
++  char *default_cmd = "echo";
+   int (*read_args) PARAMS ((void)) = read_line;
+   void (*act_on_init_result)(void) = noop;
+   int env_too_big = 0;
diff --git a/pkgs/tools/misc/findutils/default.nix b/pkgs/tools/misc/findutils/default.nix
index afd9458f9a33..69b9b777c4c5 100644
--- a/pkgs/tools/misc/findutils/default.nix
+++ b/pkgs/tools/misc/findutils/default.nix
@@ -7,7 +7,8 @@ stdenv.mkDerivation {
     sha256 = "1x1s0h1gf4hxh6xi6vq336sz8zsh4hvnsslc7607z41l82xrqjrl";
   };
   buildInputs = [coreutils];
-  patches = [./findutils-path.patch]
+  patches = [ ./findutils-path.patch ./change_echo_path.patch ]
+  
     # Note: the dietlibc patch is just to get findutils to compile.
     # The locate command probably won't work though.
     ++ stdenv.lib.optional (stdenv ? isDietLibC) ./dietlibc-hack.patch;