depot/third_party/nixpkgs/pkgs/tools/security/age-plugin-yubikey/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

48 lines
1 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, pcsclite
, PCSC
, Foundation
, IOKit
}:
rustPlatform.buildRustPackage rec {
pname = "age-plugin-yubikey";
version = "0.5.0";
src = fetchFromGitHub {
owner = "str4d";
repo = pname;
rev = "v${version}";
hash = "sha256-9ghnPe83K+qixaFKCdM2FCPoENTNJnZA+OmmpD0E5LE=";
};
cargoHash = "sha256-8petNuCJ1qS6XKt+24Lg/bZh96yj9oO6fu/z65Xhi4k=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
]
++ lib.optional stdenv.hostPlatform.isLinux pcsclite
++ lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
Foundation
PCSC
];
meta = with lib; {
description = "YubiKey plugin for age";
mainProgram = "age-plugin-yubikey";
homepage = "https://github.com/str4d/age-plugin-yubikey";
changelog = "https://github.com/str4d/age-plugin-yubikey/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [ mit asl20 ];
maintainers = with maintainers; [ kranzes vtuan10 ];
};
}