2021-01-17 12:17:16 +03:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, zlib, pcre, xorg, libjpeg, libtiff, libpng, gtk2, libpaper, makeWrapper, ghostscript }:
|
2018-03-31 14:13:48 +03:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ted";
|
|
|
|
version = "2.23";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 15:41:18 +03:00
|
|
|
url = "http://ftp.nluug.nl/pub/editors/${pname}/${pname}-${version}.src.tar.gz";
|
2018-03-31 14:13:48 +03:00
|
|
|
sha256 = "0v1ipynyjklb3chd1vq26a21sjjg66sir57gi2kkrbwnpk195a9z";
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir pkgconfig-append
|
|
|
|
pushd pkgconfig-append
|
|
|
|
|
|
|
|
# ted looks for libtiff, not libtiff-4 in its pkg-config invokations
|
|
|
|
cp ${libtiff.dev}/lib/pkgconfig/libtiff-4.pc libtiff.pc
|
|
|
|
|
|
|
|
# ted needs a libpaper pkg-config file
|
|
|
|
cat > libpaper.pc << EOF
|
|
|
|
prefix=${libpaper}
|
|
|
|
libdir=${libpaper}/lib
|
|
|
|
includedir=${libpaper}/include
|
|
|
|
exec_prefix=\''${prefix}
|
|
|
|
|
|
|
|
Name: libpaper
|
|
|
|
Version: ${libpaper.version}
|
|
|
|
Description: ${libpaper.meta.description}
|
|
|
|
Libs: -L\''${libdir} -lpaper
|
|
|
|
Cflags: -I\''${includedir}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH="$PWD:$PKG_CONFIG_PATH"
|
|
|
|
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "CONFIGURE_OPTIONS=--with-GTK" "CONFIGURE_OPTIONS+=--prefix=$(out)" "compile.shared" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
make tedPackage/makefile
|
|
|
|
pushd tedPackage
|
|
|
|
substituteInPlace makefile --replace /usr ""
|
|
|
|
make PKGDESTDIR=$out datadir
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd $out/share/Ted/examples
|
|
|
|
for f in rtf2*.sh
|
|
|
|
do
|
2021-01-15 12:19:50 +03:00
|
|
|
makeWrapper "$PWD/$f" "$out/bin/$f" --prefix PATH : $out/bin:${lib.makeBinPath [ ghostscript ]}
|
2018-03-31 14:13:48 +03:00
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
cp -v Ted/Ted $out/bin
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-05-12 08:46:31 +03:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
|
|
buildInputs = [ zlib pcre xorg.xlibsWrapper xorg.libXpm libjpeg libtiff libpng gtk2 libpaper ];
|
2018-03-31 14:13:48 +03:00
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2020-10-26 07:08:40 +03:00
|
|
|
description = "An easy rich text processor";
|
2018-03-31 14:13:48 +03:00
|
|
|
longDescription = ''
|
|
|
|
Ted is a text processor running under X Windows on Unix/Linux systems.
|
|
|
|
Ted was developed as a standard easy light weight word processor, having
|
|
|
|
the role of Wordpad on MS-Windows. Since then, Ted has evolved to a real
|
|
|
|
word processor. It still has the same easy appearance and the same speed
|
|
|
|
as the original. The possibility to type a letter, a note or a report
|
|
|
|
with a simple light weight program on a Unix/Linux machine is clearly
|
|
|
|
missing. Ted was made to make it possible to edit rich text documents on
|
|
|
|
Unix/Linux in a wysiwyg way. RTF files from Ted are fully compatible with
|
|
|
|
MS-Word. Additionally, Ted also is an RTF to PostScript and an RTF to
|
|
|
|
Acrobat PDF converter.
|
|
|
|
'';
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://nllgg.nl/Ted/";
|
2018-03-31 14:13:48 +03:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
maintainers = with maintainers; [ obadz ];
|
|
|
|
};
|
|
|
|
}
|