1{ stdenv, fetchFromGitHub, python, perl, intltool, flex, autoreconfHook, 2texinfo, libiconv }: 3 4stdenv.mkDerivation rec { 5 name = "recode-3.7-2fd838565"; 6 7 src = fetchFromGitHub { 8 owner = "pinard"; 9 repo = "Recode"; 10 rev = "2fd8385658e5a08700e3b916053f6680ff85fdbd"; 11 sha256 = "06vyjqaraamcc5vka66mlvxj27ihccqc74aymv2wn8nphr2rhh03"; 12 }; 13 14 nativeBuildInputs = [ python perl intltool flex texinfo autoreconfHook libiconv ]; 15 16 preAutoreconf = '' 17 # fix build with new automake, https://bugs.gentoo.org/show_bug.cgi?id=419455 18 substituteInPlace Makefile.am --replace "ACLOCAL = ./aclocal.sh @ACLOCAL@" "" 19 sed -i '/^AM_C_PROTOTYPES/d' configure.ac 20 substituteInPlace src/Makefile.am --replace "ansi2knr" "" 21 '' 22 + stdenv.lib.optionalString stdenv.isDarwin '' 23 export LDFLAGS=-lintl 24 ''; 25 26 #doCheck = true; # doesn't work yet 27 28 preCheck = '' 29 checkFlagsArray=(CPPFLAGS="-I../lib" LDFLAGS="-L../src/.libs -Wl,-rpath=../src/.libs") 30 ''; 31 32 meta = { 33 homepage = "http://www.gnu.org/software/recode/"; 34 description = "Converts files between various character sets and usages"; 35 platforms = stdenv.lib.platforms.unix; 36 license = stdenv.lib.licenses.gpl2Plus; 37 maintainers = with stdenv.lib.maintainers; [ jcumming ]; 38 }; 39}