mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{ lib
|
|
, mkDerivation
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, extra-cmake-modules
|
|
, fcitx5
|
|
, qtx11extras
|
|
, libxcb
|
|
, libXdmcp
|
|
, qtbase
|
|
, qt6
|
|
}:
|
|
|
|
mkDerivation rec {
|
|
pname = "fcitx5-qt";
|
|
version = "5.0.15";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fcitx";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-yQFYol4rEXmQBJWoc96yWJkJc3RVP6U964tdJdkGelU=";
|
|
};
|
|
|
|
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}
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
# adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies
|
|
"-DCMAKE_PREFIX_PATH=${qt6.qtbase.dev}"
|
|
"-DENABLE_QT4=0"
|
|
"-DENABLE_QT6=1"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
extra-cmake-modules
|
|
];
|
|
|
|
buildInputs = [
|
|
fcitx5
|
|
qtx11extras
|
|
libxcb
|
|
libXdmcp
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Fcitx5 Qt Library";
|
|
homepage = "https://github.com/fcitx/fcitx5-qt";
|
|
license = with licenses; [ lgpl21Plus bsd3 ];
|
|
maintainers = with maintainers; [ poscat ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|