mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
df42fe1582
All releases between 2.22 and 2.25 are all bugfix releases: - 2.23: http://lists.gnu.org/archive/html/info-gnu/2016-02/msg00000.html - 2.24: http://lists.gnu.org/archive/html/info-gnu/2016-03/msg00004.html - 2.25: http://lists.gnu.org/archive/html/info-gnu/2016-04/msg00010.html
61 lines
1.7 KiB
Nix
61 lines
1.7 KiB
Nix
{ stdenv, fetchurl, pcre, libiconv, perl }:
|
|
|
|
let version = "2.25"; in
|
|
|
|
stdenv.mkDerivation {
|
|
name = "gnugrep-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/grep/grep-${version}.tar.xz";
|
|
sha256 = "0c38b67cnwchwzv4wq2gpz6smkhdxrac2hhssv8f0l04qnx867p2";
|
|
};
|
|
|
|
# Perl is needed for testing
|
|
nativeBuildInputs = [ perl ];
|
|
outputs = [ "out" "info" ]; # the man pages are rather small
|
|
|
|
buildInputs = [ pcre libiconv ];
|
|
|
|
# cygwin: FAIL: multibyte-white-space
|
|
# freebsd: FAIL mb-non-UTF8-performance
|
|
# all platforms: timing sensitivity in long-pattern-perf
|
|
#doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin && !stdenv.isFreeBSD;
|
|
doCheck = false;
|
|
|
|
# On Mac OS X, force use of mkdir -p, since Grep's fallback
|
|
# (./install-sh) is broken.
|
|
preConfigure = ''
|
|
export MKDIR_P="mkdir -p"
|
|
'';
|
|
|
|
# Fix reference to sh in bootstrap-tools, and invoke grep via
|
|
# absolute path rather than looking at argv[0].
|
|
postInstall =
|
|
''
|
|
rm $out/bin/egrep $out/bin/fgrep
|
|
echo "#! /bin/sh" > $out/bin/egrep
|
|
echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep
|
|
echo "#! /bin/sh" > $out/bin/fgrep
|
|
echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep
|
|
chmod +x $out/bin/egrep $out/bin/fgrep
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = http://www.gnu.org/software/grep/;
|
|
description = "GNU implementation of the Unix grep command";
|
|
|
|
longDescription = ''
|
|
The grep command searches one or more input files for lines
|
|
containing a match to a specified pattern. By default, grep
|
|
prints the matching lines.
|
|
'';
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.eelco ];
|
|
platforms = platforms.all;
|
|
};
|
|
|
|
passthru = {inherit pcre;};
|
|
}
|