You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{ nixosSrc ? { outPath = ./.; revCount = 1234; shortRev = "abcdefg"; }
|
|
, nixpkgs ? { outPath = <nixpkgs>; revCount = 5678; shortRev = "gfedcba"; }
|
|
, officialRelease ? false
|
|
}:
|
|
|
|
let
|
|
|
|
version = builtins.readFile ./.version;
|
|
versionSuffix = "pre${toString nixosSrc.revCount}_${nixosSrc.shortRev}-${nixpkgs.shortRev}";
|
|
|
|
systems = [ "x86_64-linux" ];
|
|
|
|
pkgs = import <nixpkgs> { system = "x86_64-linux"; };
|
|
|
|
|
|
versionModule =
|
|
{ system.nixosVersionSuffix = pkgs.lib.optionalString (!officialRelease) versionSuffix; };
|
|
|
|
################# https://github.com/NixOS/nixpkgs/blob/master/nixos/release.nix
|
|
|
|
in {
|
|
/*
|
|
# A bootable VirtualBox virtual appliance as an OVA file (i.e. packaged OVF).
|
|
ova = pkgs.lib.genAttrs systems (system:
|
|
|
|
with import <nixpkgs> { inherit system; };
|
|
|
|
let
|
|
|
|
config = (import lib/eval-config.nix {
|
|
inherit system;
|
|
modules =
|
|
[ versionModule
|
|
#./modules/installer/virtualbox-demo.nix
|
|
./ova-module.nix
|
|
];
|
|
}).config;
|
|
|
|
in
|
|
# Declare the OVA as a build product so that it shows up in Hydra.
|
|
runCommand "nixos-ova-${config.system.nixosVersion}-${system}"
|
|
{ meta = {
|
|
description = "NixOS VirtualBox appliance (${system})";
|
|
maintainers = lib.maintainers.jpierre03;
|
|
};
|
|
ova = config.system.build.virtualBoxOVA;
|
|
}
|
|
''
|
|
mkdir -p $out/nix-support
|
|
fn=$(echo $ova/*.ova)
|
|
echo "file ova $fn" >> $out/nix-support/hydra-build-products
|
|
''
|
|
);
|
|
*/
|
|
} |