1 { lib, libnotify, buildGoModule, fetchFromGitHub, pkg-config }:
4 pname = "yubikey-touch-detector";
7 src = fetchFromGitHub {
9 repo = "yubikey-touch-detector";
11 sha256 = "sha256-3tZyaOrNzLfcCORhTSMEu8EvnNUjva8hBNotHgANS0g=";
13 vendorSha256 = "sha256-OitI9Yp4/mRMrNH4yrWSL785+3mykPkvzarrc6ipOeg=";
15 nativeBuildInputs = [ pkg-config ];
17 buildInputs = [ libnotify ];
20 install -Dm444 -t $out/share/doc/${pname} *.md
22 install -Dm444 -t $out/lib/systemd/user *.{service,socket}
24 substituteInPlace $out/lib/systemd/user/*.service \
25 --replace /usr/bin/yubikey-touch-detector "$out/bin/yubikey-touch-detector --libnotify"
29 description = "A tool to detect when your YubiKey is waiting for a touch (to send notification or display a visual indicator on the screen).";
30 homepage = "https://github.com/maximbaz/yubikey-touch-detector";
31 maintainers = with maintainers; [ sumnerevans ];
32 license = licenses.isc;
33 platforms = platforms.linux;