Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
libX11,
libXi,
libXtst,
libevdev,
udevCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "mouse-actions";
version = "0.4.5";
src = fetchFromGitHub {
owner = "jersou";
repo = "mouse-actions";
rev = "v${version}";
hash = "sha256-44F4CdsDHuN2FuijnpfmoFy4a/eAbYOoBYijl9mOctg=";
};
cargoHash = "sha256-3ylJSb6ItIkOl5Unhnm5aL83mQvWIM0PUg+1lMtUbPY=";
doInstallCheck = true;
buildInputs = [
libX11
libXi
libXtst
libevdev
];
nativeBuildInputs = [
pkg-config
udevCheckHook
];
postInstall = ''
mkdir -p $out/etc/udev/rules.d/
echo 'KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"' >> $out/etc/udev/rules.d/80-mouse-actions.rules
echo 'KERNEL=="/dev/input/event*", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"' >> $out/etc/udev/rules.d/80-mouse-actions.rules
'';
meta = with lib; {
description = "Execute commands from mouse events such as clicks/wheel on the side/corners of the screen, or drawing shapes";
homepage = "https://github.com/jersou/mouse-actions";
license = licenses.mit;
maintainers = with maintainers; [ rgri ];
mainProgram = "mouse-actions";
platforms = platforms.linux;
};
}