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.
|
, # The volume ID.
|
||||||
volumeID ? ""
|
volumeID ? ""
|
||||||
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert bootable -> bootImage != "";
|
assert bootable -> bootImage != "";
|
||||||
|
@ -47,7 +46,7 @@ assert efiBootable -> efiBootImage != "";
|
||||||
assert usbBootable -> isohybridMbrImage != "";
|
assert usbBootable -> isohybridMbrImage != "";
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "iso9660-image";
|
name = isoName;
|
||||||
builder = ./make-iso9660-image.sh;
|
builder = ./make-iso9660-image.sh;
|
||||||
buildInputs = [perl xorriso syslinux];
|
buildInputs = [perl xorriso syslinux];
|
||||||
|
|
||||||
|
|
|
@ -133,3 +133,4 @@ fi
|
||||||
|
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
echo $system > $out/nix-support/system
|
echo $system > $out/nix-support/system
|
||||||
|
echo "file iso $out/iso/$isoName" >> $out/nix-support/hydra-build-products
|
||||||
|
|
|
@ -43,34 +43,14 @@ let
|
||||||
|
|
||||||
|
|
||||||
makeIso =
|
makeIso =
|
||||||
{ module, type, description ? type, maintainers ? ["eelco"], system }:
|
{ module, type, maintainers ? ["eelco"], system }:
|
||||||
|
|
||||||
with import nixpkgs { inherit system; };
|
with import nixpkgs { inherit system; };
|
||||||
|
|
||||||
let
|
hydraJob ((import lib/eval-config.nix {
|
||||||
|
inherit system;
|
||||||
config = (import lib/eval-config.nix {
|
modules = [ module versionModule { isoImage.isoBaseName = "nixos-${type}"; } ];
|
||||||
inherit system;
|
}).config.system.build.isoImage);
|
||||||
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
|
|
||||||
''); # */
|
|
||||||
|
|
||||||
|
|
||||||
makeSystemTarball =
|
makeSystemTarball =
|
||||||
|
|
Loading…
Reference in New Issue