diff options
Diffstat (limited to 'pkgs/tools/inputmethods/fcitx5')
-rw-r--r-- | pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix | 38 | ||||
-rw-r--r-- | pkgs/tools/inputmethods/fcitx5/with-addons.nix | 6 |
2 files changed, 22 insertions, 22 deletions
diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix index 202886e4e8e1..5311d20ffa32 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix @@ -1,19 +1,19 @@ { lib -, mkDerivation +, stdenv , fetchFromGitHub , cmake , extra-cmake-modules , fcitx5 -, qtx11extras -, libxcb -, libXdmcp , qtbase -, qt6 +, qtwayland +, wrapQtAppsHook , wayland }: - -mkDerivation rec { - pname = "fcitx5-qt"; +let + majorVersion = lib.versions.major qtbase.version; +in +stdenv.mkDerivation rec { + pname = "fcitx5-qt${majorVersion}"; version = "5.1.4"; src = fetchFromGitHub { @@ -23,30 +23,28 @@ mkDerivation rec { sha256 = "sha256-bVH2US/uEZGERslnAh/fyUbzR9fK1UfG4J+mOmrIE8Y="; }; - preConfigure = '' - substituteInPlace qt5/platforminputcontext/CMakeLists.txt \ - --replace \$"{CMAKE_INSTALL_QT5PLUGINDIR}" $out/${qtbase.qtPluginPrefix} - substituteInPlace qt6/platforminputcontext/CMakeLists.txt \ - --replace \$"{CMAKE_INSTALL_QT6PLUGINDIR}" $out/${qt6.qtbase.qtPluginPrefix} + postPatch = '' + substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \ + --replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix} ''; cmakeFlags = [ - # adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies - "-DCMAKE_PREFIX_PATH=${qt6.qtbase};${qt6.qtwayland}" - "-DENABLE_QT4=0" - "-DENABLE_QT6=1" + "-DENABLE_QT4=OFF" + "-DENABLE_QT5=OFF" + "-DENABLE_QT6=OFF" + "-DENABLE_QT${majorVersion}=ON" ]; nativeBuildInputs = [ cmake extra-cmake-modules + wrapQtAppsHook ]; buildInputs = [ + qtbase + qtwayland fcitx5 - qtx11extras - libxcb - libXdmcp wayland ]; diff --git a/pkgs/tools/inputmethods/fcitx5/with-addons.nix b/pkgs/tools/inputmethods/fcitx5/with-addons.nix index 75fac87b6285..614074595f51 100644 --- a/pkgs/tools/inputmethods/fcitx5/with-addons.nix +++ b/pkgs/tools/inputmethods/fcitx5/with-addons.nix @@ -4,7 +4,8 @@ , fcitx5 , withConfigtool ? true , fcitx5-configtool -, fcitx5-qt +, libsForQt5 +, qt6Packages , fcitx5-gtk , addons ? [ ] }: @@ -14,7 +15,8 @@ symlinkJoin { paths = [ fcitx5 - fcitx5-qt + libsForQt5.fcitx5-qt + qt6Packages.fcitx5-qt fcitx5-gtk ] ++ lib.optionals withConfigtool [ fcitx5-configtool |