87 lines
1.3 KiB
Nix
87 lines
1.3 KiB
Nix
|
{
|
||
|
stdenv,
|
||
|
lib,
|
||
|
fetchFromGitHub,
|
||
|
autoreconfHook,
|
||
|
autoconf-archive,
|
||
|
pkg-config,
|
||
|
doxygen,
|
||
|
perl,
|
||
|
openssl,
|
||
|
json_c,
|
||
|
curl,
|
||
|
libgcrypt,
|
||
|
uthash,
|
||
|
git,
|
||
|
libuuid,
|
||
|
libtpms,
|
||
|
}:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
pname = "tpm2-tss";
|
||
|
version = "4.1.3";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "tpm2-software";
|
||
|
repo = pname;
|
||
|
rev = version;
|
||
|
hash = "sha256-BP28utEUI9g1VNv3lCXuiKrDtEImFQxxZfIjLiE3Wr8=";
|
||
|
};
|
||
|
|
||
|
patches = [
|
||
|
./no-shadow.patch
|
||
|
];
|
||
|
|
||
|
postPatch = ''
|
||
|
substituteInPlace ./bootstrap \
|
||
|
--replace-fail 'git describe --tags --always --dirty' 'echo "${version}"'
|
||
|
'';
|
||
|
|
||
|
outputs = [
|
||
|
"out"
|
||
|
];
|
||
|
|
||
|
nativeBuildInputs = [
|
||
|
autoreconfHook
|
||
|
autoconf-archive
|
||
|
pkg-config
|
||
|
doxygen
|
||
|
perl
|
||
|
git
|
||
|
];
|
||
|
|
||
|
buildInputs = [
|
||
|
openssl
|
||
|
json_c
|
||
|
curl
|
||
|
libgcrypt
|
||
|
uthash
|
||
|
libuuid
|
||
|
libtpms
|
||
|
];
|
||
|
|
||
|
strictDeps = true;
|
||
|
preAutoreconf = "./bootstrap";
|
||
|
|
||
|
enableParallelBuilding = true;
|
||
|
|
||
|
configureFlags = [
|
||
|
"--prefix=/"
|
||
|
];
|
||
|
|
||
|
preInstall = ''
|
||
|
mkdir -p $out
|
||
|
export DESTDIR=$out
|
||
|
'';
|
||
|
|
||
|
doCheck = false;
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "OSS implementation of the TCG TPM2 Software Stack (TSS2)";
|
||
|
homepage = "https://github.com/tpm2-software/tpm2-tss";
|
||
|
license = licenses.bsd2;
|
||
|
platforms = platforms.unix;
|
||
|
maintainers = with maintainers; [ baloo ];
|
||
|
};
|
||
|
}
|