summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/fcitx-engines/fcitx-unikey/default.nix
blob: 5422efb9d38df59eecac41ed21cf23a978322131 (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
{ lib, stdenv, fetchurl, cmake, fcitx, gettext, pkg-config }:

stdenv.mkDerivation rec {
  pname = "fcitx-unikey";
  version = "0.2.5";

  src = fetchurl {
    url = "http://download.fcitx-im.org/fcitx-unikey/${pname}-${version}.tar.xz";
    sha256 = "063vc29v7ycaai98v3z4q319sv9sm91my17pmhblw1vifxnw02wf";
  };

  nativeBuildInputs = [ cmake pkg-config ];
  buildInputs = [ fcitx gettext ];

  NIX_CFLAGS_COMPILE = "-Wno-narrowing";

  preInstall = ''
    substituteInPlace src/cmake_install.cmake \
      --replace ${fcitx} $out
    substituteInPlace data/cmake_install.cmake \
      --replace ${fcitx} $out
  '';

  meta = with lib; {
    isFcitxEngine = true;
    homepage      = "https://github.com/fcitx/fcitx-unikey";
    downloadPage  = "http://download.fcitx-im.org/fcitx-table-other/";
    description   = "Fcitx wrapper for unikey";
    license       = licenses.gpl3Plus;
    platforms     = platforms.linux;
    maintainers   = with maintainers; [ ericsagnes ];
  };

}