2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, pcsclite
|
|
|
|
, PCSC
|
2022-05-18 14:49:53 +00:00
|
|
|
, Foundation
|
2021-12-30 13:39:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "age-plugin-yubikey";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.3.2";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "str4d";
|
|
|
|
repo = pname;
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-x4J8lE4Peenu3I7bZ3yoLpyukkMHD2re63GCni0cfnI=";
|
2021-12-30 13:39:12 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
cargoSha256 = "sha256-Qp7AXy044G17FxR2sopN00cgX91A8TAydrwvJrAfhns=";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
if stdenv.isDarwin then [
|
2022-05-18 14:49:53 +00:00
|
|
|
Foundation
|
2021-12-30 13:39:12 +00:00
|
|
|
PCSC
|
|
|
|
] else [
|
|
|
|
pcsclite
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "YubiKey plugin for age clients";
|
|
|
|
homepage = "https://github.com/str4d/age-plugin-yubikey";
|
|
|
|
license = with licenses; [ asl20 mit ];
|
|
|
|
maintainers = with maintainers; [ vtuan10 ];
|
|
|
|
};
|
|
|
|
}
|