mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
Merge pull request #244198 from yayayayaka/age-plugin-tpm-23.05-init
[23.05] age-plugin-tpm: init at 0.1.0
This commit is contained in:
41
pkgs/tools/security/age-plugin-tpm/default.nix
Normal file
41
pkgs/tools/security/age-plugin-tpm/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, swtpm
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "age-plugin-tpm";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Foxboron";
|
||||
repo = "age-plugin-tpm";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Gp7n2/+vgQbsm/En6PQ1to/W6lvFam4Wh3LHdCZnafc=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-oZni/n2J0N3ZxNhf+RlUWyWeOFwL4+6KUIk6DQF8YpA=";
|
||||
|
||||
postConfigure = ''
|
||||
substituteInPlace vendor/github.com/foxboron/swtpm_test/swtpm.go \
|
||||
--replace "/usr/share/swtpm/swtpm-create-user-config-files" "${swtpm}/share/swtpm/swtpm-create-user-config-files"
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
swtpm
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "TPM 2.0 plugin for age (This software is experimental, use it at your own risk)";
|
||||
homepage = "https://github.com/Foxboron/age-plugin-tpm";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ kranzes ];
|
||||
};
|
||||
}
|
||||
@@ -6482,6 +6482,8 @@ with pkgs;
|
||||
|
||||
agebox = callPackage ../tools/security/agebox { };
|
||||
|
||||
age-plugin-tpm = callPackage ../tools/security/age-plugin-tpm { };
|
||||
|
||||
age-plugin-yubikey = darwin.apple_sdk_11_0.callPackage ../tools/security/age-plugin-yubikey {
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) Foundation PCSC IOKit;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user