mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
ibus: move code changes to a patch
This commit is contained in:
parent
eccb90a2d9
commit
c1b4f22b77
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, runCommand, fetchFromGitHub, autoreconfHook, gettext, makeWrapper, pkgconfig
|
||||
{ stdenv, substituteAll, fetchurl, runCommand, fetchFromGitHub, autoreconfHook, gettext, makeWrapper, pkgconfig
|
||||
, vala, wrapGAppsHook, dbus, dconf ? null, glib, gdk_pixbuf, gobject-introspection, gtk2
|
||||
, gtk3, gtk-doc, isocodes, python3, json-glib, libnotify ? null, enablePythonLibrary ? true
|
||||
, enableUI ? true, withWayland ? false, libxkbcommon ? null, wayland ? null
|
||||
@ -90,10 +90,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1npavb896qrp6qbqayb0va4mpsi68wybcnlbjknzgssqyw2ylh9r";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
pythonInterpreter = python3Runtime.interpreter;
|
||||
pythonSitePackages = python3.sitePackages;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup/ibus-setup.in --subst-var-by PYTHON ${python3Runtime.interpreter}
|
||||
substituteInPlace data/dconf/Makefile.am --replace "dconf update" true
|
||||
substituteInPlace configure.ac --replace '$python2dir/ibus' $out/${python3.sitePackages}/ibus
|
||||
echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh
|
||||
cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .
|
||||
'';
|
||||
|
31
pkgs/tools/inputmethods/ibus/fix-paths.patch
Normal file
31
pkgs/tools/inputmethods/ibus/fix-paths.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -462,7 +462,7 @@
|
||||
PYTHON2_VERSION=`$PYTHON2 -c "import sys; sys.stdout.write(sys.version[[:3]])"`
|
||||
PYTHON2_LIBDIR="$PYTHON2_PREFIX/lib/python$PYTHON2_VERSION"
|
||||
python2dir="$PYTHON2_LIBDIR/site-packages"
|
||||
- pkgpython2dir="$python2dir/ibus"
|
||||
+ pkgpython2dir="$prefix/@pythonSitePackages@/ibus"
|
||||
AC_SUBST(pkgpython2dir)
|
||||
else
|
||||
enable_python_library="no (disabled, use --enable-python-library to enable)"
|
||||
--- a/data/dconf/Makefile.am
|
||||
+++ b/data/dconf/Makefile.am
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
install-data-hook:
|
||||
if test -z "$(DESTDIR)"; then \
|
||||
- dconf update; \
|
||||
+ true; \
|
||||
fi
|
||||
|
||||
EXTRA_DIST = \
|
||||
--- a/setup/ibus-setup.in
|
||||
+++ b/setup/ibus-setup.in
|
||||
@@ -27,5 +27,5 @@
|
||||
export IBUS_DATAROOTDIR=@datarootdir@
|
||||
export IBUS_LOCALEDIR=@localedir@
|
||||
export IBUS_LIBEXECDIR=${libexecdir}
|
||||
-exec @PYTHON@ @prefix@/share/ibus/setup/main.py $@
|
||||
+exec @pythonInterpreter@ @prefix@/share/ibus/setup/main.py $@
|
||||
|
Loading…
Reference in New Issue
Block a user