Merge pull request #18677 from RamKromberg/fix/mlterm
mlterm: fix cairo and multiple other features
This commit is contained in:
commit
98b2411fe3
@ -1,5 +1,8 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, autoconf
|
{ stdenv, fetchurl, pkgconfig, autoconf, makeDesktopItem
|
||||||
, libX11, gdk_pixbuf, cairo, libXft, gtk3, vte, fribidi, libssh2
|
, libX11, gdk_pixbuf, cairo, libXft, gtk3, vte
|
||||||
|
, harfbuzz #substituting glyphs with opentype fonts
|
||||||
|
, fribidi, m17n_lib #bidi and encoding
|
||||||
|
, openssl, libssh2 #build-in ssh
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -13,11 +16,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoconf ];
|
nativeBuildInputs = [ pkgconfig autoconf ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libX11 gdk_pixbuf.dev cairo libXft gtk3 vte fribidi libssh2
|
libX11 gdk_pixbuf.dev cairo libXft gtk3 vte
|
||||||
|
harfbuzz fribidi m17n_lib openssl libssh2
|
||||||
];
|
];
|
||||||
|
|
||||||
|
#bad configure.ac and Makefile.in everywhere
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
sed -ie 's#-L/usr/local/lib -R/usr/local/lib##g' \
|
sed -ie 's;-L/usr/local/lib -R/usr/local/lib;;g' \
|
||||||
xwindow/libtype/Makefile.in \
|
xwindow/libtype/Makefile.in \
|
||||||
main/Makefile.in \
|
main/Makefile.in \
|
||||||
tool/mlfc/Makefile.in \
|
tool/mlfc/Makefile.in \
|
||||||
@ -26,24 +31,69 @@ stdenv.mkDerivation rec {
|
|||||||
xwindow/libotl/Makefile.in
|
xwindow/libotl/Makefile.in
|
||||||
sed -ie 's;cd ..srcdir. && rm -f ...lang..gmo.*;;g' \
|
sed -ie 's;cd ..srcdir. && rm -f ...lang..gmo.*;;g' \
|
||||||
tool/mlconfig/po/Makefile.in.in
|
tool/mlconfig/po/Makefile.in.in
|
||||||
|
#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" " "
|
||||||
'';
|
'';
|
||||||
|
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
|
||||||
|
";
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-x=yes"
|
"--with-x=yes"
|
||||||
"--with-gtk=3.0"
|
"--with-gui=xlib,fb"
|
||||||
"--with-imagelib=gdk-pixbuf"
|
"--with-imagelib=gdk-pixbuf" #or mlimgloader depending on your bugs of choice
|
||||||
"--with-gui=xlib"
|
|
||||||
"--with-type-engines=cairo,xft,xcore"
|
"--with-type-engines=cairo,xft,xcore"
|
||||||
"--enable-ind"
|
"--with-gtk=3.0"
|
||||||
"--enable-fribidi"
|
"--enable-ind" #indic scripts
|
||||||
|
"--enable-fribidi" #bidi scripts
|
||||||
|
"--enable-m17nlib" #character encodings
|
||||||
"--with-tools=mlclient,mlconfig,mlcc,mlterm-menu,mlimgloader,registobmp,mlfc"
|
"--with-tools=mlclient,mlconfig,mlcc,mlterm-menu,mlimgloader,registobmp,mlfc"
|
||||||
"--disable-utmp"
|
#mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core
|
||||||
|
#and configuring ~/.mlterm/key correctly.
|
||||||
|
] ++ stdenv.lib.optional (libssh2 == null) [
|
||||||
|
"--disable-ssh2"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p "$out/share/icons/hicolor/scalable/apps"
|
||||||
|
cp contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg"
|
||||||
|
|
||||||
|
mkdir -p "$out/share/icons/hicolor/48x48/apps"
|
||||||
|
cp contrib/icon/mlterm-icon-gnome2.png "$out/share/icons/hicolor/48x48/apps/mlterm.png"
|
||||||
|
|
||||||
|
mkdir -p "$out/share/applications"
|
||||||
|
cp $desktopItem/share/applications/* $out/share/applications
|
||||||
|
'';
|
||||||
|
|
||||||
|
desktopItem = makeDesktopItem rec {
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://sourceforge.net/projects/mlterm/;
|
homepage = https://sourceforge.net/projects/mlterm/;
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd2;
|
||||||
maintainers = with maintainers; [ vrthra ];
|
maintainers = with maintainers; [ vrthra ramkromberg ];
|
||||||
platforms = with platforms; linux;
|
platforms = with platforms; linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -15815,7 +15815,9 @@ in
|
|||||||
xterm = callPackage ../applications/misc/xterm { };
|
xterm = callPackage ../applications/misc/xterm { };
|
||||||
|
|
||||||
mlterm = callPackage ../applications/misc/mlterm {
|
mlterm = callPackage ../applications/misc/mlterm {
|
||||||
vte = gnome3.vte_290;
|
vte = gnome3.vte;
|
||||||
|
libssh2 = null;
|
||||||
|
openssl = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
finalterm = callPackage ../applications/misc/finalterm { };
|
finalterm = callPackage ../applications/misc/finalterm { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user