diff --git a/pkgs/by-name/ge/geis/package.nix b/pkgs/by-name/ge/geis/package.nix new file mode 100644 index 000000000000..8446cb446a17 --- /dev/null +++ b/pkgs/by-name/ge/geis/package.nix @@ -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, +}: + +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 + ]; + + 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 \ + --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") + ''; + + 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" ]; + }; +}) diff --git a/pkgs/development/libraries/geis/default.nix b/pkgs/development/libraries/geis/default.nix deleted file mode 100644 index 17266481b27a..000000000000 --- a/pkgs/development/libraries/geis/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ lib, stdenv, fetchurl -, pkg-config -, python3Packages -, wrapGAppsHook3 -, atk -, dbus -, evemu -, frame -, gdk-pixbuf -, gobject-introspection -, grail -, gtk3 -, xorg -, pango -, xorgserver -}: - - -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"; - }; - - 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 ]; - buildInputs = [ atk dbus evemu frame gdk-pixbuf grail - gtk3 xorg.libX11 xorg.libXext xorg.libXi xorg.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 = with lib; { - description = "Library for input gesture recognition"; - homepage = "https://launchpad.net/geis"; - license = licenses.gpl2; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b1e1a1c83cc4..5284e289bcad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17537,8 +17537,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 { };