ibus-engines.uniemoji: modernize
* Rely on patchShebangsHook instead of wrapPython * Format the expression
This commit is contained in:
parent
6bc71fb30e
commit
ed4ed5869a
@ -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>
|
@ -1,8 +1,19 @@
|
|||||||
{ stdenv, fetchFromGitHub
|
{ stdenv
|
||||||
, python3Packages
|
, fetchFromGitHub
|
||||||
|
, gobject-introspection
|
||||||
|
, wrapGAppsHook
|
||||||
|
, python3
|
||||||
|
, ibus
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
python = python3.withPackages (ps: with ps; [
|
||||||
|
pygobject3
|
||||||
|
(toPythonModule ibus)
|
||||||
|
pyxdg
|
||||||
|
python-Levenshtein
|
||||||
|
]);
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "ibus-uniemoji";
|
pname = "ibus-uniemoji";
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
|
|
||||||
@ -13,25 +24,39 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "121zh3q0li1k537fcvbd4ns4jgl9bbb9gm9ihy8cfxgirv38lcfa";
|
sha256 = "121zh3q0li1k537fcvbd4ns4jgl9bbb9gm9ihy8cfxgirv38lcfa";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ pyxdg python-Levenshtein pygobject3 ];
|
patches = [
|
||||||
|
# Do not run wrapper script with Python,
|
||||||
|
# the wrapped script will have Python in shebang anyway.
|
||||||
|
./allow-wrapping.patch
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ python3Packages.wrapPython ];
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
wrapGAppsHook
|
||||||
|
gobject-introspection
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
python
|
||||||
|
ibus
|
||||||
|
];
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"PREFIX=${placeholder ''out''}"
|
||||||
|
"SYSCONFDIR=${placeholder ''out''}/etc"
|
||||||
|
"PYTHON=${python.interpreter}"
|
||||||
|
];
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
buildPythonPath $out
|
wrapGApp $out/share/ibus-uniemoji/uniemoji.py
|
||||||
patchPythonScript $out/share/ibus-uniemoji/uniemoji.py
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" "SYSCONFDIR=$(out)/etc"
|
|
||||||
"PYTHON=${python3Packages.python.interpreter}"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
isIbusEngine = true;
|
isIbusEngine = true;
|
||||||
description = "Input method (ibus) for entering unicode symbols and emoji by name";
|
description = "Input method (ibus) for entering unicode symbols and emoji by name";
|
||||||
homepage = "https://github.com/salty-horse/ibus-uniemoji";
|
homepage = "https://github.com/salty-horse/ibus-uniemoji";
|
||||||
license = with licenses; [ gpl3 mit ];
|
license = with licenses; [ gpl3 mit ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ aske ];
|
maintainers = with maintainers; [ aske ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user