2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gobject-introspection
|
|
|
|
, wrapGAppsHook
|
|
|
|
, python3
|
|
|
|
, ibus
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
python = python3.withPackages (ps: with ps; [
|
|
|
|
pygobject3
|
|
|
|
(toPythonModule ibus)
|
|
|
|
pyxdg
|
2023-01-20 10:41:00 +00:00
|
|
|
levenshtein
|
2020-04-24 23:36:52 +00:00
|
|
|
]);
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "ibus-uniemoji";
|
|
|
|
version = "0.6.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "salty-horse";
|
|
|
|
repo = "ibus-uniemoji";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "121zh3q0li1k537fcvbd4ns4jgl9bbb9gm9ihy8cfxgirv38lcfa";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Do not run wrapper script with Python,
|
|
|
|
# the wrapped script will have Python in shebang anyway.
|
|
|
|
./allow-wrapping.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
python
|
|
|
|
ibus
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
2021-02-05 17:12:51 +00:00
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"SYSCONFDIR=${placeholder "out"}/etc"
|
2020-04-24 23:36:52 +00:00
|
|
|
"PYTHON=${python.interpreter}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapGApp $out/share/ibus-uniemoji/uniemoji.py
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
isIbusEngine = true;
|
|
|
|
description = "Input method (ibus) for entering unicode symbols and emoji by name";
|
|
|
|
homepage = "https://github.com/salty-horse/ibus-uniemoji";
|
|
|
|
license = with licenses; [ gpl3 mit ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ aske ];
|
|
|
|
};
|
|
|
|
}
|