Combine ISO generation steps
This folds adding hydra-build-products into the actual ISO generation, preventing an unnecessary download of the ISO.
This commit is contained in:
parent
5cc7bcda30
commit
10293b87a9
|
@ -39,7 +39,6 @@
|
|||
|
||||
, # The volume ID.
|
||||
volumeID ? ""
|
||||
|
||||
}:
|
||||
|
||||
assert bootable -> bootImage != "";
|
||||
|
@ -47,7 +46,7 @@ assert efiBootable -> efiBootImage != "";
|
|||
assert usbBootable -> isohybridMbrImage != "";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "iso9660-image";
|
||||
name = isoName;
|
||||
builder = ./make-iso9660-image.sh;
|
||||
buildInputs = [perl xorriso syslinux];
|
||||
|
||||
|
|
|
@ -133,3 +133,4 @@ fi
|
|||
|
||||
mkdir -p $out/nix-support
|
||||
echo $system > $out/nix-support/system
|
||||
echo "file iso $out/iso/$isoName" >> $out/nix-support/hydra-build-products
|
||||
|
|
|
@ -43,34 +43,14 @@ let
|
|||
|
||||
|
||||
makeIso =
|
||||
{ module, type, description ? type, maintainers ? ["eelco"], system }:
|
||||
{ module, type, maintainers ? ["eelco"], system }:
|
||||
|
||||
with import nixpkgs { inherit system; };
|
||||
|
||||
let
|
||||
|
||||
config = (import lib/eval-config.nix {
|
||||
inherit system;
|
||||
modules = [ module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ];
|
||||
}).config;
|
||||
|
||||
iso = config.system.build.isoImage;
|
||||
|
||||
in
|
||||
# Declare the ISO as a build product so that it shows up in Hydra.
|
||||
hydraJob (runCommand "nixos-iso-${config.system.nixosVersion}"
|
||||
{ meta = {
|
||||
description = "NixOS installation CD (${description}) - ISO image for ${system}";
|
||||
maintainers = map (x: lib.maintainers.${x}) maintainers;
|
||||
};
|
||||
inherit iso;
|
||||
passthru = { inherit config; };
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
''
|
||||
mkdir -p $out/nix-support
|
||||
echo "file iso" $iso/iso/*.iso* >> $out/nix-support/hydra-build-products
|
||||
''); # */
|
||||
hydraJob ((import lib/eval-config.nix {
|
||||
inherit system;
|
||||
modules = [ module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ];
|
||||
}).config.system.build.isoImage);
|
||||
|
||||
|
||||
makeSystemTarball =
|
||||
|
|
Loading…
Reference in New Issue