python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / yubikey-touch-detector / default.nix
blobaa697b447ac0dc173f35e0b8a28798f7ce8e0bcd
1 { lib, libnotify, buildGoModule, fetchFromGitHub, pkg-config }:
3 buildGoModule rec {
4   pname = "yubikey-touch-detector";
5   version = "1.10.0";
7   src = fetchFromGitHub {
8     owner = "maximbaz";
9     repo = "yubikey-touch-detector";
10     rev = version;
11     sha256 = "sha256-3tZyaOrNzLfcCORhTSMEu8EvnNUjva8hBNotHgANS0g=";
12   };
13   vendorSha256 = "sha256-OitI9Yp4/mRMrNH4yrWSL785+3mykPkvzarrc6ipOeg=";
15   nativeBuildInputs = [ pkg-config ];
17   buildInputs = [ libnotify ];
19   postInstall = ''
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"
26   '';
28   meta = with lib; {
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;
34   };