2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2023-04-12 12:48:02 +00:00
|
|
|
, openssl
|
2021-12-30 13:39:12 +00:00
|
|
|
, pcsclite
|
|
|
|
, PCSC
|
2022-05-18 14:49:53 +00:00
|
|
|
, Foundation
|
2023-04-12 12:48:02 +00:00
|
|
|
, IOKit
|
2021-12-30 13:39:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "age-plugin-yubikey";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.4.0";
|
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-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-V3NzZyCfslUBsARO5UC8N+cuptLxg2euM87DGqtLpPk=";
|
2021-12-30 13:39:12 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
cargoHash = "sha256-5qmwCcrhDkJlyeTS+waMiTxro1HjMHiQE5Ds/4sVpx4=";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
]
|
|
|
|
++ lib.optional stdenv.isLinux pcsclite
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
IOKit
|
|
|
|
Foundation
|
|
|
|
PCSC
|
|
|
|
];
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-04-12 12:48:02 +00:00
|
|
|
description = "YubiKey plugin for age";
|
2021-12-30 13:39:12 +00:00
|
|
|
homepage = "https://github.com/str4d/age-plugin-yubikey";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/str4d/age-plugin-yubikey/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
maintainers = with maintainers; [ kranzes vtuan10 ];
|
2021-12-30 13:39:12 +00:00
|
|
|
};
|
|
|
|
}
|