2021-09-18 10:52:07 +00:00
|
|
|
{ lib, libnotify, buildGoModule, fetchFromGitHub, pkg-config }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "yubikey-touch-detector";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.10.0";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maximbaz";
|
|
|
|
repo = "yubikey-touch-detector";
|
|
|
|
rev = version;
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-3tZyaOrNzLfcCORhTSMEu8EvnNUjva8hBNotHgANS0g=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
vendorSha256 = "sha256-OitI9Yp4/mRMrNH4yrWSL785+3mykPkvzarrc6ipOeg=";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ libnotify ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 -t $out/share/doc/${pname} *.md
|
|
|
|
|
|
|
|
install -Dm444 -t $out/lib/systemd/user *.{service,socket}
|
|
|
|
|
|
|
|
substituteInPlace $out/lib/systemd/user/*.service \
|
|
|
|
--replace /usr/bin/yubikey-touch-detector "$out/bin/yubikey-touch-detector --libnotify"
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to detect when your YubiKey is waiting for a touch (to send notification or display a visual indicator on the screen).";
|
|
|
|
homepage = "https://github.com/maximbaz/yubikey-touch-detector";
|
|
|
|
maintainers = with maintainers; [ sumnerevans ];
|
|
|
|
license = licenses.isc;
|
2022-05-18 14:49:53 +00:00
|
|
|
platforms = platforms.linux;
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
}
|