From a9ced90be950063eba1f5f00933dbd1e81c16467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 8 Jan 2010 21:28:30 +0000 Subject: [PATCH] GNU Patch: Use GNU ed and re-enable the tests. svn path=/nixpkgs/branches/stdenv-updates/; revision=19315 --- pkgs/tools/text/gnupatch/default.nix | 14 ++++---------- pkgs/tools/text/gnupatch/setmode.patch | 20 -------------------- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 pkgs/tools/text/gnupatch/setmode.patch 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 {