mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
GNU grep: Fix build on non-GNU platforms.
svn path=/nixpkgs/branches/stdenv-updates/; revision=24627
This commit is contained in:
parent
e729128faa
commit
c317c7f4bd
2 changed files with 15 additions and 5 deletions
|
@ -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;};
|
||||
|
|
|
@ -666,7 +666,13 @@ let
|
|||
inherit (gtkLibs) gtk glib;
|
||||
};
|
||||
|
||||
gnugrep = callPackage ../tools/text/gnugrep { };
|
||||
gnugrep =
|
||||
# Use libiconv only on non-GNU platforms (we can't test with
|
||||
# `stdenv ? glibc' at this point.)
|
||||
let gnu = stdenv.isLinux; in
|
||||
callPackage ../tools/text/gnugrep {
|
||||
libiconv = if gnu then null else libiconv;
|
||||
};
|
||||
|
||||
gnupatch = callPackage ../tools/text/gnupatch { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue