nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
2024-02-29 03:28:22 +00:00
, stdenv
2020-12-13 03:07:21 +00:00
, fetchFromGitHub
, cmake
, extra-cmake-modules
, fcitx5
, qtbase
2024-02-29 03:28:22 +00:00
, qtwayland
, wrapQtAppsHook
, wayland
2020-12-13 03:07:21 +00:00
}:
2024-02-29 03:28:22 +00:00
let
majorVersion = lib.versions.major qtbase.version;
in
stdenv.mkDerivation rec {
pname = "fcitx5-qt${majorVersion}";
2024-12-02 08:00:13 +00:00
version = "5.1.8";
2020-12-13 03:07:21 +00:00
src = fetchFromGitHub {
owner = "fcitx";
repo = "fcitx5-qt";
2020-12-13 03:07:21 +00:00
rev = version;
2024-12-02 08:00:13 +00:00
hash = "sha256-up4EC4GLzDjd9QJzeV2b2uVZNxYa268D/FotCyy1sos=";
2020-12-13 03:07:21 +00:00
};
2024-02-29 03:28:22 +00:00
postPatch = ''
substituteInPlace qt${majorVersion}/platforminputcontext/CMakeLists.txt \
--replace \$"{CMAKE_INSTALL_QT${majorVersion}PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
'';
2020-12-13 03:07:21 +00:00
cmakeFlags = [
2024-02-29 03:28:22 +00:00
"-DENABLE_QT4=OFF"
"-DENABLE_QT5=OFF"
"-DENABLE_QT6=OFF"
"-DENABLE_QT${majorVersion}=ON"
2020-12-13 03:07:21 +00:00
];
nativeBuildInputs = [
cmake
extra-cmake-modules
2024-02-29 03:28:22 +00:00
wrapQtAppsHook
2020-12-13 03:07:21 +00:00
];
buildInputs = [
2024-02-29 03:28:22 +00:00
qtbase
qtwayland
2020-12-13 03:07:21 +00:00
fcitx5
wayland
2020-12-13 03:07:21 +00:00
];
2021-01-15 09:19:50 +00:00
meta = with lib; {
2020-12-13 03:07:21 +00:00
description = "Fcitx5 Qt Library";
homepage = "https://github.com/fcitx/fcitx5-qt";
license = with licenses; [ lgpl21Plus bsd3 ];
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}