geis: fix python programs

This commit is contained in:
Raymond Gauthier 2018-01-19 00:24:37 -05:00
parent c0d7a054cb
commit aa54ac3b51

View File

@ -1,14 +1,20 @@
{ stdenv, fetchurl
, pkgconfig
, python3
, python3Packages
, wrapGAppsHook
, atk
, dbus_libs
, evemu
, frame
, gdk_pixbuf
, gobjectIntrospection
, grail
, gtk3
, libX11
, libXext
, libXi
, libXtst
, pango
, xorgserver
}:
@ -25,8 +31,23 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-format -Wno-misleading-indentation -Wno-error";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ python3 dbus_libs evemu frame grail libX11 libXext libXi libXtst xorgserver ];
pythonPath = with python3Packages;
[ pygobject3 ];
nativeBuildInputs = [ pkgconfig wrapGAppsHook python3Packages.wrapPython];
buildInputs = [ atk dbus_libs evemu frame gdk_pixbuf gobjectIntrospection grail
gtk3 libX11 libXext libXi libXtst pango python3Packages.python xorgserver
];
patchPhase = ''
substituteInPlace python/geis/geis_v2.py --replace \
"ctypes.util.find_library(\"geis\")" "'$out/lib/libgeis.so'"
'';
preFixup = ''
buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
'';
meta = {
description = "A library for input gesture recognition";