summary refs log tree commit diff
path: root/pkgs/development/libraries/geis/default.nix
blob: 1b3d5ba4b7c0654569ef803860d8fff6a6d6124d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ stdenv, fetchurl
, pkgconfig
, python3Packages
, wrapGAppsHook
, atk
, dbus
, evemu
, frame
, gdk-pixbuf
, gobject-introspection
, grail
, gtk3
, libX11
, libXext
, libXi
, libXtst
, pango
, xorgserver
}:

with stdenv.lib;

stdenv.mkDerivation rec {
  pname = "geis";
  version = "2.2.17";

  src = fetchurl {
    url = "https://launchpad.net/geis/trunk/${version}/+download/${pname}-${version}.tar.xz";
    sha256 = "1svhbjibm448ybq6gnjjzj0ak42srhihssafj0w402aj71lgaq4a";
  };

  NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation -Wno-error=pointer-compare";

  hardeningDisable = [ "format" ];

  pythonPath = with python3Packages;
    [ pygobject3  ];

  nativeBuildInputs = [ pkgconfig wrapGAppsHook python3Packages.wrapPython];
  buildInputs = [ atk dbus evemu frame gdk-pixbuf gobject-introspection 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";
    homepage = https://launchpad.net/geis;
    license = licenses.gpl2;
    platforms = platforms.linux;
  };
}