2017-12-05 12:43:58 +01:00
|
|
|
{ stdenv, fetchurl, intltool, pkgconfig, cmake
|
2017-12-05 12:44:30 +01:00
|
|
|
, ncurses, m17n_lib, m17n_db, expat
|
2017-12-05 12:43:58 +01:00
|
|
|
, withAnthy ? true, anthy ? null
|
|
|
|
, withGtk ? true
|
|
|
|
, withGtk2 ? withGtk, gtk2 ? null
|
|
|
|
, withGtk3 ? withGtk, gtk3 ? null
|
|
|
|
, withQt ? true
|
|
|
|
, withQt4 ? withQt, qt4 ? null
|
2017-12-22 12:57:32 +01:00
|
|
|
, withLibnotify ? true, libnotify ? null
|
2017-12-05 12:44:42 +01:00
|
|
|
, withSqlite ? true, sqlite ? null
|
|
|
|
, withNetworking ? true, curl ? null, openssl ? null
|
|
|
|
, withFFI ? true, libffi ? null
|
|
|
|
|
|
|
|
# Things that are clearly an overkill to be enabled by default
|
|
|
|
, withMisc ? false, libeb ? null
|
2017-12-05 12:43:58 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
assert withAnthy -> anthy != null;
|
|
|
|
assert withGtk2 -> gtk2 != null;
|
|
|
|
assert withGtk3 -> gtk3 != null;
|
|
|
|
assert withQt4 -> qt4 != null;
|
2017-12-22 12:57:32 +01:00
|
|
|
assert withLibnotify -> libnotify != null;
|
2017-12-05 12:44:42 +01:00
|
|
|
assert withSqlite -> sqlite != null;
|
|
|
|
assert withNetworking -> curl != null && openssl != null;
|
|
|
|
assert withFFI -> libffi != null;
|
|
|
|
assert withMisc -> libeb != null;
|
2014-07-13 08:46:34 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.8.6";
|
|
|
|
name = "uim-${version}";
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
intltool
|
|
|
|
pkgconfig
|
2016-05-17 00:26:15 +02:00
|
|
|
ncurses
|
2014-07-13 08:46:34 +02:00
|
|
|
cmake
|
2016-02-01 01:31:57 +01:00
|
|
|
m17n_lib
|
|
|
|
m17n_db
|
2017-12-05 12:44:30 +01:00
|
|
|
expat
|
2017-12-05 12:43:58 +01:00
|
|
|
]
|
|
|
|
++ optional withAnthy anthy
|
|
|
|
++ optional withGtk2 gtk2
|
|
|
|
++ optional withGtk3 gtk3
|
|
|
|
++ optional withQt4 qt4
|
2017-12-05 12:44:42 +01:00
|
|
|
++ optional withLibnotify libnotify
|
|
|
|
++ optional withSqlite sqlite
|
|
|
|
++ optionals withNetworking [
|
|
|
|
curl openssl
|
|
|
|
]
|
|
|
|
++ optional withFFI libffi
|
|
|
|
++ optional withMisc libeb;
|
2014-07-13 08:46:34 +02:00
|
|
|
|
2016-02-16 14:46:17 +01:00
|
|
|
patches = [ ./data-hook.patch ];
|
2014-07-13 08:46:34 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-pref"
|
|
|
|
"--with-skk"
|
|
|
|
"--with-x"
|
2017-12-05 12:43:58 +01:00
|
|
|
"--with-xft"
|
2017-12-05 12:44:30 +01:00
|
|
|
"--with-expat=${expat.dev}"
|
2017-12-05 12:43:58 +01:00
|
|
|
]
|
|
|
|
++ optional withAnthy "--with-anthy-utf8"
|
|
|
|
++ optional withGtk2 "--with-gtk2"
|
|
|
|
++ optional withGtk3 "--with-gtk3"
|
|
|
|
++ optionals withQt4 [
|
|
|
|
"--with-qt4"
|
|
|
|
"--with-qt4-immodule"
|
2017-12-05 12:44:42 +01:00
|
|
|
]
|
|
|
|
++ optional withLibnotify "--enable-notify=libnotify"
|
|
|
|
++ optional withSqlite "--with-sqlite3"
|
|
|
|
++ optionals withNetworking [
|
|
|
|
"--with-curl"
|
|
|
|
"--with-openssl-dir=${openssl.dev}"
|
|
|
|
]
|
|
|
|
++ optional withFFI "--with-ffi"
|
|
|
|
++ optional withMisc "--with-eb";
|
|
|
|
|
|
|
|
# TODO: things in `./configure --help`, but not in nixpkgs
|
|
|
|
#--with-canna Use Canna [default=no]
|
|
|
|
#--with-wnn Build with libwnn [default=no]
|
|
|
|
#--with-mana Build a plugin for Mana [default=yes]
|
|
|
|
#--with-prime Build a plugin for PRIME [default=yes]
|
|
|
|
#--with-sj3 Use SJ3 [default=no]
|
|
|
|
#--with-osx-dcs Build with OS X Dictionary Services [default=no]
|
2014-07-13 08:46:34 +02:00
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2017-10-27 01:44:19 +02:00
|
|
|
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uim/uim-${version}.tar.bz2";
|
2014-07-13 08:46:34 +02:00
|
|
|
sha1 = "43b9dbdead6797880e6cfc9c032ecb2d37d42777";
|
|
|
|
};
|
|
|
|
|
2016-02-16 14:46:17 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-10-27 01:44:19 +02:00
|
|
|
homepage = "https://github.com/uim/uim";
|
2014-07-13 08:46:34 +02:00
|
|
|
description = "A multilingual input method framework";
|
2017-12-05 12:45:11 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ ericsagnes oxij ];
|
2014-07-13 08:46:34 +02:00
|
|
|
};
|
|
|
|
}
|