patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 08dc198afc25b6362f2aedabf9e9450dd02eb4ad 2130 bytes (raw)
name: release/live/default.nix 	 # note: path name is non-authoritative(*)

 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2023, 2025 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2022 Unikie
# SPDX-FileCopyrightText: 2025 Demi Marie Obenour <demiobenour@gmail.com>

import ../../lib/call-package.nix (
{ callSpectrumPackage, spectrum-build-tools, rootfs, src
, lib, pkgsStatic, stdenvNoCC
, cryptsetup, dosfstools, jq, mtools, util-linux
, systemdUkify, bash
}:

let
  inherit (lib) toUpper;

  stdenv = stdenvNoCC;

  systemd = systemdUkify.overrideAttrs ({ mesonFlags ? [], ... }: {
    # The default limit is too low to build a generic aarch64 distro image:
    # https://github.com/systemd/systemd/pull/37417
    mesonFlags = mesonFlags ++ [ "-Defi-stub-extra-sections=3000" ];
  });

  initramfs = callSpectrumPackage ../../host/initramfs {};
  efiArch = stdenv.hostPlatform.efiArch;
in

stdenv.mkDerivation {
  name = "spectrum-live.img";

  src = lib.fileset.toSource {
    root = ../..;
    fileset = lib.fileset.intersection src (lib.fileset.unions [
      ./.
      ../../lib/common.mk
      ../../lib/kcmdline-utils.mk
      ../../lib/verity.mk
      ../../scripts/format-uuid.awk
      ../../scripts/format-uuid.sh
      ../../scripts/make-gpt.bash
      ../../scripts/make-gpt.sh
      ../../scripts/make-live-image.sh
      ../../scripts/sfdisk-field.awk
      ../../version
    ]);
  };
  sourceRoot = "source/release/live";

  nativeBuildInputs = [
    bash cryptsetup dosfstools jq spectrum-build-tools mtools systemd util-linux
  ];

  env = {
    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";
    VERSION = import ../../lib/version.nix;
    DESTDIR = "$(out)";
  } // lib.optionalAttrs stdenv.hostPlatform.linux-kernel.DTB or false {
    DTBS = "${rootfs.kernel}/dtbs";
  };

  enableParallelBuilding = true;

  __structuredAttrs = true;
  unsafeDiscardReferences = { out = true; };
  dontFixup = true;

  passthru = { inherit initramfs rootfs; };
}
) (_: {})

debug log:

solving 08dc198afc25b6362f2aedabf9e9450dd02eb4ad ...
found 08dc198afc25b6362f2aedabf9e9450dd02eb4ad in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-6-401c1be2a11b@gmail.com/
found c6dcabd49363e113eb0783ced2a167633a6e19c3 in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-5-401c1be2a11b@gmail.com/
found b5c0c8df31d4c6cb7fdd2337e8169f36655dd1a8 in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
found 2a1dc3e1dd939f21edac582bf39737eb4d46eb0c in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100644 2a1dc3e1dd939f21edac582bf39737eb4d46eb0c	release/live/default.nix

applying [1/3] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
diff --git a/release/live/default.nix b/release/live/default.nix
index 2a1dc3e1dd939f21edac582bf39737eb4d46eb0c..b5c0c8df31d4c6cb7fdd2337e8169f36655dd1a8 100644


applying [2/3] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-5-401c1be2a11b@gmail.com/
diff --git a/release/live/default.nix b/release/live/default.nix
index b5c0c8df31d4c6cb7fdd2337e8169f36655dd1a8..c6dcabd49363e113eb0783ced2a167633a6e19c3 100644


applying [3/3] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-6-401c1be2a11b@gmail.com/
diff --git a/release/live/default.nix b/release/live/default.nix
index c6dcabd49363e113eb0783ced2a167633a6e19c3..08dc198afc25b6362f2aedabf9e9450dd02eb4ad 100644

Checking patch release/live/default.nix...
Applied patch release/live/default.nix cleanly.
Checking patch release/live/default.nix...
Applied patch release/live/default.nix cleanly.
Checking patch release/live/default.nix...
Applied patch release/live/default.nix cleanly.

index at:
100644 08dc198afc25b6362f2aedabf9e9450dd02eb4ad	release/live/default.nix

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).