From 72b2f5ab093f7fcae0e464c965317d5ce65eaa10 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Fri, 13 Aug 2021 20:45:51 +0800 Subject: [PATCH] touchegg: 1.1.1 -> 2.0.11 Co-Authored-By: Audrey MP Co-Authored-By: Rasmus T. Bjerg --- pkgs/tools/inputmethods/touchegg/default.nix | 61 +++++++++++++++----- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/pkgs/tools/inputmethods/touchegg/default.nix b/pkgs/tools/inputmethods/touchegg/default.nix index d2bd7a14663b..007c5231109b 100644 --- a/pkgs/tools/inputmethods/touchegg/default.nix +++ b/pkgs/tools/inputmethods/touchegg/default.nix @@ -1,26 +1,57 @@ -{ lib, stdenv, fetchurl, xorg, xorgserver, qt4, libGLU, libGL, geis, qmake4Hook }: +{ stdenv, lib +, fetchFromGitHub +, fetchpatch +, systemd +, libinput +, pugixml +, cairo +, xorg +, gtk3-x11 +, pcre +, pkg-config +, cmake +, pantheon +}: stdenv.mkDerivation rec { pname = "touchegg"; - version = "1.1.1"; - src = fetchurl { - url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/touchegg/${pname}-${version}.tar.gz"; - sha256 = "95734815c7219d9a71282f3144b3526f2542b4fa270a8e69d644722d024b4038"; + version = "2.0.11"; + src = fetchFromGitHub { + owner = "JoseExposito"; + repo = pname; + rev = version; + sha256 = "1zfiqs5vqlb6drnqx9nsmhgy8qc6svzr8zyjkqvwkpbgrc6ifap9"; }; - buildInputs = [ xorgserver libGLU libGL xorg.libX11 xorg.libXtst xorg.libXext qt4 geis ]; + PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system"; - nativeBuildInputs = [ qmake4Hook ]; + buildInputs = [ + systemd + libinput + pugixml + cairo + gtk3-x11 + pcre + ] ++ (with xorg; [ + libX11 + libXtst + libXrandr + libXi + libXdmcp + libpthreadstubs + libxcb + ]); - preConfigure = '' - sed -e "s@/usr/@$out/@g" -i $(find . -name touchegg.pro) - sed -e "s@/usr/@$out/@g" -i $(find ./src/touchegg/config/ -name Config.cpp) - ''; + nativeBuildInputs = [ + pkg-config + cmake + ]; - meta = { + meta = with lib; { homepage = "https://github.com/JoseExposito/touchegg"; - description = "Macro binding for touch surfaces"; - license = lib.licenses.gpl2; - platforms = lib.platforms.linux; + description = "Linux multi-touch gesture recognizer"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = pantheon.maintainers; }; }