2024-06-05 15:53:02 +00:00
|
|
|
{ lib, libnotify, gpgme, buildGoModule, fetchFromGitHub, pkg-config }:
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "yubikey-touch-detector";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.11.0";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maximbaz";
|
|
|
|
repo = "yubikey-touch-detector";
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-XpaCKNQpQD9dNj4EOGJ6PdjfSAxxG5dC8mIzYr7t/+I=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-mhmYTicj/ihGNzeCZd1ZijWPkvxQZjBxaC5dyAU1O7U=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs = [ libnotify gpgme ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postInstall = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
install -Dm444 -t $out/share/doc/${pname} *.{md,example}
|
|
|
|
|
|
|
|
install -Dm444 -t $out/share/licenses/${pname} LICENSE
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
install -Dm444 -t $out/share/icons/hicolor/128x128/apps yubikey-touch-detector.png
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
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; {
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "A tool to detect when your YubiKey is waiting for a touch";
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://github.com/maximbaz/yubikey-touch-detector";
|
|
|
|
maintainers = with maintainers; [ sumnerevans ];
|
2023-07-15 17:15:38 +00:00
|
|
|
license = with licenses; [ bsd2 isc ];
|
2022-05-18 14:49:53 +00:00
|
|
|
platforms = platforms.linux;
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "yubikey-touch-detector";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
}
|