Skip to content

Commit

Permalink
tpm2-tss: adds support for libtpms backend
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Aug 2, 2024
1 parent 94afef7 commit db6abf7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/development/libraries/tpm2-tss/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, autoreconfHook, autoconf-archive, pkg-config, doxygen, perl
, openssl, json_c, curl, libgcrypt
, cmocka, uthash, ibm-sw-tpm2, iproute2, procps, which
, shadow, libuuid
, shadow, libuuid, libtpms
}:
let
# Avoid a circular dependency on Linux systems (systemd depends on tpm2-tss,
Expand Down Expand Up @@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
];

buildInputs = [
openssl json_c curl libgcrypt uthash libuuid
openssl json_c curl libgcrypt uthash libuuid libtpms
]
# cmocka is checked in the configure script
# when unit and/or integration testing is enabled
Expand Down Expand Up @@ -63,6 +63,11 @@ stdenv.mkDerivation rec {
--replace '@PREFIX@' $out/lib/
substituteInPlace ./bootstrap \
--replace 'git describe --tags --always --dirty' 'echo "${version}"'
for src in src/tss2-tcti/tcti-libtpms.c test/unit/tcti-libtpms.c; do
substituteInPlace "$src" \
--replace '"libtpms.so"' '"${libtpms.out}/lib/libtpms.so"' \
--replace '"libtpms.so.0"' '"${libtpms.out}/lib/libtpms.so.0"'
done
'';

configureFlags = lib.optionals doInstallCheck [
Expand Down

0 comments on commit db6abf7

Please sign in to comment.