2021-09-17 16:56:37 +02:00
|
|
|
{ lib, libnotify, buildGoModule, fetchFromGitHub, pkg-config }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "yubikey-touch-detector";
|
2021-10-28 02:32:22 +02:00
|
|
|
version = "1.9.3";
|
2021-09-17 16:56:37 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maximbaz";
|
|
|
|
repo = "yubikey-touch-detector";
|
|
|
|
rev = version;
|
2021-10-28 02:32:22 +02:00
|
|
|
sha256 = "sha256-f6j+YNYASH0Adg3236QijApALd/yXJjNMYEdP0Pifw0=";
|
2021-09-17 16:56:37 +02:00
|
|
|
};
|
2022-01-31 01:36:17 +01:00
|
|
|
vendorSha256 = "sha256-H05EJwYDdg4lq6+psXiwujQd5g294epdRPjqviHhLWs=";
|
2021-09-17 16:56:37 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ libnotify ];
|
|
|
|
|
2022-05-20 04:42:51 +02: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-17 16:56:37 +02: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-13 08:41:56 +02:00
|
|
|
platforms = platforms.linux;
|
2021-09-17 16:56:37 +02:00
|
|
|
};
|
|
|
|
}
|