fix: we need to roll our own versions of tpm2-tools and tpm2-tss
This commit is contained in:
parent
57f83bd4ac
commit
aa4f69d891
8 changed files with 162 additions and 3 deletions
pkgs/tpm2-tss
86
pkgs/tpm2-tss/default.nix
Normal file
86
pkgs/tpm2-tss/default.nix
Normal file
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
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 ];
|
||||
};
|
||||
}
|
16
pkgs/tpm2-tss/no-shadow.patch
Normal file
16
pkgs/tpm2-tss/no-shadow.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index e2d579b8..0eac4ff3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -672,9 +672,9 @@ AS_IF([test "$HOSTOS" = "Linux" && test "x$systemd_sysusers" != "xyes"],
|
||||
AC_CHECK_PROG(adduser, adduser, yes)
|
||||
AC_CHECK_PROG(addgroup, addgroup, yes)
|
||||
AS_IF([test "x$addgroup" != "xyes" && test "x$groupadd" != "xyes" ],
|
||||
- [AC_MSG_ERROR([addgroup or groupadd are needed.])])
|
||||
+ [AC_MSG_WARN([addgroup or groupadd are needed.])])
|
||||
AS_IF([test "x$adduser" != "xyes" && test "x$useradd" != "xyes" ],
|
||||
- [AC_MSG_ERROR([adduser or useradd are needed.])])])
|
||||
+ [AC_MSG_WARN([adduser or useradd are needed.])])])
|
||||
|
||||
AC_SUBST([PATH])
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue