depot/third_party/nixpkgs/pkgs/tools/inputmethods/fcitx5/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

108 lines
1.7 KiB
Nix

{ lib
, stdenv
, fetchurl
, fetchFromGitHub
, fetchpatch
, pkg-config
, cmake
, extra-cmake-modules
, cairo
, pango
, fribidi
, fmt
, wayland
, systemd
, wayland-protocols
, json_c
, isocodes
, xkeyboard_config
, enchant
, gdk-pixbuf
, libGL
, libevent
, libuuid
, libselinux
, libXdmcp
, libsepol
, libxkbcommon
, libthai
, libdatrie
, xcbutilkeysyms
, pcre
, xcbutilwm
, xcb-imdkit
, libxkbfile
, nixosTests
}:
let
enDictVer = "20121020";
enDict = fetchurl {
url = "https://download.fcitx-im.org/data/en_dict-${enDictVer}.tar.gz";
hash = "sha256-xEpdeEeSXuqeTS0EdI1ELNKN2SmaC1cu99kerE9abOs=";
};
in
stdenv.mkDerivation rec {
pname = "fcitx5";
version = "5.1.1";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
hash = "sha256-R8stzpfQttBZFFSu8ikUz/2eL+b98/X672uVFsha9H0=";
};
prePatch = ''
ln -s ${enDict} src/modules/spell/$(stripHash ${enDict})
'';
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
];
buildInputs = [
fmt
isocodes
cairo
enchant
pango
libthai
libdatrie
fribidi
systemd
gdk-pixbuf
wayland
wayland-protocols
json_c
libGL
libevent
libuuid
libselinux
libsepol
libXdmcp
libxkbcommon
pcre
xcbutilwm
xcbutilkeysyms
xcb-imdkit
xkeyboard_config
libxkbfile
];
passthru = {
updateScript = ./update.py;
tests = {
inherit (nixosTests) fcitx5;
};
};
meta = with lib; {
description = "Next generation of fcitx";
homepage = "https://github.com/fcitx/fcitx5";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}