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 { stdenv, fetchurl
, pkgconfig , pkgconfig
, python3 , python3Packages
, wrapGAppsHook
, atk
, dbus_libs , dbus_libs
, evemu , evemu
, frame , frame
, gdk_pixbuf
, gobjectIntrospection
, grail , grail
, gtk3
, libX11 , libX11
, libXext , libXext
, libXi , libXi
, libXtst , libXtst
, pango
, xorgserver , xorgserver
}: }:
@ -25,8 +31,23 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-format -Wno-misleading-indentation -Wno-error"; NIX_CFLAGS_COMPILE = "-Wno-format -Wno-misleading-indentation -Wno-error";
nativeBuildInputs = [ pkgconfig ]; pythonPath = with python3Packages;
buildInputs = [ python3 dbus_libs evemu frame grail libX11 libXext libXi libXtst xorgserver ]; [ 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 = { meta = {
description = "A library for input gesture recognition"; description = "A library for input gesture recognition";