release.nix: Build the demo rootfs
As thus rootfs is universal, building it will allow end-users to
directly be able to run a somewhat usable system on their devices, even
if they are unable to bootstrap themselves one.
Furthermore, this ensures that the requirements are built and do
continue building on aarch64-linux.
@@ -79,20 +79,11 @@ let
}
;
- # Given a system builds run on, this will return a set of further systems
- # this builds in, either native or cross.
- # The values are `overlayForEval` applied for the pair local/cross systems.
- evalForSystem = system: builtins.listToAttrs
- (builtins.map (
- buildingForSystem:
- let
- # "device" name for the eval *and* key used for the set.
- name = if system == buildingForSystem then buildingForSystem else "${buildingForSystem}-cross";
- # "device" eval for our dummy device.
- eval = evalFor {
+ specialConfig = {name, buildingForSystem, system}: {
special = true;
inherit name;
config = {
+ mobile.device.info = {};
mobile.system.type = "none";
mobile.hardware.soc = {
x86_64-linux = "generic-x86_64";
@@ -102,6 +93,18 @@ let
nixpkgs.localSystem = knownSystems.${system};
};
};
+
+ # Given a system builds run on, this will return a set of further systems
+ # this builds in, either native or cross.
+ # The values are `overlayForEval` applied for the pair local/cross systems.
+ evalForSystem = system: builtins.listToAttrs
+ (builtins.map (
+ buildingForSystem:
+ let
+ # "device" name for the eval *and* key used for the set.
+ name = if system == buildingForSystem then buildingForSystem else "${buildingForSystem}-cross";
+ # "device" eval for our dummy device.
+ eval = evalFor (specialConfig {inherit name buildingForSystem system;});
overlay = overlayForEval eval;
in {
inherit name;
@@ -119,9 +122,21 @@ let
} device).build.default
)
);
+
+ examples-demo =
+ let
+ device = (specialConfig {
+ name = "aarch64-linux";
+ buildingForSystem = "aarch64-linux";
+ system = "aarch64-linux";
+ });
+ in
+ import ./examples/demo { inherit device; };
+ examples-demo-rootfs = examples-demo.build.rootfs;
in
{
inherit device;
+ inherit examples-demo-rootfs;
# Overlays build native, and cross, according to shouldEvalOn
overlay = lib.genAttrs systems (system:
@@ -141,6 +156,7 @@ in
++ lib.optionals (hasSystem "aarch64-linux") [
device.asus-z00t.aarch64-linux # Android
device.asus-dumo.aarch64-linux # Depthcharge
+ examples-demo-rootfs
];
in
releaseTools.aggregate {
