diff options
author | Jan Malakhovski <oxij@oxij.org> | 2017-12-05 11:43:58 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2017-12-05 11:43:58 +0000 |
commit | 2d6c56e457b59b160e40c8dd8efb8bca675655e0 (patch) | |
tree | bb0df4da9b5eb0d68279060faa3f8e66adf9e985 /pkgs/tools/inputmethods | |
parent | aeb32cf187edd854cb5541f5f4fe40713c0e96b5 (diff) | |
download | nixlib-2d6c56e457b59b160e40c8dd8efb8bca675655e0.tar nixlib-2d6c56e457b59b160e40c8dd8efb8bca675655e0.tar.gz nixlib-2d6c56e457b59b160e40c8dd8efb8bca675655e0.tar.bz2 nixlib-2d6c56e457b59b160e40c8dd8efb8bca675655e0.tar.lz nixlib-2d6c56e457b59b160e40c8dd8efb8bca675655e0.tar.xz nixlib-2d6c56e457b59b160e40c8dd8efb8bca675655e0.tar.zst nixlib-2d6c56e457b59b160e40c8dd8efb8bca675655e0.zip |
uim: make most things optional
Diffstat (limited to 'pkgs/tools/inputmethods')
-rw-r--r-- | pkgs/tools/inputmethods/uim/default.nix | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/pkgs/tools/inputmethods/uim/default.nix b/pkgs/tools/inputmethods/uim/default.nix index 3f37c1a2ab0c..5a13eccb9779 100644 --- a/pkgs/tools/inputmethods/uim/default.nix +++ b/pkgs/tools/inputmethods/uim/default.nix @@ -1,5 +1,22 @@ -{stdenv, fetchurl, intltool, pkgconfig, qt4, gtk2, gtk3, kdelibs4, ncurses, - cmake, anthy, automoc4, m17n_lib, m17n_db}: +{ stdenv, fetchurl, intltool, pkgconfig, cmake +, ncurses, m17n_lib, m17n_db +, withAnthy ? true, anthy ? null +, withGtk ? true +, withGtk2 ? withGtk, gtk2 ? null +, withGtk3 ? withGtk, gtk3 ? null +, withQt ? true +, withQt4 ? withQt, qt4 ? null +, withKde ? withQt +, withKde4 ? withKde && withQt4, kdelibs4 ? null, automoc4 ? null +}: + +with stdenv.lib; + +assert withAnthy -> anthy != null; +assert withGtk2 -> gtk2 != null; +assert withGtk3 -> gtk3 != null; +assert withQt4 -> qt4 != null; +assert withKde4 -> withQt4 && kdelibs4 != null && automoc4 != null; stdenv.mkDerivation rec { version = "1.8.6"; @@ -8,31 +25,36 @@ stdenv.mkDerivation rec { buildInputs = [ intltool pkgconfig - qt4 - gtk2 - gtk3 - kdelibs4 ncurses cmake - anthy - automoc4 m17n_lib m17n_db + ] + ++ optional withAnthy anthy + ++ optional withGtk2 gtk2 + ++ optional withGtk3 gtk3 + ++ optional withQt4 qt4 + ++ optionals withKde4 [ + kdelibs4 automoc4 ]; patches = [ ./data-hook.patch ]; configureFlags = [ - "--with-gtk2" - "--with-gtk3" - "--enable-kde4-applet" - "--enable-notify=knotify4" "--enable-pref" - "--with-qt4" - "--with-qt4-immodule" "--with-skk" "--with-x" - "--with-anthy-utf8" + "--with-xft" + ] + ++ optional withAnthy "--with-anthy-utf8" + ++ optional withGtk2 "--with-gtk2" + ++ optional withGtk3 "--with-gtk3" + ++ optionals withQt4 [ + "--with-qt4" + "--with-qt4-immodule" + ] ++ optionals withKde4 [ + "--enable-kde4-applet" + "--enable-notify=knotify4" ]; dontUseCmakeConfigure = true; |