audiobookshelf: 2.18.1 -> 2.19.0 (#378967)
[NixPkgs.git] / pkgs / by-name / ge / geis / package.nix
blob8446cb446a179f629acede12b5968597452f6094
2   lib,
3   stdenv,
4   fetchurl,
5   pkg-config,
6   python3Packages,
7   wrapGAppsHook3,
8   atk,
9   dbus,
10   evemu,
11   frame,
12   gdk-pixbuf,
13   gobject-introspection,
14   grail,
15   gtk3,
16   xorg,
17   pango,
18   xorgserver,
19   testers,
20   validatePkgConfig,
23 stdenv.mkDerivation (finalAttrs: {
24   pname = "geis";
25   version = "2.2.17";
27   src = fetchurl {
28     url = "https://launchpad.net/geis/trunk/${finalAttrs.version}/+download/geis-${finalAttrs.version}.tar.xz";
29     hash = "sha256-imD1aDhSCUA4kE5pDSPMWpCpgPxS2mfw8oiQuqJccOs=";
30   };
32   env.NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation -Wno-error=pointer-compare";
34   hardeningDisable = [ "format" ];
36   pythonPath = with python3Packages; [ pygobject3 ];
38   nativeBuildInputs = [
39     pkg-config
40     wrapGAppsHook3
41     python3Packages.wrapPython
42     gobject-introspection
43     validatePkgConfig
44   ];
46   buildInputs = [
47     atk
48     dbus
49     evemu
50     frame
51     gdk-pixbuf
52     grail
53     gtk3
54     xorg.libX11
55     xorg.libXext
56     xorg.libXi
57     xorg.libXtst
58     pango
59     python3Packages.python
60     xorgserver
61   ];
63   prePatch = ''
64     substituteInPlace python/geis/geis_v2.py --replace-fail \
65       "ctypes.util.find_library(\"geis\")" "'$out/lib/libgeis.so'"
66     substituteInPlace config.aux/py-compile \
67       --replace-fail "import sys, os, py_compile, imp" "import sys, os, py_compile, importlib" \
68       --replace-fail "imp." "importlib." \
69       --replace-fail "hasattr(imp" "hasattr(importlib"
70   '';
72   preFixup = ''
73     buildPythonPath "$out $pythonPath"
74     gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
75   '';
77   passthru.tests.pkg-config = testers.hasPkgConfigModules {
78     package = finalAttrs.finalPackage;
79     versionCheck = true;
80   };
82   meta = {
83     description = "Library for input gesture recognition";
84     homepage = "https://launchpad.net/geis";
85     license = lib.licenses.gpl2;
86     platforms = lib.platforms.linux;
87     pkgConfigModules = [ "libgeis" ];
88   };