2021-01-15 10:19:50 +01:00
|
|
|
{ lib, stdenv
|
2020-12-13 04:13:52 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, fcitx5
|
|
|
|
, gobject-introspection
|
2021-06-02 14:42:28 +02:00
|
|
|
, glib
|
2020-12-13 04:13:52 +01:00
|
|
|
, gtk2
|
|
|
|
, gtk3
|
2021-02-10 19:48:04 +01:00
|
|
|
, gtk4
|
2021-06-02 14:42:28 +02:00
|
|
|
, fmt
|
2020-12-13 04:13:52 +01:00
|
|
|
, pcre
|
|
|
|
, libuuid
|
|
|
|
, libselinux
|
|
|
|
, libsepol
|
|
|
|
, libthai
|
|
|
|
, libdatrie
|
|
|
|
, libXdmcp
|
|
|
|
, libxkbcommon
|
|
|
|
, epoxy
|
|
|
|
, dbus
|
|
|
|
, at-spi2-core
|
|
|
|
, libXtst
|
|
|
|
, withGTK2 ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fcitx5-gtk";
|
2021-06-02 14:42:28 +02:00
|
|
|
version = "5.0.7";
|
2020-12-13 04:13:52 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fcitx";
|
2021-06-02 14:42:28 +02:00
|
|
|
repo = pname;
|
2020-12-13 04:13:52 +01:00
|
|
|
rev = version;
|
2021-06-02 14:42:28 +02:00
|
|
|
sha256 = "0vcikqrxv1xxcdaiz3axgm7rpab4w8aciw838sbpa9l20dp8cnyq";
|
2020-12-13 04:13:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DGOBJECT_INTROSPECTION_GIRDIR=share/gir-1.0"
|
|
|
|
"-DGOBJECT_INTROSPECTION_TYPELIBDIR=lib/girepository-1.0"
|
2021-01-15 10:19:50 +01:00
|
|
|
] ++ lib.optional (! withGTK2) "-DENABLE_GTK2_IM_MODULE=off";
|
2020-12-13 04:13:52 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-02 14:42:28 +02:00
|
|
|
glib
|
2020-12-13 04:13:52 +01:00
|
|
|
gtk3
|
2021-02-10 19:48:04 +01:00
|
|
|
gtk4
|
2021-06-02 14:42:28 +02:00
|
|
|
fmt
|
2020-12-13 04:13:52 +01:00
|
|
|
gobject-introspection
|
|
|
|
fcitx5
|
|
|
|
pcre
|
|
|
|
libuuid
|
|
|
|
libselinux
|
|
|
|
libsepol
|
|
|
|
libthai
|
|
|
|
libdatrie
|
|
|
|
libXdmcp
|
|
|
|
libxkbcommon
|
|
|
|
epoxy
|
|
|
|
dbus
|
|
|
|
at-spi2-core
|
|
|
|
libXtst
|
2021-01-15 10:19:50 +01:00
|
|
|
] ++ lib.optional withGTK2 gtk2;
|
2020-12-13 04:13:52 +01:00
|
|
|
|
2021-06-02 14:42:28 +02:00
|
|
|
NIX_CFLAGS_COMPILE = lib.concatMapStringsSep " " (s: "-isystem ${s}") [
|
|
|
|
"${glib.dev}/include/gio-unix-2.0"
|
|
|
|
"${glib.dev}/include/glib-2.0"
|
|
|
|
];
|
|
|
|
|
2020-12-13 04:13:52 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
];
|
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
meta = with lib; {
|
2020-12-13 04:13:52 +01:00
|
|
|
description = "Fcitx5 gtk im module and glib based dbus client library";
|
|
|
|
homepage = "https://github.com/fcitx/fcitx5-gtk";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ poscat ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|