From bef69925e3cddc4ac350ffc5167ec732e70d133e Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sat, 30 Dec 2017 07:18:14 +0900 Subject: [PATCH] fcitx-libpinyin: 0.3.93 -> 0.5.3 Previously optional dependencies are now made mandatory like qtwebbrowser.dev . In order to find these libraries, I used libsForQt5.callPackage. --- .../development/libraries/libpinyin/default.nix | 8 ++++---- .../fcitx-engines/fcitx-libpinyin/default.nix | 17 +++++++++-------- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/libpinyin/default.nix b/pkgs/development/libraries/libpinyin/default.nix index 15d14199041..7bb2fbc81c8 100644 --- a/pkgs/development/libraries/libpinyin/default.nix +++ b/pkgs/development/libraries/libpinyin/default.nix @@ -2,14 +2,14 @@ let modelData = fetchurl { - url = "mirror://sourceforge/libpinyin/models/model12.text.tar.gz"; - sha256 = "1fijhhnjgj8bj1xr5pp7c4qxf11cqybgfqg7v36l3x780d84hfnd"; + url = "mirror://sourceforge/libpinyin/models/model14.text.tar.gz"; + sha256 = "0qqk30nflj07zjhs231c95ln4yj4ipzwxxiwrxazrg4hb8bhypqq"; }; in stdenv.mkDerivation rec { name = "libpinyin-${version}"; - version = "1.6.0"; + version = "2.1.91"; nativeBuildInputs = [ autoreconfHook glib db pkgconfig ]; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { owner = "libpinyin"; repo = "libpinyin"; rev = version; - sha256 = "0k40a7wfp8zj9d426afv0am5sr3m2i2p309fq0vf8qrb050hj17f"; + sha256 = "0jbvn65p3zh0573hh27aasd3qly5anyfi8jnps2dxi0my09wbrq3"; }; meta = with stdenv.lib; { diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix index 6022bcebc3b..f2610efd2eb 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchurl, cmake, pkgconfig, fcitx, gettext, libpinyin, glib, pcre, dbus, qt4 }: +{ stdenv, fetchurl, cmake, pkgconfig, fcitx, gettext, libpinyin, glib, pcre, dbus, qtwebengine, qtbase, fcitx-qt5 }: stdenv.mkDerivation rec { name = "fcitx-libpinyin-${version}"; - version = "0.3.91"; + version = "0.5.3"; src = fetchurl { url = "http://download.fcitx-im.org/fcitx-libpinyin/${name}.tar.xz"; - sha256 = "19h0p1s8bkw24v7x6v19fg7dqpz2kkjlvvrqhypi5bkkvfswf7xn"; + sha256 = "196c229ckib3xvafkk4n3n3jk9rpksfcjsbbwka6a9k2f34qrjj6"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ cmake fcitx gettext libpinyin glib pcre dbus qt4 ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ fcitx-qt5 qtbase qtwebengine.dev cmake fcitx gettext libpinyin glib pcre dbus ]; preInstall = '' substituteInPlace src/cmake_install.cmake \ @@ -24,13 +24,14 @@ stdenv.mkDerivation rec { ''; preBuild = let + ZHUYIN_DATA_FILE_NAME = "model.text.20161206.tar.gz"; store_path = fetchurl { - url = https://download.fcitx-im.org/data/model.text.20130308.tar.gz; - sha256 = "0s8sazix29z1ilxmkw2f0bv6i349awd89ibylf9ixy615s1vb5a5"; + url = "https://download.fcitx-im.org/data/${ZHUYIN_DATA_FILE_NAME}"; + sha256 = "017p11si1b7bkwx36xaybq5a9icq1pd7x1jbymqw92akfgjj8w2w"; }; in '' - cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/model.text.20130308.tar.gz + cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/${ZHUYIN_DATA_FILE_NAME} ''; meta = with stdenv.lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9302ba1af86..82f817d8dd7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2105,7 +2105,7 @@ with pkgs; cloudpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-cloudpinyin { }; - libpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-libpinyin { }; + libpinyin = libsForQt5.callPackage ../tools/inputmethods/fcitx-engines/fcitx-libpinyin { }; skk = callPackage ../tools/inputmethods/fcitx-engines/fcitx-skk { }; };