nixpkgs/pkgs/tools/inputmethods/libinput-gestures/default.nix
Ryan Mulligan 4b6498afc2 libinput-gestures: 2.32 -> 2.33
Semi-automatic update. These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 2.33 with grep in /nix/store/axjjpwcbb3s56m0fk68y8w8vji56f2a5-libinput-gestures-2.33
- found 2.33 in filename of file in /nix/store/axjjpwcbb3s56m0fk68y8w8vji56f2a5-libinput-gestures-2.33
2018-03-08 22:16:57 -08:00

55 lines
1.6 KiB
Nix

{ lib, stdenv, fetchFromGitHub, makeWrapper,
libinput, wmctrl,
xdotool ? null,
extraUtilsPath ? lib.optional (xdotool != null) xdotool
}:
stdenv.mkDerivation rec {
pname = "libinput-gestures";
version = "2.33";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "bulletmark";
repo = "libinput-gestures";
rev = version;
sha256 = "0a4zq880da1rn0mxn1sq4cp6zkw4bfslr0vjczkbj4immjrj422j";
};
patches = [
./0001-hardcode-name.patch
./0002-paths.patch
];
nativeBuildInputs = [ makeWrapper ];
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"
wrapProgram "$out/bin/libinput-gestures" --prefix PATH : "${lib.makeBinPath extraUtilsPath}"
'';
meta = with stdenv.lib; {
homepage = https://github.com/bulletmark/libinput-gestures;
description = "Gesture mapper for libinput";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ teozkr ];
};
}