Merge pull request #141771 from Luflosi/improve-swtpm-for-libvirt

This commit is contained in:
Artturi 2021-10-15 19:45:43 +03:00 committed by GitHub
commit e673b894c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,8 +42,21 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-cuse"
"--localstatedir=/var"
];
prePatch = ''
# Makefile tries to create the directory /var/lib/swtpm-localcafor, which fails
substituteInPlace samples/Makefile.am \
--replace 'install-data-local:' 'do-not-execute:'
# Use the correct path to the certtool binary
# instead of relying on it being in the environment
substituteInPlace samples/swtpm_localca.c --replace \
'# define CERTTOOL_NAME "certtool"' \
'# define CERTTOOL_NAME "${gnutls}/bin/certtool"'
'';
enableParallelBuilding = true;
outputs = [ "out" "man" ];