2018-02-06 23:50:46 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper,
|
2018-10-18 22:45:26 +01:00
|
|
|
libinput, wmctrl, python3,
|
2019-11-13 20:36:06 +00:00
|
|
|
coreutils, xdotool ? null,
|
2018-02-06 23:50:46 +00:00
|
|
|
extraUtilsPath ? lib.optional (xdotool != null) xdotool
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libinput-gestures";
|
2018-11-09 19:57:34 +00:00
|
|
|
version = "2.39";
|
2018-02-06 23:50:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bulletmark";
|
|
|
|
repo = "libinput-gestures";
|
|
|
|
rev = version;
|
2018-11-09 19:57:34 +00:00
|
|
|
sha256 = "0bzyi55yhr9wyar9mnd09cr6pi88jkkp0f9lndm0a9jwi1xr4bdf";
|
2018-02-06 23:50:46 +00:00
|
|
|
};
|
|
|
|
patches = [
|
|
|
|
./0001-hardcode-name.patch
|
|
|
|
./0002-paths.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2018-10-18 22:45:26 +01:00
|
|
|
buildInputs = [ python3 ];
|
2018-02-06 23:50:46 +00:00
|
|
|
|
|
|
|
postPatch =
|
|
|
|
''
|
|
|
|
substituteInPlace libinput-gestures-setup --replace /usr/ /
|
|
|
|
|
|
|
|
substituteInPlace libinput-gestures \
|
|
|
|
--replace /etc "$out/etc" \
|
|
|
|
--subst-var-by libinput "${libinput}/bin/libinput" \
|
|
|
|
--subst-var-by wmctrl "${wmctrl}/bin/wmctrl"
|
|
|
|
'';
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
runHook preInstall
|
|
|
|
${stdenv.shell} libinput-gestures-setup -d "$out" install
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
postFixup =
|
|
|
|
''
|
|
|
|
rm "$out/bin/libinput-gestures-setup"
|
|
|
|
substituteInPlace "$out/share/applications/libinput-gestures.desktop" --replace "/usr" "$out"
|
|
|
|
chmod +x "$out/share/applications/libinput-gestures.desktop"
|
2019-11-13 20:36:06 +00:00
|
|
|
wrapProgram "$out/bin/libinput-gestures" --prefix PATH : "${lib.makeBinPath ([coreutils] ++ extraUtilsPath)}"
|
2018-02-06 23:50:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/bulletmark/libinput-gestures";
|
2018-02-06 23:50:46 +00:00
|
|
|
description = "Gesture mapper for libinput";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ teozkr ];
|
|
|
|
};
|
|
|
|
}
|