nixpkgs/pkgs/by-name/pi/piv-agent/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
998 B
Nix
Raw Normal View History

2024-04-05 05:20:00 +01:00
{ lib
, stdenv
, buildGoModule
, darwin
, fetchFromGitHub
, pcsclite
, pkg-config
}:
buildGoModule rec {
pname = "piv-agent";
2024-07-05 17:31:34 +01:00
version = "0.21.2";
2024-04-05 05:20:00 +01:00
src = fetchFromGitHub {
owner = "smlx";
repo = "piv-agent";
rev = "v${version}";
2024-07-05 17:31:34 +01:00
hash = "sha256-nHxtQaQ5Lc0QAJrWU6fUWViDwOKkxVyj9/B6XZ+Y0zw=";
2024-04-05 05:20:00 +01:00
};
2024-06-28 15:05:27 +01:00
vendorHash = "sha256-L5HuTYA01w3LUtSy7OVxG6QN5uQZ8LVYyrBcJQTkIUA=";
2024-04-05 05:20:00 +01:00
subPackages = [ "cmd/piv-agent" ];
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.shortCommit=${src.rev}" ];
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
buildInputs =
if stdenv.hostPlatform.isDarwin
then [ darwin.apple_sdk.frameworks.PCSC ]
else [ pcsclite ];
meta = with lib; {
description = "SSH and GPG agent which you can use with your PIV hardware security device (e.g. a Yubikey)";
homepage = "https://github.com/smlx/piv-agent";
license = licenses.asl20;
2024-04-24 05:20:00 +01:00
maintainers = [ ];
2024-04-05 05:20:00 +01:00
mainProgram = "piv-agent";
};
}