2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-10-27 15:07:33 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gobject-introspection
|
|
|
|
, wrapGAppsHook
|
|
|
|
, python3
|
|
|
|
, ibus
|
2016-09-20 20:22:51 +01:00
|
|
|
}:
|
|
|
|
|
2019-10-27 15:07:33 +00:00
|
|
|
let
|
|
|
|
python = python3.withPackages (ps: with ps; [
|
|
|
|
pygobject3
|
|
|
|
(toPythonModule ibus)
|
|
|
|
pyxdg
|
|
|
|
python-Levenshtein
|
|
|
|
]);
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ibus-uniemoji";
|
2016-10-15 23:42:09 +01:00
|
|
|
version = "0.6.0";
|
2016-09-20 20:22:51 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "salty-horse";
|
|
|
|
repo = "ibus-uniemoji";
|
2016-10-15 23:42:09 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "121zh3q0li1k537fcvbd4ns4jgl9bbb9gm9ihy8cfxgirv38lcfa";
|
2016-09-20 20:22:51 +01:00
|
|
|
};
|
|
|
|
|
2019-10-27 15:07:33 +00:00
|
|
|
patches = [
|
|
|
|
# Do not run wrapper script with Python,
|
|
|
|
# the wrapped script will have Python in shebang anyway.
|
|
|
|
./allow-wrapping.patch
|
|
|
|
];
|
2016-09-20 20:22:51 +01:00
|
|
|
|
2019-10-27 15:07:33 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
python
|
|
|
|
ibus
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
2021-01-24 09:19:10 +00:00
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"SYSCONFDIR=${placeholder "out"}/etc"
|
2019-10-27 15:07:33 +00:00
|
|
|
"PYTHON=${python.interpreter}"
|
|
|
|
];
|
2017-03-25 20:53:14 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
2019-10-27 15:07:33 +00:00
|
|
|
wrapGApp $out/share/ibus-uniemoji/uniemoji.py
|
2017-03-25 20:53:14 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-09-20 20:22:51 +01:00
|
|
|
isIbusEngine = true;
|
2019-10-27 15:07:33 +00:00
|
|
|
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 ];
|
2016-09-20 20:22:51 +01:00
|
|
|
};
|
|
|
|
}
|