Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 54 lines 1.6 kB view raw
1{ lib, stdenv, fetchFromGitHub, makeWrapper, 2 libinput, wmctrl, 3 xdotool ? null, 4 extraUtilsPath ? lib.optional (xdotool != null) xdotool 5}: 6stdenv.mkDerivation rec { 7 pname = "libinput-gestures"; 8 version = "2.32"; 9 name = "${pname}-${version}"; 10 11 src = fetchFromGitHub { 12 owner = "bulletmark"; 13 repo = "libinput-gestures"; 14 rev = version; 15 sha256 = "1by6sabx0s8sd9w5675gc26q7yccxnxxsjg4dqlb6nbs0vcg81s7"; 16 }; 17 patches = [ 18 ./0001-hardcode-name.patch 19 ./0002-paths.patch 20 ]; 21 22 nativeBuildInputs = [ makeWrapper ]; 23 24 postPatch = 25 '' 26 substituteInPlace libinput-gestures-setup --replace /usr/ / 27 28 substituteInPlace libinput-gestures \ 29 --replace /etc "$out/etc" \ 30 --subst-var-by libinput "${libinput}/bin/libinput" \ 31 --subst-var-by wmctrl "${wmctrl}/bin/wmctrl" 32 ''; 33 installPhase = 34 '' 35 runHook preInstall 36 ${stdenv.shell} libinput-gestures-setup -d "$out" install 37 runHook postInstall 38 ''; 39 postFixup = 40 '' 41 rm "$out/bin/libinput-gestures-setup" 42 substituteInPlace "$out/share/applications/libinput-gestures.desktop" --replace "/usr" "$out" 43 chmod +x "$out/share/applications/libinput-gestures.desktop" 44 wrapProgram "$out/bin/libinput-gestures" --prefix PATH : "${lib.makeBinPath extraUtilsPath}" 45 ''; 46 47 meta = with stdenv.lib; { 48 homepage = https://github.com/bulletmark/libinput-gestures; 49 description = "Gesture mapper for libinput"; 50 license = licenses.gpl3Plus; 51 platforms = platforms.linux; 52 maintainers = with maintainers; [ teozkr ]; 53 }; 54}