nixpkgs/pkgs/tools/security/tpm2-tools/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, lib
, pandoc, pkg-config, makeWrapper, curl, openssl, tpm2-tss, libuuid
2019-10-27 11:30:06 +01:00
, abrmdSupport ? true, tpm2-abrmd ? null }:
2019-02-14 06:12:32 +01:00
stdenv.mkDerivation rec {
pname = "tpm2-tools";
2021-10-28 16:02:00 +02:00
version = "5.2";
2019-02-14 06:12:32 +01:00
src = fetchurl {
url = "https://github.com/tpm2-software/${pname}/releases/download/${version}/${pname}-${version}.tar.gz";
2021-10-28 16:02:00 +02:00
sha256 = "sha256-wLQC9qezRW6OskRSEeLUHEbH52ngX+TYkJ/2QRn3pjA=";
2019-02-14 06:12:32 +01:00
};
2021-01-17 04:51:22 +01:00
nativeBuildInputs = [ pandoc pkg-config makeWrapper ];
2019-02-14 06:12:32 +01:00
buildInputs = [
curl openssl tpm2-tss libuuid
2019-02-14 06:12:32 +01:00
];
2019-10-27 11:30:06 +01:00
preFixup = let
ldLibraryPath = lib.makeLibraryPath ([
tpm2-tss
] ++ (lib.optional abrmdSupport tpm2-abrmd));
in ''
wrapProgram $out/bin/tpm2 --suffix LD_LIBRARY_PATH : "${ldLibraryPath}"
wrapProgram $out/bin/tss2 --suffix LD_LIBRARY_PATH : "${ldLibraryPath}"
2019-10-27 11:30:06 +01:00
'';
# Unit tests disabled, as they rely on a dbus session
#configureFlags = [ "--enable-unit" ];
doCheck = false;
2019-02-14 06:12:32 +01:00
meta = with lib; {
description = "Command line tools that provide access to a TPM 2.0 compatible device";
homepage = "https://github.com/tpm2-software/tpm2-tools";
2019-02-14 06:12:32 +01:00
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ delroth ];
};
}