2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, swtpm
|
2023-10-19 13:55:26 +00:00
|
|
|
, openssl
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "age-plugin-tpm";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.2.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Foxboron";
|
|
|
|
repo = "age-plugin-tpm";
|
|
|
|
rev = "v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-oTvK8U5j+llHgoChhGb+vcUrUf9doVYxd3d5MEuCNz8=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
proxyVendor = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
vendorHash = "sha256-veduD0K3Onkqvyg9E5v854a6/8UIRQZEH098lUepRNU=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
swtpm
|
|
|
|
];
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-08-04 22:07:22 +00:00
|
|
|
description = "TPM 2.0 plugin for age (This software is experimental, use it at your own risk)";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "age-plugin-tpm";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/Foxboron/age-plugin-tpm";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ kranzes sgo ];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|