diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji')
-rw-r--r-- | nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch | 13 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix | 62 |
2 files changed, 75 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch new file mode 100644 index 000000000000..434c85d3dbea --- /dev/null +++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch @@ -0,0 +1,13 @@ +diff --git a/uniemoji.xml.in b/uniemoji.xml.in +index 5fbfd0f..6fb8ad3 100644 +--- a/uniemoji.xml.in ++++ b/uniemoji.xml.in +@@ -7,7 +7,7 @@ + <license>GPL</license> + <author>Lalo Martins <lalo.martins@gmail.com></author> + <homepage>https://github.com/salty-horse/ibus-uniemoji</homepage> +- <exec>@PYTHON@ @DATADIR@/ibus-uniemoji/uniemoji.py --ibus</exec> ++ <exec>@DATADIR@/ibus-uniemoji/uniemoji.py --ibus</exec> + <textdomain>uniemoji</textdomain> + <engines> + <engine> diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix new file mode 100644 index 000000000000..4c202939e722 --- /dev/null +++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix @@ -0,0 +1,62 @@ +{ lib, stdenv +, fetchFromGitHub +, gobject-introspection +, wrapGAppsHook +, python3 +, ibus +}: + +let + python = python3.withPackages (ps: with ps; [ + pygobject3 + (toPythonModule ibus) + pyxdg + levenshtein + ]); +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 = [ + "PREFIX=${placeholder "out"}" + "SYSCONFDIR=${placeholder "out"}/etc" + "PYTHON=${python.interpreter}" + ]; + + postFixup = '' + wrapGApp $out/share/ibus-uniemoji/uniemoji.py + ''; + + meta = with lib; { + 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 ]; + }; +} |