mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
nixos/lib/make-disk-image: Create build products metadata
For hydra to expose built images for direct download, listing the relevant files in nix-support/hydra-build-products is required.
This commit is contained in:
parent
3c78e5e805
commit
0392a07511
1 changed files with 7 additions and 2 deletions
|
@ -522,11 +522,16 @@ let format' = format; in let
|
||||||
chmod 0644 $efiVars
|
chmod 0644 $efiVars
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
createHydraBuildProducts = ''
|
||||||
|
mkdir -p $out/nix-support
|
||||||
|
echo "file ${format}-image $out/${filename}" >> $out/nix-support/hydra-build-products
|
||||||
|
'';
|
||||||
|
|
||||||
buildImage = pkgs.vmTools.runInLinuxVM (
|
buildImage = pkgs.vmTools.runInLinuxVM (
|
||||||
pkgs.runCommand name {
|
pkgs.runCommand name {
|
||||||
preVM = prepareImage + lib.optionalString touchEFIVars createEFIVars;
|
preVM = prepareImage + lib.optionalString touchEFIVars createEFIVars;
|
||||||
buildInputs = with pkgs; [ util-linux e2fsprogs dosfstools ];
|
buildInputs = with pkgs; [ util-linux e2fsprogs dosfstools ];
|
||||||
postVM = moveOrConvertImage + postVM;
|
postVM = moveOrConvertImage + createHydraBuildProducts + postVM;
|
||||||
QEMU_OPTS =
|
QEMU_OPTS =
|
||||||
concatStringsSep " " (lib.optional useEFIBoot "-drive if=pflash,format=raw,unit=0,readonly=on,file=${efiFirmware}"
|
concatStringsSep " " (lib.optional useEFIBoot "-drive if=pflash,format=raw,unit=0,readonly=on,file=${efiFirmware}"
|
||||||
++ lib.optionals touchEFIVars [
|
++ lib.optionals touchEFIVars [
|
||||||
|
@ -616,5 +621,5 @@ let format' = format; in let
|
||||||
in
|
in
|
||||||
if onlyNixStore then
|
if onlyNixStore then
|
||||||
pkgs.runCommand name {}
|
pkgs.runCommand name {}
|
||||||
(prepareImage + moveOrConvertImage + postVM)
|
(prepareImage + moveOrConvertImage + createHydraBuildProducts + postVM)
|
||||||
else buildImage
|
else buildImage
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue