dotfiles/packages/age-plugin-yubikey.nix
2025-04-26 11:49:40 +02:00

48 lines
1 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, pcsclite
, PCSC ? null
, Foundation ? null
, IOKit ? null
}:
rustPlatform.buildRustPackage rec {
pname = "age-plugin-yubikey";
version = "0.5.0";
src = fetchFromGitHub {
owner = "str4d";
repo = "age-plugin-yubikey";
rev = "ca1cd587ff289ee1b9d8f72120e5a2acfb9560ae";
hash = "sha256-9ghnPe83K+qixaFKCdM2FCPoENTNJnZA+OmmpD0E5LE=";
};
cargoHash = "sha256-WddBZG+K6mbI35XF32BltinXkmkwpcRd8CZOB1PTwM8=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
]
++ lib.optional stdenv.isLinux pcsclite
++ lib.optionals stdenv.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 ];
};
}