mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
Merge pull request #102226 from Atemu/mlterm-darwin
mlterm: darwin support
This commit is contained in:
commit
799f0cf9a3
@ -1,10 +1,11 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, autoconf, makeDesktopItem
|
{ stdenv, lib, fetchurl, pkgconfig, autoconf, makeDesktopItem
|
||||||
, libX11, gdk-pixbuf, cairo, libXft, gtk3, vte
|
, libX11, gdk-pixbuf, cairo, libXft, gtk3, vte
|
||||||
, harfbuzz #substituting glyphs with opentype fonts
|
, harfbuzz #substituting glyphs with opentype fonts
|
||||||
, fribidi, m17n_lib #bidi and encoding
|
, fribidi, m17n_lib #bidi and encoding
|
||||||
, openssl, libssh2 #build-in ssh
|
, openssl, libssh2 #build-in ssh
|
||||||
, fcitx, ibus, uim #IME
|
, fcitx, ibus, uim #IME
|
||||||
, wrapGAppsHook #color picker in mlconfig
|
, wrapGAppsHook #color picker in mlconfig
|
||||||
|
, Cocoa #Darwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -18,9 +19,25 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoconf wrapGAppsHook ];
|
nativeBuildInputs = [ pkgconfig autoconf wrapGAppsHook ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libX11 gdk-pixbuf.dev cairo libXft gtk3 vte
|
libX11
|
||||||
harfbuzz fribidi m17n_lib openssl libssh2
|
gdk-pixbuf.dev
|
||||||
fcitx ibus uim
|
cairo
|
||||||
|
libXft
|
||||||
|
gtk3
|
||||||
|
harfbuzz
|
||||||
|
fribidi
|
||||||
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
|
# need linker magic, not adapted for Darwin yet
|
||||||
|
openssl
|
||||||
|
libssh2
|
||||||
|
|
||||||
|
# Not supported on Darwin
|
||||||
|
vte
|
||||||
|
m17n_lib
|
||||||
|
|
||||||
|
fcitx
|
||||||
|
ibus
|
||||||
|
uim
|
||||||
];
|
];
|
||||||
|
|
||||||
#bad configure.ac and Makefile.in everywhere
|
#bad configure.ac and Makefile.in everywhere
|
||||||
@ -42,34 +59,41 @@ stdenv.mkDerivation rec {
|
|||||||
--replace "-m 2755 -g utmp" " " \
|
--replace "-m 2755 -g utmp" " " \
|
||||||
--replace "-m 4755 -o root" " "
|
--replace "-m 4755 -o root" " "
|
||||||
'';
|
'';
|
||||||
NIX_LDFLAGS = "
|
NIX_LDFLAGS = lib.optionalString (!stdenv.isDarwin) "
|
||||||
-L${stdenv.cc.cc.lib}/lib
|
-L${stdenv.cc.cc.lib}/lib
|
||||||
-lX11 -lgdk_pixbuf-2.0 -lcairo -lfontconfig -lfreetype -lXft
|
-lX11 -lgdk_pixbuf-2.0 -lcairo -lfontconfig -lfreetype -lXft
|
||||||
-lvte-2.91 -lgtk-3 -lharfbuzz -lfribidi -lm17n
|
-lvte-2.91 -lgtk-3 -lharfbuzz -lfribidi -lm17n
|
||||||
" + stdenv.lib.optionalString (openssl != null) "
|
" + lib.optionalString (openssl != null) "
|
||||||
-lcrypto
|
-lcrypto
|
||||||
" + stdenv.lib.optionalString (libssh2 != null) "
|
" + lib.optionalString (libssh2 != null) "
|
||||||
-lssh2
|
-lssh2
|
||||||
";
|
";
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-x=yes"
|
|
||||||
"--with-gui=xlib,fb"
|
|
||||||
"--with-imagelib=gdk-pixbuf" #or mlimgloader depending on your bugs of choice
|
"--with-imagelib=gdk-pixbuf" #or mlimgloader depending on your bugs of choice
|
||||||
"--with-type-engines=cairo,xft,xcore"
|
"--with-type-engines=cairo,xft,xcore"
|
||||||
"--with-gtk=3.0"
|
"--with-gtk=3.0"
|
||||||
"--enable-ind" #indic scripts
|
"--enable-ind" #indic scripts
|
||||||
"--enable-fribidi" #bidi 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"
|
||||||
#mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core
|
#mlterm-menu and mlconfig depend on enabling gnome3.at-spi2-core
|
||||||
#and configuring ~/.mlterm/key correctly.
|
#and configuring ~/.mlterm/key correctly.
|
||||||
] ++ stdenv.lib.optional (libssh2 == null) "--disable-ssh2";
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
|
"--with-x=yes"
|
||||||
|
"--with-gui=xlib,fb"
|
||||||
|
"--enable-m17nlib" #character encodings
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
"--with-gui=quartz"
|
||||||
|
] ++ lib.optionals (libssh2 == null) [ " --disable-ssh2" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -D contrib/icon/mlterm-icon.svg "$out/share/icons/hicolor/scalable/apps/mlterm.svg"
|
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 contrib/icon/mlterm-icon-gnome2.png "$out/share/icons/hicolor/48x48/apps/mlterm.png"
|
||||||
install -D -t $out/share/applications $desktopItem/share/applications/*
|
install -D -t $out/share/applications $desktopItem/share/applications/*
|
||||||
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
|
mkdir -p $out/Applications/
|
||||||
|
cp -a cocoa/mlterm.app $out/Applications/
|
||||||
|
install $out/bin/mlterm -Dt $out/Applications/mlterm.app/Contents/MacOS/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
@ -80,17 +104,17 @@ stdenv.mkDerivation rec {
|
|||||||
comment = "Terminal emulator";
|
comment = "Terminal emulator";
|
||||||
desktopName = "mlterm";
|
desktopName = "mlterm";
|
||||||
genericName = "Terminal emulator";
|
genericName = "Terminal emulator";
|
||||||
categories = stdenv.lib.concatStringsSep ";" [
|
categories = lib.concatStringsSep ";" [
|
||||||
"Application" "System" "TerminalEmulator"
|
"Application" "System" "TerminalEmulator"
|
||||||
];
|
];
|
||||||
startupNotify = "false";
|
startupNotify = "false";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "Multi Lingual TERMinal emulator on X11";
|
description = "Multi Lingual TERMinal emulator";
|
||||||
homepage = "http://mlterm.sourceforge.net/";
|
homepage = "http://mlterm.sourceforge.net/";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ vrthra ramkromberg ];
|
maintainers = with maintainers; [ vrthra ramkromberg atemu ];
|
||||||
platforms = with platforms; linux;
|
platforms = with platforms; linux ++ darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -724,6 +724,7 @@ in
|
|||||||
mlterm = callPackage ../applications/terminal-emulators/mlterm {
|
mlterm = callPackage ../applications/terminal-emulators/mlterm {
|
||||||
libssh2 = null;
|
libssh2 = null;
|
||||||
openssl = null;
|
openssl = null;
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||||
};
|
};
|
||||||
|
|
||||||
mrxvt = callPackage ../applications/terminal-emulators/mrxvt { };
|
mrxvt = callPackage ../applications/terminal-emulators/mrxvt { };
|
||||||
|
Loading…
Reference in New Issue
Block a user