mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-30 01:17:28 +03:00
systemd: add missing TPM2 build dependencies
This commit is contained in:
parent
1e653a8378
commit
73ac07a127
@ -251,6 +251,7 @@ stdenv.mkDerivation {
|
||||
{ name = "libtss2-esys.so.0"; pkg = opt withTpm2Tss tpm2-tss; }
|
||||
{ name = "libtss2-rc.so.0"; pkg = opt withTpm2Tss tpm2-tss; }
|
||||
{ name = "libtss2-mu.so.0"; pkg = opt withTpm2Tss tpm2-tss; }
|
||||
{ name = "libtss2-tcti-"; pkg = opt withTpm2Tss tpm2-tss; }
|
||||
{ name = "libfido2.so.1"; pkg = opt withFido2 libfido2; }
|
||||
];
|
||||
|
||||
@ -267,8 +268,12 @@ stdenv.mkDerivation {
|
||||
'' else ''
|
||||
# ensure that the library we provide actually exists
|
||||
if ! [ -e ${library} ]; then
|
||||
echo 'The shared library `${library}` does not exist but was given as subtitute for `${dl.name}`'
|
||||
exit 1
|
||||
# exceptional case, details:
|
||||
# https://github.com/systemd/systemd-stable/blob/v249-stable/src/shared/tpm2-util.c#L157
|
||||
if ! [[ "${library}" =~ .*libtss2-tcti-$ ]]; then
|
||||
echo 'The shared library `${library}` does not exist but was given as subtitute for `${dl.name}`'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# make the path to the dependency explicit
|
||||
for file in $(grep -lr '"${dl.name}"' src); do
|
||||
@ -353,6 +358,7 @@ stdenv.mkDerivation {
|
||||
++ lib.optionals withHomed [ p11-kit ]
|
||||
++ lib.optionals (withHomed || withCryptsetup) [ libfido2 ]
|
||||
++ lib.optionals withLibBPF [ libbpf ]
|
||||
++ lib.optional withTpm2Tss tpm2-tss
|
||||
;
|
||||
|
||||
#dontAddPrefix = true;
|
||||
@ -452,7 +458,7 @@ stdenv.mkDerivation {
|
||||
"-Dnss-systemd=false"
|
||||
] ++ lib.optionals withLibBPF [
|
||||
"-Dbpf-framework=true"
|
||||
];
|
||||
] ++ lib.optional withTpm2Tss "-Dtpm2=true";
|
||||
|
||||
preConfigure = ''
|
||||
mesonFlagsArray+=(-Dntp-servers="0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org")
|
||||
|
Loading…
Reference in New Issue
Block a user