From b24c50ea7af98d35abd619f92cd8d520feaea43b Mon Sep 17 00:00:00 2001 From: guttermonk Date: Thu, 3 Oct 2024 20:27:11 -0500 Subject: [PATCH 1/2] libinput-gestures: 2.76 -> 2.77 --- pkgs/tools/inputmethods/libinput-gestures/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/inputmethods/libinput-gestures/default.nix b/pkgs/tools/inputmethods/libinput-gestures/default.nix index bb466e38ba53..401a298957b9 100644 --- a/pkgs/tools/inputmethods/libinput-gestures/default.nix +++ b/pkgs/tools/inputmethods/libinput-gestures/default.nix @@ -5,13 +5,13 @@ }: stdenv.mkDerivation rec { pname = "libinput-gestures"; - version = "2.76"; + version = "2.77"; src = fetchFromGitHub { owner = "bulletmark"; repo = "libinput-gestures"; rev = version; - sha256 = "sha256-Tb/gQ/2Ul4JzEiLEUPJBj9T6ZAqzMSPdgiofdnDj73Q="; + hash = "sha256-eMXNlSgQSuN+/5SXJQjsylC1ygHS87sIEmnVGFk3pzA="; }; patches = [ ./0001-hardcode-name.patch From b5ef9e476298ee01973739249e0743fa0489ad61 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sat, 26 Oct 2024 23:03:07 +0530 Subject: [PATCH 2/2] libinput-gestures: nixfmt-rfc-style replace -> replace-fail in substituteInPlace rec -> finalAttrs --- .../libinput-gestures/default.nix | 72 ++++++++++--------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/pkgs/tools/inputmethods/libinput-gestures/default.nix b/pkgs/tools/inputmethods/libinput-gestures/default.nix index 401a298957b9..d8439d6c1468 100644 --- a/pkgs/tools/inputmethods/libinput-gestures/default.nix +++ b/pkgs/tools/inputmethods/libinput-gestures/default.nix @@ -1,16 +1,23 @@ -{ lib, stdenv, fetchFromGitHub, makeWrapper, - libinput, wmctrl, python3, - coreutils, xdotool ? null, - extraUtilsPath ? lib.optional (xdotool != null) xdotool +{ + lib, + stdenv, + fetchFromGitHub, + makeWrapper, + libinput, + wmctrl, + python3, + coreutils, + xdotool ? null, + extraUtilsPath ? lib.optional (xdotool != null) xdotool, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libinput-gestures"; version = "2.77"; src = fetchFromGitHub { owner = "bulletmark"; repo = "libinput-gestures"; - rev = version; + rev = "ref/tags/${finalAttrs.version}"; hash = "sha256-eMXNlSgQSuN+/5SXJQjsylC1ygHS87sIEmnVGFk3pzA="; }; patches = [ @@ -21,36 +28,35 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ python3 ]; - postPatch = - '' - substituteInPlace libinput-gestures-setup --replace /usr/ / + postPatch = '' + substituteInPlace libinput-gestures-setup --replace-fail /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/systemd/user/libinput-gestures.service" --replace "/usr" "$out" - 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 ([coreutils] ++ extraUtilsPath)}" - ''; + substituteInPlace libinput-gestures \ + --replace-fail /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/systemd/user/libinput-gestures.service" --replace "/usr" "$out" + 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 ([ coreutils ] ++ extraUtilsPath) + }" + ''; - meta = with lib; { + meta = { homepage = "https://github.com/bulletmark/libinput-gestures"; description = "Gesture mapper for libinput"; mainProgram = "libinput-gestures"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ teozkr ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ teozkr ]; }; -} +})