nixpkgs/pkgs/tools/text/recode/default.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, python, perl, intltool, flex, autoreconfHook,
2015-06-23 01:00:44 +01:00
texinfo, libiconv }:
2013-03-05 22:30:46 +00:00
stdenv.mkDerivation rec {
name = "recode-3.7-2fd838565";
src = fetchFromGitHub {
owner = "pinard";
repo = "Recode";
2013-03-05 22:30:46 +00:00
rev = "2fd8385658e5a08700e3b916053f6680ff85fdbd";
sha256 = "06vyjqaraamcc5vka66mlvxj27ihccqc74aymv2wn8nphr2rhh03";
};
nativeBuildInputs = [ python perl intltool flex texinfo autoreconfHook libiconv ];
2013-03-06 09:07:54 +00:00
preAutoreconf = ''
# fix build with new automake, https://bugs.gentoo.org/show_bug.cgi?id=419455
substituteInPlace Makefile.am --replace "ACLOCAL = ./aclocal.sh @ACLOCAL@" ""
sed -i '/^AM_C_PROTOTYPES/d' configure.ac
substituteInPlace src/Makefile.am --replace "ansi2knr" ""
2014-05-16 22:28:19 +01:00
''
+ stdenv.lib.optionalString stdenv.isDarwin ''
export LDFLAGS=-lintl
'';
#doCheck = true; # doesn't work yet
2013-03-06 09:07:54 +00:00
preCheck = ''
checkFlagsArray=(CPPFLAGS="-I../lib" LDFLAGS="-L../src/.libs -Wl,-rpath=../src/.libs")
2013-03-06 09:07:54 +00:00
'';
meta = {
homepage = "http://www.gnu.org/software/recode/";
description = "Converts files between various character sets and usages";
platforms = stdenv.lib.platforms.unix;
2013-03-05 22:30:46 +00:00
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [ jcumming ];
};
}