2016-09-16 22:57:59 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, autoconf, makeDesktopItem
|
2019-05-22 13:03:39 +02:00
|
|
|
, libX11, gdk-pixbuf, cairo, libXft, gtk3, vte
|
2016-09-16 22:57:59 +02:00
|
|
|
, harfbuzz #substituting glyphs with opentype fonts
|
|
|
|
, fribidi, m17n_lib #bidi and encoding
|
|
|
|
, openssl, libssh2 #build-in ssh
|
2020-08-13 01:04:46 +02:00
|
|
|
, fcitx, ibus, uim #IME
|
2020-08-12 20:59:25 +02:00
|
|
|
, wrapGAppsHook #color picker in mlconfig
|
2016-09-16 16:40:19 +02:00
|
|
|
}:
|
2016-06-11 20:54:31 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "mlterm";
|
2020-05-06 04:57:35 +02:00
|
|
|
version = "3.9.0";
|
2016-06-11 20:54:31 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://sourceforge/project/mlterm/01release/${pname}-${version}/${pname}-${version}.tar.gz";
|
2020-05-06 04:57:35 +02:00
|
|
|
sha256 = "17h6j4nmbyvsx2shm8mqm7smzq9i7mbqxjw19c2m0rhf5yzqhr3k";
|
2016-06-11 20:54:31 +02:00
|
|
|
};
|
|
|
|
|
2020-08-12 20:59:25 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig autoconf wrapGAppsHook ];
|
2016-09-16 16:40:19 +02:00
|
|
|
buildInputs = [
|
2019-05-22 13:03:39 +02:00
|
|
|
libX11 gdk-pixbuf.dev cairo libXft gtk3 vte
|
2016-09-16 22:57:59 +02:00
|
|
|
harfbuzz fribidi m17n_lib openssl libssh2
|
2020-08-13 01:04:46 +02:00
|
|
|
fcitx ibus uim
|
2016-09-16 16:40:19 +02:00
|
|
|
];
|
2016-06-11 20:54:31 +02:00
|
|
|
|
2016-09-16 22:57:59 +02:00
|
|
|
#bad configure.ac and Makefile.in everywhere
|
2016-06-11 20:54:31 +02:00
|
|
|
preConfigure = ''
|
2016-09-16 22:57:59 +02:00
|
|
|
sed -ie 's;-L/usr/local/lib -R/usr/local/lib;;g' \
|
2016-06-11 20:54:31 +02:00
|
|
|
main/Makefile.in \
|
2016-09-16 16:40:19 +02:00
|
|
|
tool/mlfc/Makefile.in \
|
2016-06-11 20:54:31 +02:00
|
|
|
tool/mlimgloader/Makefile.in \
|
2016-09-16 16:40:19 +02:00
|
|
|
tool/mlconfig/Makefile.in \
|
2017-02-08 04:35:52 +01:00
|
|
|
uitoolkit/libtype/Makefile.in \
|
|
|
|
uitoolkit/libotl/Makefile.in
|
2016-09-16 16:40:19 +02:00
|
|
|
sed -ie 's;cd ..srcdir. && rm -f ...lang..gmo.*;;g' \
|
|
|
|
tool/mlconfig/po/Makefile.in.in
|
2016-09-16 22:57:59 +02:00
|
|
|
#utmp and mlterm-fb
|
|
|
|
substituteInPlace configure.in \
|
|
|
|
--replace "-m 2755 -g utmp" " " \
|
|
|
|
--replace "-m 4755 -o root" " "
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "-m 2755 -g utmp" " " \
|
|
|
|
--replace "-m 4755 -o root" " "
|
2016-06-11 20:54:31 +02:00
|
|
|
'';
|
2016-09-16 22:57:59 +02:00
|
|
|
NIX_LDFLAGS = "
|
|
|
|
-L${stdenv.cc.cc.lib}/lib
|
|
|
|
-lX11 -lgdk_pixbuf-2.0 -lcairo -lfontconfig -lfreetype -lXft
|
|
|
|
-lvte-2.91 -lgtk-3 -lharfbuzz -lfribidi -lm17n
|
|
|
|
" + stdenv.lib.optionalString (openssl != null) "
|
|
|
|
-lcrypto
|
|
|
|
" + stdenv.lib.optionalString (libssh2 != null) "
|
|
|
|
-lssh2
|
|
|
|
";
|
2016-06-11 20:54:31 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
2016-09-16 16:40:19 +02:00
|
|
|
"--with-x=yes"
|
2016-09-16 22:57:59 +02:00
|
|
|
"--with-gui=xlib,fb"
|
|
|
|
"--with-imagelib=gdk-pixbuf" #or mlimgloader depending on your bugs of choice
|
2016-06-11 20:54:31 +02:00
|
|
|
"--with-type-engines=cairo,xft,xcore"
|
2016-09-16 22:57:59 +02:00
|
|
|
"--with-gtk=3.0"
|
|
|
|
"--enable-ind" #indic scripts
|
|
|
|
"--enable-fribidi" #bidi scripts
|
|
|
|
"--enable-m17nlib" #character encodings
|
2016-09-16 16:40:19 +02:00
|
|
|
"--with-tools=mlclient,mlconfig,mlcc,mlterm-menu,mlimgloader,registobmp,mlfc"
|
2016-09-16 22:57:59 +02:00
|
|
|
#mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core
|
|
|
|
#and configuring ~/.mlterm/key correctly.
|
2019-11-20 10:17:54 +01:00
|
|
|
] ++ stdenv.lib.optional (libssh2 == null) "--disable-ssh2";
|
2016-06-11 20:54:31 +02:00
|
|
|
|
2016-09-16 22:57:59 +02:00
|
|
|
postInstall = ''
|
2017-02-08 04:35:52 +01:00
|
|
|
install -D contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg"
|
|
|
|
install -D contrib/icon/mlterm-icon-gnome2.png "$out/share/icons/hicolor/48x48/apps/mlterm.png"
|
|
|
|
install -D -t $out/share/applications $desktopItem/share/applications/*
|
2016-09-16 22:57:59 +02:00
|
|
|
'';
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
desktopItem = makeDesktopItem {
|
2016-09-16 22:57:59 +02:00
|
|
|
name = "mlterm";
|
|
|
|
exec = "mlterm %U";
|
|
|
|
icon = "mlterm";
|
|
|
|
type = "Application";
|
|
|
|
comment = "Terminal emulator";
|
|
|
|
desktopName = "mlterm";
|
|
|
|
genericName = "Terminal emulator";
|
|
|
|
categories = stdenv.lib.concatStringsSep ";" [
|
|
|
|
"Application" "System" "TerminalEmulator"
|
|
|
|
];
|
|
|
|
startupNotify = "false";
|
|
|
|
};
|
|
|
|
|
2016-06-11 20:54:31 +02:00
|
|
|
meta = with stdenv.lib; {
|
2019-11-28 19:36:45 +01:00
|
|
|
description = "Multi Lingual TERMinal emulator on X11";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://mlterm.sourceforge.net/";
|
2019-11-28 19:36:45 +01:00
|
|
|
license = licenses.bsd3;
|
2016-09-16 22:57:59 +02:00
|
|
|
maintainers = with maintainers; [ vrthra ramkromberg ];
|
2016-06-13 03:36:27 +02:00
|
|
|
platforms = with platforms; linux;
|
2016-06-11 20:54:31 +02:00
|
|
|
};
|
|
|
|
}
|