Loading nixos/modules/virtualisation/qemu-vm.nix +9 −3 Original line number Diff line number Diff line Loading @@ -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 '' Loading pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/services.py +7 −2 Original line number Diff line number Diff line Loading @@ -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( Loading Loading @@ -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, ) pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/utils.py +2 −2 Original line number Diff line number Diff line Loading @@ -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)) Loading pkgs/by-name/ni/nixos-rebuild-ng/src/tests/helpers.py +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( Loading pkgs/development/compilers/gcc/default.nix +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
nixos/modules/virtualisation/qemu-vm.nix +9 −3 Original line number Diff line number Diff line Loading @@ -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 '' Loading
pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/services.py +7 −2 Original line number Diff line number Diff line Loading @@ -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( Loading Loading @@ -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, )
pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/utils.py +2 −2 Original line number Diff line number Diff line Loading @@ -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)) Loading
pkgs/by-name/ni/nixos-rebuild-ng/src/tests/helpers.py +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( Loading
pkgs/development/compilers/gcc/default.nix +1 −1 Original line number Diff line number Diff line Loading @@ -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