1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-26 01:13:37 +03:00

depthcharge: Allows kpart to be built independently

This commit is contained in:
Samuel Dionne-Riel 2019-09-22 15:52:10 -04:00
parent 7f5266de24
commit 4c4f8468f3
2 changed files with 8 additions and 5 deletions

View File

@ -4,7 +4,7 @@ let
device_config = config.mobile.device;
enabled = config.mobile.system.type == "depthcharge";
disk-image = pkgs.callPackage ../../systems/depthcharge {
build = pkgs.callPackage ../../systems/depthcharge {
inherit device_config;
initrd = config.system.build.initrd;
system = config.system.build.rootfs;
@ -16,9 +16,9 @@ in
(lib.mkIf enabled {
system.build = {
inherit disk-image;
inherit (build) disk-image kpart;
# installer shortcut; it's a depthcharge disk-image build.
mobile-installer = disk-image;
mobile-installer = build.disk-image;
};
})
];

View File

@ -109,10 +109,12 @@ let
];
};
in
{
inherit kpart;
# Takes the built image, and do some light editing using `cgpt`.
# This uses some depthcharge-specific fields to make the image bootable.
# FIXME : integrate into the makeGPT call with postBuild or something
runCommandNoCC "depthcharge-${device_name}" { nativeBuildInputs = [ vboot_reference ]; } ''
disk-image = runCommandNoCC "depthcharge-${device_name}" { nativeBuildInputs = [ vboot_reference ]; } ''
# Copy the generated image...
# Note that while it's GPT, it's lacking some depthcharge magic attributes
cp ${image}/${name}.img ./
@ -129,4 +131,5 @@ in
mkdir -p $out
cp ${name}.img $out/
''
'';
}