summary refs log tree commit diff
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-11-09 13:12:31 +0000
committerLudovic Courtès <ludo@gnu.org>2010-11-09 13:12:31 +0000
commitc317c7f4bdc55d5ba2b3efc3818ed42834a638e9 (patch)
treec552c9b2f265224bdba598986e0409b325afa025 /pkgs/tools/text
parente729128faab4a59ff77fb2707357c5b51b0eeac2 (diff)
GNU grep: Fix build on non-GNU platforms.
svn path=/nixpkgs/branches/stdenv-updates/; revision=24627
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/gnugrep/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix
index 3c21bfd2f254c..36012dc6f507b 100644
--- a/pkgs/tools/text/gnugrep/default.nix
+++ b/pkgs/tools/text/gnugrep/default.nix
@@ -1,16 +1,17 @@
-{stdenv, fetchurl, pcre}:
+{ stdenv, fetchurl, pcre, libiconv ? null}:
 
 let version = "2.7"; in
 
 stdenv.mkDerivation {
   name = "gnugrep-${version}";
-  
+
   src = fetchurl {
     url = "mirror://gnu/grep/grep-${version}.tar.gz";
     sha256 = "1b8vksfd1ngharac3ygaqim3lrf0yqap992sg0vfm7572l88655d";
   };
-  
-  buildInputs = [pcre];
+
+  buildInputs = [ pcre ]
+    ++ (stdenv.lib.optional (libiconv != null) libiconv);
 
   doCheck = if stdenv.isDarwin then false else true;
 
@@ -31,6 +32,9 @@ stdenv.mkDerivation {
     '';
 
     license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.all;
   };
 
   passthru = {inherit pcre;};