diff options
author | Andrew Childs <lorne@cons.org.nz> | 2019-06-01 04:19:18 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2019-09-05 00:52:20 +0900 |
commit | 25bee972e9411916c809d88d1ca46e36629a77d6 (patch) | |
tree | c4202eee6f46d444bec5398efc24fa02b4482ffa /nixos/maintainers | |
parent | 9898fd0e8e47c21a0206b2298ded0f99ae494be6 (diff) | |
download | nixpkgs-25bee972e9411916c809d88d1ca46e36629a77d6.tar nixpkgs-25bee972e9411916c809d88d1ca46e36629a77d6.tar.gz nixpkgs-25bee972e9411916c809d88d1ca46e36629a77d6.tar.bz2 nixpkgs-25bee972e9411916c809d88d1ca46e36629a77d6.tar.lz nixpkgs-25bee972e9411916c809d88d1ca46e36629a77d6.tar.xz nixpkgs-25bee972e9411916c809d88d1ca46e36629a77d6.tar.zst nixpkgs-25bee972e9411916c809d88d1ca46e36629a77d6.zip |
amazon-image.nix: add hydra-build-products and improve metadata
Diffstat (limited to 'nixos/maintainers')
-rw-r--r-- | nixos/maintainers/scripts/ec2/amazon-image.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/maintainers/scripts/ec2/amazon-image.nix b/nixos/maintainers/scripts/ec2/amazon-image.nix index 310396ac644..059df34e9fe 100644 --- a/nixos/maintainers/scripts/ec2/amazon-image.nix +++ b/nixos/maintainers/scripts/ec2/amazon-image.nix @@ -17,7 +17,7 @@ in { name = mkOption { type = types.str; description = "The name of the generated derivation"; - default = "nixos-disk-image"; + default = "nixos-amazon-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}"; }; contents = mkOption { @@ -68,5 +68,14 @@ in { ''} } ''; + postVM = '' + extension=''${diskImage##*.} + friendlyName=$out/${cfg.name}.$extension + mv "$diskImage" "$friendlyName" + diskImage=$friendlyName + + mkdir -p $out/nix-support + echo "file ${cfg.format} $diskImage" >> $out/nix-support/hydra-build-products + ''; }; } |