summary refs log tree commit diff
path: root/pkgs/tools/text/gnupatch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-01-08 21:28:30 +0000
committerLudovic Courtès <ludo@gnu.org>2010-01-08 21:28:30 +0000
commita9ced90be950063eba1f5f00933dbd1e81c16467 (patch)
treeb672a74525b58cf5240ce027ebc8c1d645c4fb0f /pkgs/tools/text/gnupatch
parent792eeca654d6baae8c902f47a69b7c50a62b7db5 (diff)
downloadnixlib-a9ced90be950063eba1f5f00933dbd1e81c16467.tar
nixlib-a9ced90be950063eba1f5f00933dbd1e81c16467.tar.gz
nixlib-a9ced90be950063eba1f5f00933dbd1e81c16467.tar.bz2
nixlib-a9ced90be950063eba1f5f00933dbd1e81c16467.tar.lz
nixlib-a9ced90be950063eba1f5f00933dbd1e81c16467.tar.xz
nixlib-a9ced90be950063eba1f5f00933dbd1e81c16467.tar.zst
nixlib-a9ced90be950063eba1f5f00933dbd1e81c16467.zip
GNU Patch: Use GNU ed and re-enable the tests.
svn path=/nixpkgs/branches/stdenv-updates/; revision=19315
Diffstat (limited to 'pkgs/tools/text/gnupatch')
-rw-r--r--pkgs/tools/text/gnupatch/default.nix14
-rw-r--r--pkgs/tools/text/gnupatch/setmode.patch20
2 files changed, 4 insertions, 30 deletions
diff --git a/pkgs/tools/text/gnupatch/default.nix b/pkgs/tools/text/gnupatch/default.nix
index 40614be8ea90..c73077623530 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 83b7022e18db..000000000000
--- 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))