lanzatool: add wrapper

This commit is contained in:
nikstur 2022-11-24 11:45:09 +01:00
parent 3e7f5fa625
commit b555c18e83
1 changed files with 13 additions and 1 deletions

View File

@ -73,7 +73,19 @@
lanzaboote = buildRustEfiApp ./rust/lanzaboote;
lanzatool = buildRustLinuxApp ./rust/lanzatool;
lanzatoolBin = naersk-nightly.buildPackage {
src = ./rust/lanzatool;
buildInputs = [ pkgs.binutils ];
};
lanzatool = pkgs.writeShellScriptBin "lanzatool" ''
set -euo pipefail
export LANZABOOTE_STUB=${lanzaboote}/bin/lanzaboote.efi
export LANZABOOTE_INITRD_STUB=${initrd-stub}/bin/initrd-stub.efi
${lanzatoolBin}/bin/lanzatool "$@"
'';
# A script that takes an initrd and turns it into a PE image.
wrapInitrd = pkgs.writeShellScriptBin "wrap-initrd" ''