xautoclick: 0.31 -> 0.34

Migrate to Gtk3 and Qt5
Adds support for fltk too
This commit is contained in:
freezeboy 2020-11-02 23:44:34 +01:00 committed by Jonathan Ringer
parent c0efa713da
commit 10687019df

View File

@ -1,32 +1,30 @@
{ stdenv, fetchurl, xorg, pkgconfig
, gtkSupport ? true, gtk2
, qtSupport ? true, qt4
{ stdenv, fetchFromGitHub, xorg, pkg-config
, cmake, libevdev
, gtkSupport ? true, gtk3, pcre, glib, wrapGAppsHook
, fltkSupport ? true, fltk
, qtSupport ? true, qt5
}:
stdenv.mkDerivation {
version = "0.31";
stdenv.mkDerivation rec {
pname = "xautoclick";
src = fetchurl {
url = "mirror://sourceforge/project/xautoclick/xautoclick/xautoclick-0.31/xautoclick-0.31.tar.gz";
sha256 = "0h522f12a7v2b89411xm51iwixmjp2mp90rnizjgiakx9ajnmqnm";
version = "0.34";
src = fetchFromGitHub {
owner = "qarkai";
repo = "xautoclick";
rev = "v${version}";
sha256 = "GN3zI5LQnVmRC0KWffzUTHKrxcqnstiL55hopwTTwpE=";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ xorg.libX11 xorg.libXtst xorg.xinput xorg.libXi xorg.libXext ]
++ stdenv.lib.optionals gtkSupport [ gtk2 ]
++ stdenv.lib.optionals qtSupport [ qt4 ];
patchPhase = ''
substituteInPlace configure --replace /usr/X11R6 ${xorg.libX11.dev}
'';
preConfigure = stdenv.lib.optional qtSupport ''
mkdir .bin
ln -s ${qt4}/bin/moc .bin/moc-qt4
addToSearchPath PATH .bin
sed -i -e "s@LD=\$_cc@LD=\$_cxx@" configure
'';
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libevdev xorg.libXtst ]
++ stdenv.lib.optionals gtkSupport [ gtk3 pcre glib wrapGAppsHook ]
++ stdenv.lib.optionals fltkSupport [ fltk ]
++ stdenv.lib.optionals qtSupport [ qt5.qtbase qt5.wrapQtAppsHook ];
meta = with stdenv.lib; {
description = "Autoclicker application, which enables you to automatically click the left mousebutton";
homepage = "http://xautoclick.sourceforge.net";
homepage = "https://github.com/qarkai/xautoclick";
license = licenses.gpl2;
platforms = platforms.linux;
};