ibus-engines: use wrapPythonPrograms

This is needed now that PYTHONPATH is not propagated. Also several packages
with additional dependencies are now properly wrapped.
This commit is contained in:
Nikolay Amiantov 2017-03-25 23:53:14 +03:00
parent 99434abff7
commit 66b05cd4e6
8 changed files with 39 additions and 34 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, intltool, pkgconfig
, anthy, ibus, glib, gobjectIntrospection, gtk3, python3, pygobject3
, anthy, ibus, glib, gobjectIntrospection, gtk3, python3
}:
stdenv.mkDerivation rec {
@ -15,15 +15,16 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ gebner ericsagnes ];
};
configureFlags = "--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t";
configureFlags = [ "--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t" ];
buildInputs = [
anthy glib gobjectIntrospection gtk3 ibus python3 pygobject3
anthy glib gobjectIntrospection gtk3 ibus python3
];
nativeBuildInputs = [ intltool pkgconfig ];
nativeBuildInputs = [ intltool pkgconfig python3.pkgs.wrapPython ];
postFixup = ''
wrapPythonPrograms
substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out
'';

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, intltool, pkgconfig
, gtk3, ibus, libhangul, librsvg, python3, pygobject3
, gtk3, ibus, libhangul, librsvg, python3
}:
stdenv.mkDerivation rec {
@ -11,9 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "120p9w7za6hi521hz8q235fkl4i3p1qqr8nqm4a3kxr0pcq40bd2";
};
buildInputs = [ gtk3 ibus libhangul python3 pygobject3 ];
buildInputs = [ gtk3 ibus libhangul ];
nativeBuildInputs = [ intltool pkgconfig ];
nativeBuildInputs = [ intltool pkgconfig python3.pkgs.wrapPython ];
postFixup = "wrapPythonPrograms";
meta = with stdenv.lib; {
isIbusEngine = true;

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, autoreconfHook
, intltool, pkgconfig, sqlite, libpinyin, db
, ibus, glib, gtk3, python3, pygobject3
, ibus, glib, gtk3, python3
}:
stdenv.mkDerivation rec {
@ -15,12 +15,14 @@ stdenv.mkDerivation rec {
};
buildInputs = [ ibus glib sqlite libpinyin python3 gtk3 db ];
nativeBuildInputs = [ autoreconfHook intltool pkgconfig ];
nativeBuildInputs = [ autoreconfHook intltool pkgconfig python3.pkgs.wrapPython ];
postAutoreconf = ''
intltoolize
'';
postFixup = "wrapPythonPrograms";
meta = with stdenv.lib; {
isIbusEngine = true;
description = "IBus interface to the libpinyin input method";

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub
, autoreconfHook, pkgconfig
, ibus, m17n_lib, m17n_db, gettext, python3, pygobject3
, ibus, m17n_lib, m17n_db, gettext, python3
}:
stdenv.mkDerivation rec {
@ -16,10 +16,12 @@ stdenv.mkDerivation rec {
buildInputs = [
ibus m17n_lib m17n_db gettext
python3 pygobject3
python3
];
nativeBuildInputs = [ autoreconfHook pkgconfig ];
nativeBuildInputs = [ autoreconfHook pkgconfig python3.pkgs.wrapPython ];
postFixup = "wrapPythonPrograms";
meta = with stdenv.lib; {
isIbusEngine = true;

View File

@ -1,4 +1,4 @@
{ clangStdenv, fetchFromGitHub, fetchsvn, gyp, which, ninja, python, pkgconfig, protobuf, ibus, gtk2, zinnia, qt4, libxcb, tegaki-zinnia-japanese }:
{ clangStdenv, fetchFromGitHub, fetchsvn, which, ninja, python2, pkgconfig, protobuf, ibus, gtk2, zinnia, qt4, libxcb, tegaki-zinnia-japanese }:
let
japanese_usage_dictionary = fetchsvn {
@ -19,7 +19,7 @@ in clangStdenv.mkDerivation rec {
maintainers = with maintainers; [ gebner ericsagnes ];
};
nativeBuildInputs = [ gyp which ninja python pkgconfig ];
nativeBuildInputs = [ which ninja python2 python2.pkgs.gyp pkgconfig ];
buildInputs = [ protobuf ibus gtk2 zinnia qt4 libxcb ];
src = fetchFromGitHub {
@ -36,8 +36,8 @@ in clangStdenv.mkDerivation rec {
configurePhase = ''
export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 ibus_mozc_path=$out/lib/ibus-mozc/ibus-engine-mozc"
python src/build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc \
python src/unix/fcitx/fcitx.gyp gyp --gypdir=${gyp}/bin
python src/build_mozc.py gyp --gypdir=${python2.pkgs.gyp}/bin --server_dir=$out/lib/mozc \
python src/unix/fcitx/fcitx.gyp gyp --gypdir=${python2.pkgs.gyp}/bin
'';
preBuildPhase = ''

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub
, autoreconfHook, docbook2x, pkgconfig
, gtk3, dconf, gobjectIntrospection
, ibus, python3, pygobject3 }:
, ibus, python3 }:
stdenv.mkDerivation rec {
name = "ibus-table-${version}";
@ -29,16 +29,18 @@ stdenv.mkDerivation rec {
'';
buildInputs = [
dconf gtk3 gobjectIntrospection ibus python3 pygobject3
dconf gtk3 gobjectIntrospection ibus python3
];
nativeBuildInputs = [ autoreconfHook docbook2x pkgconfig ];
nativeBuildInputs = [ autoreconfHook docbook2x pkgconfig python3.pkgs.wrapPython ];
postUnpack = ''
substituteInPlace $sourceRoot/engine/Makefile.am \
--replace "docbook2man" "docbook2man --sgml"
'';
postFixup = "wrapPythonPrograms";
meta = with stdenv.lib; {
isIbusEngine = true;
description = "An IBus framework for table-based input methods";

View File

@ -15,6 +15,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = with python3Packages; [ pyxdg python-Levenshtein ];
nativeBuildInputs = [ python3Packages.wrapPython ];
postFixup = ''
buildPythonPath $out
patchPythonScript $out/share/ibus-uniemoji/uniemoji.py
'';
makeFlags = [ "PREFIX=$(out)" "SYSCONFDIR=$(out)/etc"
"PYTHON=${python3Packages.python.interpreter}"
];

View File

@ -1272,30 +1272,19 @@ with pkgs;
ibus-qt = callPackage ../tools/inputmethods/ibus/ibus-qt.nix { };
ibus-engines = recurseIntoAttrs {
anthy = callPackage ../tools/inputmethods/ibus-engines/ibus-anthy { };
anthy = callPackage ../tools/inputmethods/ibus-engines/ibus-anthy {
inherit (python3Packages) pygobject3;
};
hangul = callPackage ../tools/inputmethods/ibus-engines/ibus-hangul { };
hangul = callPackage ../tools/inputmethods/ibus-engines/ibus-hangul {
inherit (python3Packages) pygobject3;
};
libpinyin = callPackage ../tools/inputmethods/ibus-engines/ibus-libpinyin { };
libpinyin = callPackage ../tools/inputmethods/ibus-engines/ibus-libpinyin {
inherit (python3Packages) pygobject3;
};
m17n = callPackage ../tools/inputmethods/ibus-engines/ibus-m17n {
inherit (python3Packages) pygobject3;
};
m17n = callPackage ../tools/inputmethods/ibus-engines/ibus-m17n { };
mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc {
inherit (pythonPackages) gyp;
protobuf = protobuf.override { stdenv = clangStdenv; };
};
table = callPackage ../tools/inputmethods/ibus-engines/ibus-table {
inherit (python3Packages) pygobject3;
inherit (gnome3) dconf;
};