Skip to content

Commit

Permalink
geis: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Oct 29, 2024
1 parent 57e2661 commit 9f6725d
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions pkgs/by-name/ge/geis/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@
xorg,
pango,
xorgserver,
testers,
validatePkgConfig,
}:

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

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

env.NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation -Wno-error=pointer-compare";
Expand All @@ -38,7 +40,9 @@ stdenv.mkDerivation rec {
wrapGAppsHook3
python3Packages.wrapPython
gobject-introspection
validatePkgConfig
];

buildInputs = [
atk
dbus
Expand All @@ -56,20 +60,25 @@ stdenv.mkDerivation rec {
xorgserver
];

patchPhase = ''
substituteInPlace python/geis/geis_v2.py --replace \
prePatch = ''
substituteInPlace python/geis/geis_v2.py --replace-fail \
"ctypes.util.find_library(\"geis\")" "'$out/lib/libgeis.so'"
substituteInPlace config.aux/py-compile \
--replace-fail "import sys, os, py_compile, imp" "import sys, os, py_compile, importlib" \
--replace-fail "imp." "importlib." \
--replace-fail "hasattr(imp" "hasattr(importlib"
'';

preFixup = ''
buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
'';

meta = with lib; {
meta = {
description = "Library for input gesture recognition";
homepage = "https://launchpad.net/geis";
license = licenses.gpl2;
platforms = platforms.linux;
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
pkgConfigModules = [ "libgeis" ];
};
}
})

0 comments on commit 9f6725d

Please sign in to comment.