diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix index 40614be8ea9..c7307762353 100644 --- a/pkgs/tools/text/gnupatch/default.nix +++ b/pkgs/tools/text/gnupatch/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl, ed }: stdenv.mkDerivation rec { name = "patch-2.6.1"; @@ -8,9 +8,9 @@ stdenv.mkDerivation rec { sha256 = "1fc1jyq80nswkf492fiqdbl2bhvlw2wb44ghqlfd3zngx4qkfmni"; }; - # Fails on armv5tel-linux at least, maybe on more platforms - # Some tests require 'ed', additionally. - doCheck = false; + buildInputs = (stdenv.lib.optional doCheck ed); + + doCheck = true; meta = { description = "GNU Patch, a program to apply differences to files"; @@ -29,9 +29,3 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.all; }; } - -# XXX: These Darwin hacks were useful with 2.5.4; assuming they're no -# longer useful. -# -# patches = if stdenv.isDarwin then [./setmode.patch] else []; -#} // (if stdenv.isDarwin then { ac_cv_exeext = "" ; } else {} ) ) diff --git a/pkgs/tools/text/gnupatch/setmode.patch b/pkgs/tools/text/gnupatch/setmode.patch deleted file mode 100644 index 83b7022e18d..00000000000 --- a/pkgs/tools/text/gnupatch/setmode.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -rc patch-2.5.4-orig/pch.c patch-2.5.4/pch.c -*** patch-2.5.4-orig/pch.c Mon Aug 30 08:20:08 1999 ---- patch-2.5.4/pch.c Fri Jul 14 13:11:26 2006 -*************** -*** 105,111 **** - if (!filename || !*filename || strEQ (filename, "-")) - { - file_offset stdin_pos; -! #if HAVE_SETMODE - if (binary_transput) - { - if (isatty (STDIN_FILENO)) ---- 105,111 ---- - if (!filename || !*filename || strEQ (filename, "-")) - { - file_offset stdin_pos; -! #if 0 && HAVE_SETMODE - if (binary_transput) - { - if (isatty (STDIN_FILENO)) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3d7031fff8a..109724fe53e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -737,7 +737,7 @@ let }); gnupatch = useFromStdenv "patch" (import ../tools/text/gnupatch { - inherit fetchurl stdenv; + inherit fetchurl stdenv ed; }); gnupg = import ../tools/security/gnupg {