dotfiles/nix/aw-watcher-afk-input.nix
2026-07-08 05:02:06 -04:00

36 lines
909 B
Nix

# To use this, the user MUST be in the input group, or aw-watcher-afk-input
# will get mad
{ pkgs }:
let
owner = "genzitokio";
repo = "aw-arch-tools";
rev = "fd52d0dfbb7b7bb87e9c355b83e6d02b08d66793";
watcherSrc = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/${owner}/${repo}/${rev}/watchers/aw-watcher-afk-input/aw_watcher_afk_input.py";
hash = "sha256-RjXoOWOdgZcpJXfAqCj+WVhOt6I8/0Y+5ZSQ2zEA6ZQ=";
};
in
pkgs.python3Packages.buildPythonApplication {
pname = "aw-watcher-afk-input";
version = "0-unstable-2026-07-05";
format = "other"; # Use our own installPhase script
dontUnpack = true;
propagatedBuildInputs = with pkgs.python3Packages; [
evdev
aw-client
];
installPhase = ''
runHook preInstall
install -Dm755 ${watcherSrc} $out/bin/aw-watcher-afk-input
chmod +x $out/bin/aw-watcher-afk-input
runHook postInstall
'';
}