about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/yubihsm-connector/default.nix
blob: 8e56cc6a227e12a87da15a02b941dc31ba8e64c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, libusb1, buildGoModule, fetchFromGitHub, pkg-config }:

buildGoModule rec {
  pname = "yubihsm-connector";
  version = "3.0.4";

  src = fetchFromGitHub {
    owner = "Yubico";
    repo = "yubihsm-connector";
    rev = version;
    hash = "sha256-snoQZsmKQPcsB5EpZc4yon02QbxNU5B5TAwRPjs1O5I=";
  };

  vendorHash = "sha256-XW7rEHY3S+M3b6QjmINgrCak+BqCEV3PJP90jz7J47A=";

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [
    libusb1
  ];

  ldflags = [ "-s" "-w" ];

  preBuild = ''
    go generate
  '';

  meta = with lib; {
    description = "yubihsm-connector performs the communication between the YubiHSM 2 and applications that use it";
    homepage = "https://developers.yubico.com/yubihsm-connector/";
    maintainers = with maintainers; [ matthewcroughan ];
    license = licenses.asl20;
  };
}