diff options
Diffstat (limited to 'pkgs/tools/text/recode/default.nix')
-rw-r--r-- | pkgs/tools/text/recode/default.nix | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/pkgs/tools/text/recode/default.nix b/pkgs/tools/text/recode/default.nix index f3f8520a918d..17a63799ac4e 100644 --- a/pkgs/tools/text/recode/default.nix +++ b/pkgs/tools/text/recode/default.nix @@ -1,52 +1,29 @@ -{ stdenv, fetchurl, autoconf, automake, libtool, gettext, perl, flex }: +# XXX: this may need -liconv on non-glibc systems.. -let - asIfPatch = ./recode-3.6-as-if.patch; +{stdenv, fetchgit, python, perl}: - gettextPatch = ./recode-3.6-gettextfix.diff; +stdenv.mkDerivation rec { + name = "recode-3.7-pff85fdbd"; - debianPatch = fetchurl { - url = "http://ftp.de.debian.org/debian/pool/main/r/recode/recode_3.6-17.diff.gz"; - sha256 = "1iwrggw64faf6lghgm9nzh64vh8m8jd79h6pxqgrmfmplzrzpzjp"; + src = fetchgit { + url = https://github.com/pinard/Recode.git; + rev = "2fd8385658e5a08700e3b916053f6680ff85fdbd"; + sha256 = "1xhlfmqld6af16l444jli9crj9brym2jihg1n6lkxh2gar68f5l7"; }; -in -stdenv.mkDerivation { - name = "recode-3.6"; - src = fetchurl { - url = "ftp://ftp.halifax.rwth-aachen.de/gnu/recode/recode-3.6.tar.gz"; - sha256 = "1krgjqfhsxcls4qvxhagc45sm1sd0w69jm81nwm0bip5z3rs9rp3"; - }; - - buildInputs = [ autoconf automake libtool gettext perl flex ]; - - patchPhase = '' - patch -Np1 -i ${gettextPatch} - patch -Np1 -i ${asIfPatch} - gunzip <${debianPatch} | patch -Np1 -i - - sed -i '1i#include <stdlib.h>' src/argmatch.c + buildInputs = [ python perl ]; - # fix build with new automake, https://bugs.gentoo.org/show_bug.cgi?id=419455 - rm acinclude.m4 - substituteInPlace Makefile.am --replace "ACLOCAL = ./aclocal.sh @ACLOCAL@" "" - sed -i '/^AM_C_PROTOTYPES/d' configure.in - substituteInPlace src/Makefile.am --replace "ansi2knr" "" + doCheck = true; - autoreconf -i - libtoolize + preCheck = '' + checkFlagsArray=(LDFLAGS="-L../src/.libs -Wl,-rpath=../src/.libs") ''; - configureFlags = "--without-included-gettext"; - - doCheck = true; - meta = { homepage = "http://www.gnu.org/software/recode/"; description = "Converts files between various character sets and usages"; - - license = "GPLv2+"; - platforms = stdenv.lib.platforms.unix; - maintainers = []; + license = stdenv.lib.licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ jcumming ]; }; } |