@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, cmake, fcitx, extra-cmake-modules, qtbase }:
1+{ stdenv, lib, fetchurl, cmake, fcitx, pkgconfig, qtbase, kde5 }:
3stdenv.mkDerivation rec {
3stdenv.mkDerivation rec {
4 name = "fcitx-qt5-${version}";
4 name = "fcitx-qt5-${version}";
@@ -9,7 +9,19 @@ stdenv.mkDerivation rec {
9 sha256 = "1pj1b04n8r4kl7jh1qdv0xshgzb3zrmizfa3g5h3yk589h191vwc";
9 sha256 = "1pj1b04n8r4kl7jh1qdv0xshgzb3zrmizfa3g5h3yk589h191vwc";
12− buildInputs = [ cmake fcitx extra-cmake-modules qtbase ];
12+ # The following is to not have a dependency on kde5 so the plugin can be part of qt5LibsFun
14+ ${lib.concatMapStrings (f: ''
15+ ln -s ${kde5.extra-cmake-modules}/share/ECM/modules/${f} $sourceRoot/cmake/
17+ [ "ECMFindModuleHelpers.cmake" "ECMGenerateHeaders.cmake"
18+ "ECMPackageConfigHelpers.cmake" "ECMQueryQmake.cmake"
19+ "ECMSetupVersion.cmake" "ECMVersionHeader.h.in" ]}
22+ patches = [ ./fcitx-qt5-ecm.patch ];
24+ buildInputs = [ cmake fcitx pkgconfig qtbase ];
14 preInstall = ''
26 preInstall = ''
15 substituteInPlace platforminputcontext/cmake_install.cmake \
27 substituteInPlace platforminputcontext/cmake_install.cmake \