about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/inputmethods/fcitx/fcitx-qt5.nix
blob: 3fd1efcc3434fc14b019d5bcc908080dae458f9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib, mkDerivation, fetchFromGitLab
, cmake
, extra-cmake-modules
, fcitx
, pkgconfig
, qtbase
}:

mkDerivation rec {
  pname = "fcitx-qt5";
  version = "1.2.3";

  src = fetchFromGitLab {
    owner = "fcitx";
    repo = pname;
    rev = version;
    sha256 = "0860v3rxsh054wkkbawvyin5mk0flp4cwfcpmcpq147lvdm5lq2i";
  };

  nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ];

  buildInputs = [ fcitx qtbase ];

  preConfigure = ''
    substituteInPlace platforminputcontext/CMakeLists.txt \
      --replace \$"{CMAKE_INSTALL_QTPLUGINDIR}" $out/${qtbase.qtPluginPrefix}
    substituteInPlace quickphrase-editor/CMakeLists.txt \
      --replace \$"{FCITX4_ADDON_INSTALL_DIR}" $out/lib/fcitx
  '';

  meta = with lib; {
    homepage    = "https://gitlab.com/fcitx/fcitx-qt5";
    description = "Qt5 IM Module for Fcitx";
    license     = licenses.gpl2;
    platforms   = platforms.linux;
    maintainers = with maintainers; [ ericsagnes ];
  };
}