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-02-16 17:41:37 +00:00
|
|
|
version = "0.3.3";
|
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-02-16 17:41:37 +00:00
|
|
|
sha256 = "sha256-b7/65mfUr4p8tP4uU/BFonW0DqTTMIhEgB2xIwIxQVg=";
|
2021-12-30 13:39:12 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
cargoSha256 = "sha256-LnHpinNZZHrIEWrVW0t1ja5WN57/fmiSmZlB0ylau8Y=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|