File tree 4 files changed +25
-23
lines changed
tools/inputmethods/fcitx5
4 files changed +25
-23
lines changed Original file line number Diff line number Diff line change 1
1
{ lib
2
- , mkDerivation
2
+ , stdenv
3
3
, fetchFromGitHub
4
4
, cmake
5
5
, extra-cmake-modules
6
6
, fcitx5
7
- , qtx11extras
8
- , libxcb
9
- , libXdmcp
10
7
, qtbase
11
- , qt6
8
+ , qtwayland
9
+ , wrapQtAppsHook
12
10
, wayland
13
11
} :
14
-
15
- mkDerivation rec {
16
- pname = "fcitx5-qt" ;
12
+ let
13
+ majorVersion = lib . versions . major qtbase . version ;
14
+ in
15
+ stdenv . mkDerivation rec {
16
+ pname = "fcitx5-qt${ majorVersion } " ;
17
17
version = "5.1.4" ;
18
18
19
19
src = fetchFromGitHub {
@@ -23,30 +23,28 @@ mkDerivation rec {
23
23
sha256 = "sha256-bVH2US/uEZGERslnAh/fyUbzR9fK1UfG4J+mOmrIE8Y=" ;
24
24
} ;
25
25
26
- preConfigure = ''
27
- substituteInPlace qt5/platforminputcontext/CMakeLists.txt \
28
- --replace \$"{CMAKE_INSTALL_QT5PLUGINDIR}" $out/${ qtbase . qtPluginPrefix }
29
- substituteInPlace qt6/platforminputcontext/CMakeLists.txt \
30
- --replace \$"{CMAKE_INSTALL_QT6PLUGINDIR}" $out/${ qt6 . qtbase . qtPluginPrefix }
26
+ postPatch = ''
27
+ substituteInPlace qt${ majorVersion } /platforminputcontext/CMakeLists.txt \
28
+ --replace \$"{CMAKE_INSTALL_QT${ majorVersion } PLUGINDIR}" $out/${ qtbase . qtPluginPrefix }
31
29
'' ;
32
30
33
31
cmakeFlags = [
34
- # adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies
35
- "-DCMAKE_PREFIX_PATH= ${ qt6 . qtbase } ; ${ qt6 . qtwayland } "
36
- "-DENABLE_QT4=0 "
37
- "-DENABLE_QT6=1 "
32
+ "-DENABLE_QT4=OFF"
33
+ "-DENABLE_QT5=OFF "
34
+ "-DENABLE_QT6=OFF "
35
+ "-DENABLE_QT ${ majorVersion } =ON "
38
36
] ;
39
37
40
38
nativeBuildInputs = [
41
39
cmake
42
40
extra-cmake-modules
41
+ wrapQtAppsHook
43
42
] ;
44
43
45
44
buildInputs = [
45
+ qtbase
46
+ qtwayland
46
47
fcitx5
47
- qtx11extras
48
- libxcb
49
- libXdmcp
50
48
wayland
51
49
] ;
52
50
Original file line number Diff line number Diff line change 4
4
, fcitx5
5
5
, withConfigtool ? true
6
6
, fcitx5-configtool
7
- , fcitx5-qt
7
+ , libsForQt5
8
+ , qt6Packages
8
9
, fcitx5-gtk
9
10
, addons ? [ ]
10
11
} :
@@ -14,7 +15,8 @@ symlinkJoin {
14
15
15
16
paths = [
16
17
fcitx5
17
- fcitx5-qt
18
+ libsForQt5 . fcitx5-qt
19
+ qt6Packages . fcitx5-qt
18
20
fcitx5-gtk
19
21
] ++ lib . optionals withConfigtool [
20
22
fcitx5-configtool
Original file line number Diff line number Diff line change @@ -8044,7 +8044,7 @@ with pkgs;
8044
8044
8045
8045
fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { };
8046
8046
8047
- fcitx5-with-addons = libsForQt5. callPackage ../tools/inputmethods/fcitx5/with-addons.nix { };
8047
+ fcitx5-with-addons = callPackage ../tools/inputmethods/fcitx5/with-addons.nix { };
8048
8048
8049
8049
fcitx5-bamboo = callPackage ../tools/inputmethods/fcitx5/fcitx5-bamboo.nix { };
8050
8050
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ makeScopeWithSplicing' {
32
32
accounts-qt = callPackage ../development/libraries/accounts-qt { } ;
33
33
appstream-qt = callPackage ../development/libraries/appstream/qt.nix { } ;
34
34
35
+ fcitx5-qt = callPackage ../tools/inputmethods/fcitx5/fcitx5-qt.nix { } ;
36
+
35
37
kdsoap = callPackage ../development/libraries/kdsoap { } ;
36
38
37
39
kcolorpicker = callPackage ../development/libraries/kcolorpicker { } ;
You can’t perform that action at this time.
0 commit comments