2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-02-05 17:12:51 +00:00
|
|
|
, autoreconfHook, docbook2x, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, gtk3, dconf, gobject-introspection
|
|
|
|
, ibus, python3, wrapGAppsHook }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ibus-table";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.17.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kaio";
|
|
|
|
repo = "ibus-table";
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-rolnpjJojtL+0tUbZIQgL1IIkv+d3MoMWoedfEMpr8A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Data paths will be set at run-time.
|
|
|
|
sed -e "/export IBUS_TABLE_LIB_LOCATION=/ s/^.*$//" \
|
|
|
|
-e "/export IBUS_TABLE_LOCATION=/ s/^.*$//" \
|
|
|
|
-i "engine/ibus-engine-table.in"
|
|
|
|
sed -e "/export IBUS_TABLE_BIN_PATH=/ s/^.*$//" \
|
|
|
|
-e "/export IBUS_TABLE_DATA_DIR=/ s/^.*$//" \
|
|
|
|
-i "engine/ibus-table-createdb.in"
|
|
|
|
sed -e "/export IBUS_PREFIX=/ s/^.*$//" \
|
|
|
|
-e "/export IBUS_DATAROOTDIR=/ s/^.$//" \
|
|
|
|
-e "/export IBUS_LOCALEDIR=/ s/^.$//" \
|
|
|
|
-i "setup/ibus-setup-table.in"
|
|
|
|
substituteInPlace engine/tabcreatedb.py --replace '/usr/share/ibus-table' $out/share/ibus-table
|
2021-02-13 14:23:35 +00:00
|
|
|
substituteInPlace engine/ibus_table_location.py \
|
|
|
|
--replace '/usr/libexec' $out/libexec \
|
|
|
|
--replace '/usr/share/ibus-table/' $out/share/ibus-table/
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
dconf
|
|
|
|
gtk3
|
|
|
|
ibus
|
|
|
|
(python3.withPackages (pypkgs: with pypkgs; [
|
2021-02-13 14:23:35 +00:00
|
|
|
dbus-python
|
2020-04-24 23:36:52 +00:00
|
|
|
pygobject3
|
|
|
|
(toPythonModule ibus)
|
|
|
|
]))
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
docbook2x
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
substituteInPlace $sourceRoot/engine/Makefile.am \
|
|
|
|
--replace "docbook2man" "docbook2man --sgml"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
isIbusEngine = true;
|
|
|
|
description = "An IBus framework for table-based input methods";
|
|
|
|
homepage = "https://github.com/kaio/ibus-table/wiki";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ mudri ];
|
|
|
|
};
|
|
|
|
}
|