2021-12-24 20:55:14 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, pcsclite
|
|
|
|
, PCSC
|
2022-05-12 06:20:00 +02:00
|
|
|
, Foundation
|
2021-12-24 20:55:14 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "age-plugin-yubikey";
|
2022-05-12 06:20:00 +02:00
|
|
|
version = "0.3.0";
|
2021-12-24 20:55:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "str4d";
|
|
|
|
repo = pname;
|
2022-05-12 06:20:00 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-KXqicTZ9GZlNj1AH3tMmOrC8zjXoEnqo4JJJTBdiI4E=";
|
2021-12-24 20:55:14 +01:00
|
|
|
};
|
|
|
|
|
2022-05-12 06:20:00 +02:00
|
|
|
cargoSha256 = "sha256-m/v4E7KHyLIWZHX0TKpqwBVDDwLjhYpOjYMrKEtx6/4=";
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
|
2021-12-24 20:55:14 +01:00
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
if stdenv.isDarwin then [
|
2022-05-12 06:20:00 +02:00
|
|
|
Foundation
|
2021-12-24 20:55:14 +01: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 ];
|
|
|
|
};
|
|
|
|
}
|