blob: b7ee0361ab8578ac7df8a7275cfc993f43a172e0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2023 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2022 Unikie
import ../../lib/eval-config.nix (
{ config, src
, lseek ? import ../../tools/lseek { inherit config; }
, ...
}:
config.pkgs.callPackage (
{ stdenvNoCC, cryptsetup, dosfstools, jq, mtools, util-linux, stdenv
, systemd
}:
let
inherit (config) pkgs;
inherit (pkgs.lib) toUpper;
extfs = pkgs.pkgsStatic.callPackage ../../host/initramfs/extfs.nix {
inherit config;
};
rootfs = import ../../host/rootfs { inherit config; };
initramfs = import ../../host/initramfs { inherit config rootfs; };
efiArch = stdenv.hostPlatform.efiArch;
in
stdenvNoCC.mkDerivation {
name = "spectrum-live.img";
inherit src;
sourceRoot = "source/release/live";
nativeBuildInputs = [ cryptsetup dosfstools jq lseek mtools util-linux ];
EXT_FS = extfs;
INITRAMFS = initramfs;
KERNEL = "${rootfs.kernel}/${stdenv.hostPlatform.linux-kernel.target}";
ROOT_FS = rootfs;
SYSTEMD_BOOT_EFI = "${systemd}/lib/systemd/boot/efi/systemd-boot${efiArch}.efi";
EFINAME = "BOOT${toUpper efiArch}.EFI";
buildFlags = [ "dest=$(out)" ];
dontInstall = true;
enableParallelBuilding = true;
passthru = { inherit rootfs; };
}
) {})
|