Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geis: fix build #352096

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions pkgs/by-name/ge/geis/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
python3Packages,
wrapGAppsHook3,
atk,
dbus,
evemu,
frame,
gdk-pixbuf,
gobject-introspection,
grail,
gtk3,
xorg,
pango,
xorgserver,
testers,
validatePkgConfig,
}:
Bot-wxt1221 marked this conversation as resolved.
Show resolved Hide resolved

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

src = fetchurl {
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";

hardeningDisable = [ "format" ];

pythonPath = with python3Packages; [ pygobject3 ];

nativeBuildInputs = [
pkg-config
wrapGAppsHook3
python3Packages.wrapPython
gobject-introspection
validatePkgConfig
];
Bot-wxt1221 marked this conversation as resolved.
Show resolved Hide resolved

buildInputs = [
atk
dbus
evemu
frame
gdk-pixbuf
grail
gtk3
xorg.libX11
xorg.libXext
xorg.libXi
xorg.libXtst
pango
python3Packages.python
xorgserver
];

prePatch = ''
substituteInPlace python/geis/geis_v2.py --replace-fail \
"ctypes.util.find_library(\"geis\")" "'$out/lib/libgeis.so'"
substituteInPlace config.aux/py-compile \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of systematic modification is best placed in a patch

--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")
'';

Bot-wxt1221 marked this conversation as resolved.
Show resolved Hide resolved
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
versionCheck = true;
};

meta = {
description = "Library for input gesture recognition";
homepage = "https://launchpad.net/geis";
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
pkgConfigModules = [ "libgeis" ];
};
Bot-wxt1221 marked this conversation as resolved.
Show resolved Hide resolved
Bot-wxt1221 marked this conversation as resolved.
Show resolved Hide resolved
})
56 changes: 0 additions & 56 deletions pkgs/development/libraries/geis/default.nix

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17557,8 +17557,6 @@ with pkgs;

flexcpp = callPackage ../development/tools/parsing/flexc++ { };

geis = callPackage ../development/libraries/geis { };

gi-docgen = callPackage ../development/tools/documentation/gi-docgen { };

git2-cpp = callPackage ../development/libraries/git2-cpp { };
Expand Down