mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-09-11 12:05:26 +03:00
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.
This commit is contained in:
parent
8fd6adc884
commit
875a94f659
42
release.nix
42
release.nix
@ -79,6 +79,21 @@ let
|
||||
}
|
||||
;
|
||||
|
||||
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";
|
||||
aarch64-linux = "generic-aarch64";
|
||||
armv7l-linux = "generic-armv7l";
|
||||
}.${buildingForSystem};
|
||||
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.
|
||||
@ -89,19 +104,7 @@ 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 {
|
||||
special = true;
|
||||
inherit name;
|
||||
config = {
|
||||
mobile.system.type = "none";
|
||||
mobile.hardware.soc = {
|
||||
x86_64-linux = "generic-x86_64";
|
||||
aarch64-linux = "generic-aarch64";
|
||||
armv7l-linux = "generic-armv7l";
|
||||
}.${buildingForSystem};
|
||||
nixpkgs.localSystem = knownSystems.${system};
|
||||
};
|
||||
};
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user