mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-16 12:20:10 +00:00
65 lines
1.2 KiB
Nix
65 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
kdePackages,
|
|
fcitx5,
|
|
gettext,
|
|
qtbase,
|
|
qtwayland,
|
|
wrapQtAppsHook,
|
|
wayland,
|
|
}:
|
|
let
|
|
majorVersion = lib.versions.major qtbase.version;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "fcitx5-qt${majorVersion}";
|
|
version = "5.1.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fcitx";
|
|
repo = "fcitx5-qt";
|
|
rev = version;
|
|
hash = "sha256-fyqejCb6c6VuPb44UPQDLrdZ93mHTxlX29jCN6KcZ5I=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \
|
|
--replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DENABLE_QT4=OFF"
|
|
"-DENABLE_QT5=OFF"
|
|
"-DENABLE_QT6=OFF"
|
|
"-DENABLE_QT${majorVersion}=ON"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
kdePackages.extra-cmake-modules
|
|
gettext
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
qtbase
|
|
qtwayland
|
|
fcitx5
|
|
wayland
|
|
];
|
|
|
|
meta = {
|
|
description = "Fcitx5 Qt Library";
|
|
homepage = "https://github.com/fcitx/fcitx5-qt";
|
|
license = with lib.licenses; [
|
|
lgpl21Plus
|
|
bsd3
|
|
];
|
|
maintainers = with lib.maintainers; [ poscat ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|