1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-09-11 12:05:26 +03:00

image-builder/makeGPT: Add postProcess

This commit is contained in:
Samuel Dionne-Riel 2022-10-13 22:38:11 -04:00
parent abb07c7232
commit bf78ef0ecf

View File

@ -26,6 +26,7 @@ in
, partitions
, diskID
, headerHole ? 0 # in bytes
, postProcess ? null
}:
let
@ -51,6 +52,10 @@ stdenvNoCC.mkDerivation rec {
filename = "${_name}.img";
img = "${placeholder "out"}/${filename}";
inherit
postProcess
;
nativeBuildInputs = [
vboot_reference
];
@ -174,6 +179,11 @@ stdenvNoCC.mkDerivation rec {
echo "Information about the image:"
ls -lh $img
cgpt show $img
if [ -n "$postProcess" ]; then
echo "-> Running post-processing"
runHook postProcess
fi
'';
}