2009-09-16 19:52:54 +02:00
|
|
|
{ stdenv, fetchurl, lib, pkgconfig, glib, ncurses, e2fsprogs, gpm
|
2009-09-16 19:26:19 +02:00
|
|
|
, libX11, libXt, shebangfix, perl, zip, unzip, gettext, slang}:
|
2008-01-23 10:58:07 +01:00
|
|
|
|
2008-01-28 20:49:59 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2008-01-23 10:58:07 +01:00
|
|
|
name = "mc-4.6.1";
|
|
|
|
src = fetchurl {
|
2008-01-28 20:49:59 +01:00
|
|
|
url = "http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/${name}.tar.gz";
|
|
|
|
sha256 = "0zly25mwdn84s0wqx9mzyqi177mm828716nv1n6a4a5cm8yv0sh8";
|
2008-01-23 10:58:07 +01:00
|
|
|
};
|
2009-09-16 19:52:54 +02:00
|
|
|
buildInputs = [pkgconfig glib ncurses libX11 libXt
|
|
|
|
shebangfix perl zip unzip slang gettext e2fsprogs gpm];
|
|
|
|
|
|
|
|
# Fix the paths to the terminfo files. Otherwise mc has no colors
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" configure
|
|
|
|
'';
|
2009-09-16 19:08:33 +02:00
|
|
|
configureFlags = "--enable-charset";
|
|
|
|
|
|
|
|
# Stole some patches from LFS which fix some nasty bugs
|
|
|
|
patches = [ ./mc-4.6.1-bash32-1.patch ./mc-4.6.1-debian_fixes-1.patch ];
|
|
|
|
|
|
|
|
# Required to enable the Debian UTF8 fixes
|
|
|
|
CPPFLAGS = "-DUTF8";
|
|
|
|
|
|
|
|
# The Debian UTF8 patch expects that the documentation is in UTF8 format,
|
|
|
|
# therefore we have to convert them (I stole this also from LFS)
|
|
|
|
|
|
|
|
postBuildPhase = ''
|
|
|
|
for file in lib/mc.hint{,.es,.it,.nl} doc/{es,it}/mc.hlp.*
|
|
|
|
do
|
|
|
|
iconv -f ISO-8859-1 -t UTF-8 $file > $file.utf8 &&
|
|
|
|
mv $file.utf8 $file
|
|
|
|
done &&
|
|
|
|
for file in lib/mc.hint{.cs,.hu,.pl} doc/{hu,pl}/mc.hlp.*
|
|
|
|
do
|
|
|
|
iconv -f ISO-8859-2 -t UTF-8 $file > $file.utf8 &&
|
|
|
|
mv $file.utf8 $file
|
|
|
|
done &&
|
|
|
|
for file in lib/mc.hint.sr doc/sr/mc.hlp.sr
|
|
|
|
do
|
|
|
|
iconv -f ISO-8859-5 -t UTF-8 $file > $file.utf8 &&
|
|
|
|
mv $file.utf8 $file
|
|
|
|
done &&
|
|
|
|
for file in doc/ru/mc.hlp.ru lib/mc.hint.ru
|
|
|
|
do
|
|
|
|
iconv -f KOI8-R -t UTF-8 $file > $file.utf8 &&
|
|
|
|
mv $file.utf8 $file
|
|
|
|
done &&
|
|
|
|
|
|
|
|
iconv -f KOI8-U -t UTF-8 lib/mc.hint.uk > lib/mc.hint.uk.utf8 &&
|
|
|
|
mv lib/mc.hint.uk.utf8 lib/mc.hint.uk &&
|
|
|
|
iconv -f BIG5 -t UTF-8 lib/mc.hint.zh > lib/mc.hint.zh.utf8 &&
|
2009-09-16 19:26:19 +02:00
|
|
|
mv lib/mc.hint.zh.utf8 lib/mc.hint.zh
|
|
|
|
# foo
|
2009-09-16 19:08:33 +02:00
|
|
|
'';
|
|
|
|
|
2008-02-05 10:34:39 +01:00
|
|
|
makeFlags = "UNZIP=unzip";
|
|
|
|
postInstall = ''
|
|
|
|
find $out -iname "*.pl" | xargs shebangfix;
|
|
|
|
'';
|
2008-01-28 20:49:59 +01:00
|
|
|
meta = {
|
2008-02-05 10:34:39 +01:00
|
|
|
description = "File Manager and User Shell for the GNU Project";
|
|
|
|
homepage = http://www.ibiblio.org/mc;
|
2009-09-16 19:08:33 +02:00
|
|
|
maintainers = [ lib.maintainers.sander ];
|
2008-01-28 20:49:59 +01:00
|
|
|
};
|
2008-01-23 10:58:07 +01:00
|
|
|
}
|