systemd: properly wrap ukify by prefixing instead of overwriting PATH

This commit is contained in:
Vika 2023-10-21 21:57:29 +03:00
parent 0987120ad2
commit afe9745edb

View File

@ -740,7 +740,7 @@ stdenv.mkDerivation (finalAttrs: {
# To cross compile a derivation that builds a UKI with ukify, we need to wrap # To cross compile a derivation that builds a UKI with ukify, we need to wrap
# ukify with the correct binutils. When wrapping, no splicing happens so we # ukify with the correct binutils. When wrapping, no splicing happens so we
# have to explicitly pull binutils from targetPackages. # have to explicitly pull binutils from targetPackages.
wrapProgram $out/lib/systemd/ukify --set PATH ${lib.makeBinPath [ targetPackages.stdenv.cc.bintools ] } wrapProgram $out/lib/systemd/ukify --prefix PATH : ${lib.makeBinPath [ targetPackages.stdenv.cc.bintools ] }:${placeholder "out"}/lib/systemd
''; '';
disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)