Unverified Commit 061c5585 authored by K900's avatar K900 Committed by GitHub
Browse files

staging-nixos merge for 2025-10-29 (#456736)

parents 2bab6a0f 1fa9b5e8
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -136,14 +136,20 @@ let
            ''
              # Create a writable qcow2 image using the systemImage as a backing
              # image.
              BACKING_SIZE_MB=$(( $(${lib.getExe' qemu "qemu-img"} info ${systemImage}/nixos.qcow2 --output=json | ${lib.getExe hostPkgs.jq} -r '."virtual-size"') / 1024 / 1024 ))
              DISK_SIZE_MB=${toString cfg.diskSize}
              if (( DISK_SIZE_MB < BACKING_SIZE_MB )); then
                OVERLAY_SIZE_MB=$BACKING_SIZE_MB
              else
                OVERLAY_SIZE_MB=$DISK_SIZE_MB
              fi

              # CoW prevent size to be attributed to an image.
              # FIXME: raise this issue to upstream.
              ${qemu}/bin/qemu-img create \
                -f qcow2 \
                -b ${systemImage}/nixos.qcow2 \
                -F qcow2 \
                "$NIX_DISK_IMAGE"
                "$NIX_DISK_IMAGE" \
                 ''${OVERLAY_SIZE_MB}M
            ''
          else if cfg.useDefaultFilesystems then
            ''
+7 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ NIXOS_REBUILD_ATTR: Final = "config.system.build.nixos-rebuild"
NIXOS_REBUILD_REEXEC_ENV: Final = "_NIXOS_REBUILD_REEXEC"

logger: Final = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


def reexec(
@@ -372,4 +371,10 @@ def write_version_suffix(build_flags: Args) -> None:
    nixpkgs_path = nix.find_file("nixpkgs", build_flags)
    rev = nix.get_nixpkgs_rev(nixpkgs_path)
    if nixpkgs_path and rev:
        try:
            (nixpkgs_path / ".version-suffix").write_text(rev)
        except OSError as error:
            logger.debug(
                "ignoring error while writing '.version-suffix' to nixpkgs: %s",
                error,
            )
+2 −2
Original line number Diff line number Diff line
@@ -90,11 +90,11 @@ def tabulate(
    def format_row(row: Mapping[str, Any]) -> str:
        s = (2 * " ").join(
            f"{str(row[header]).ljust(width)}"
            for header, width in zip(data_headers, column_widths)
            for header, width in zip(data_headers, column_widths, strict=True)
        )
        return s.strip()

    result = [format_row(dict(zip(data_headers, data_headers)))]
    result = [format_row(dict(zip(data_headers, data_headers, strict=True)))]
    for row in data:
        result.append(format_row(row))

+2 −1
Original line number Diff line number Diff line
from collections.abc import Callable
from types import ModuleType
from typing import Any, Callable
from typing import Any


def get_qualified_name(
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
  cargo,
  staticCompiler ? false,
  enableShared ? stdenv.targetPlatform.hasSharedLibraries,
  enableDefaultPie ? true,
  enableDefaultPie ? stdenv.targetPlatform.hasSharedLibraries,
  enableLTO ? stdenv.hostPlatform.hasSharedLibraries,
  texinfo ? null,
  perl ? null, # optional, for texi2pod (then pod2man)
Loading