nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, intltool, pkgconfig, cmake
2, ncurses, m17n_lib, m17n_db, expat
3, withAnthy ? true, anthy ? null
4, withGtk ? true
5, withGtk2 ? withGtk, gtk2 ? null
6, withGtk3 ? withGtk, gtk3 ? null
7, withQt ? true
8, withQt4 ? withQt, qt4 ? null
9, withLibnotify ? true, libnotify ? null
10, withSqlite ? true, sqlite ? null
11, withNetworking ? true, curl ? null, openssl ? null
12, withFFI ? true, libffi ? null
13
14# Things that are clearly an overkill to be enabled by default
15, withMisc ? false, libeb ? null
16}:
17
18with stdenv.lib;
19
20assert withAnthy -> anthy != null;
21assert withGtk2 -> gtk2 != null;
22assert withGtk3 -> gtk3 != null;
23assert withQt4 -> qt4 != null;
24assert withLibnotify -> libnotify != null;
25assert withSqlite -> sqlite != null;
26assert withNetworking -> curl != null && openssl != null;
27assert withFFI -> libffi != null;
28assert withMisc -> libeb != null;
29
30stdenv.mkDerivation rec {
31 version = "1.8.6";
32 name = "uim-${version}";
33
34 buildInputs = [
35 intltool
36 pkgconfig
37 ncurses
38 cmake
39 m17n_lib
40 m17n_db
41 expat
42 ]
43 ++ optional withAnthy anthy
44 ++ optional withGtk2 gtk2
45 ++ optional withGtk3 gtk3
46 ++ optional withQt4 qt4
47 ++ optional withLibnotify libnotify
48 ++ optional withSqlite sqlite
49 ++ optionals withNetworking [
50 curl openssl
51 ]
52 ++ optional withFFI libffi
53 ++ optional withMisc libeb;
54
55 patches = [ ./data-hook.patch ];
56
57 configureFlags = [
58 "--enable-pref"
59 "--with-skk"
60 "--with-x"
61 "--with-xft"
62 "--with-expat=${expat.dev}"
63 ]
64 ++ optional withAnthy "--with-anthy-utf8"
65 ++ optional withGtk2 "--with-gtk2"
66 ++ optional withGtk3 "--with-gtk3"
67 ++ optionals withQt4 [
68 "--with-qt4"
69 "--with-qt4-immodule"
70 ]
71 ++ optional withLibnotify "--enable-notify=libnotify"
72 ++ optional withSqlite "--with-sqlite3"
73 ++ optionals withNetworking [
74 "--with-curl"
75 "--with-openssl-dir=${openssl.dev}"
76 ]
77 ++ optional withFFI "--with-ffi"
78 ++ optional withMisc "--with-eb";
79
80 # TODO: things in `./configure --help`, but not in nixpkgs
81 #--with-canna Use Canna [default=no]
82 #--with-wnn Build with libwnn [default=no]
83 #--with-mana Build a plugin for Mana [default=yes]
84 #--with-prime Build a plugin for PRIME [default=yes]
85 #--with-sj3 Use SJ3 [default=no]
86 #--with-osx-dcs Build with OS X Dictionary Services [default=no]
87
88 dontUseCmakeConfigure = true;
89
90 src = fetchurl {
91 url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uim/uim-${version}.tar.bz2";
92 sha1 = "43b9dbdead6797880e6cfc9c032ecb2d37d42777";
93 };
94
95 meta = with stdenv.lib; {
96 homepage = "https://github.com/uim/uim";
97 description = "A multilingual input method framework";
98 license = licenses.bsd3;
99 platforms = platforms.linux;
100 maintainers = with maintainers; [ ericsagnes oxij ];
101 };
102}