Skip to content

Commit

Permalink
fcitx: drop patches, use extra-cmake-modules directly
Browse files Browse the repository at this point in the history
Fixes #17252. (Really, this time.)

Now that extra-cmake-modules does not depend on Qt 5, it is possible to
depend on it directly.
  • Loading branch information
ttuegel committed Jul 29, 2016
1 parent e15f259 commit 2056f56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 47 deletions.
25 changes: 0 additions & 25 deletions pkgs/tools/inputmethods/fcitx/fcitx-ecm.patch

This file was deleted.

14 changes: 3 additions & 11 deletions pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, cmake, fcitx, pkgconfig, qtbase, kde5 }:
{ stdenv, lib, fetchurl, cmake, fcitx, pkgconfig, qtbase, extra-cmake-modules }:

stdenv.mkDerivation rec {
name = "fcitx-qt5-${version}";
Expand All @@ -9,17 +9,9 @@ stdenv.mkDerivation rec {
sha256 = "1pj1b04n8r4kl7jh1qdv0xshgzb3zrmizfa3g5h3yk589h191vwc";
};

# The following is to not have a dependency on kde5 so the plugin can be part of qt5LibsFun
postUnpack = ''
${lib.concatMapStrings (f: ''
ln -s ${kde5.extra-cmake-modules}/share/ECM/modules/${f} $sourceRoot/cmake/
'')
[ "ECMFindModuleHelpers.cmake" "ECMGenerateHeaders.cmake"
"ECMPackageConfigHelpers.cmake" "ECMQueryQmake.cmake"
"ECMSetupVersion.cmake" "ECMVersionHeader.h.in" ]}
'';
nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ];

buildInputs = [ cmake fcitx pkgconfig qtbase ];
buildInputs = [ fcitx qtbase ];

preInstall = ''
substituteInPlace platforminputcontext/cmake_install.cmake \
Expand Down
16 changes: 5 additions & 11 deletions pkgs/tools/inputmethods/fcitx/unwrapped.nix
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, cmake, intltool, gettext
, libxml2, enchant, isocodes, icu, libpthreadstubs
, pango, cairo, libxkbfile, libXau, libXdmcp, libxkbcommon
, dbus, gtk2, gtk3, qt4, kde5
, dbus, gtk2, gtk3, qt4, extra-cmake-modules
}:

stdenv.mkDerivation rec {
Expand All @@ -13,22 +13,16 @@ stdenv.mkDerivation rec {
sha256 = "0xvcmm4yi7kagf55d0yl3ql5ssbkm9410fwbz3kd988pchichdsk";
};

postUnpack = ''
ln -s ${kde5.extra-cmake-modules}/share/ECM/modules/ECMFindModuleHelpers.cmake \
$sourceRoot/cmake/
'';

patches = [ ./fcitx-ecm.patch ];

postPatch = ''
substituteInPlace src/frontend/qt/CMakeLists.txt \
--replace $\{QT_PLUGINS_DIR} $out/lib/qt4/plugins
'';

nativeBuildInputs = [ cmake extra-cmake-modules intltool pkgconfig ];

buildInputs = [
cmake enchant gettext isocodes pkgconfig intltool icu
libpthreadstubs libXau libXdmcp libxkbfile libxkbcommon libxml2
dbus cairo gtk2 gtk3 pango qt4
enchant gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile
libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4
];

cmakeFlags = ''
Expand Down

0 comments on commit 2056f56

Please sign in to comment.