Merge branch 'master' into staging-next

This commit is contained in:
Wolfgang Walther
2025-07-24 14:19:22 +02:00
5320 changed files with 100901 additions and 103624 deletions

View File

@@ -40,7 +40,8 @@ let
class = "nixos";
specialArgs = {
modulesPath = builtins.toString ../modules;
} // specialArgs;
}
// specialArgs;
};
in

View File

@@ -31,7 +31,8 @@ pkgs.stdenv.mkDerivation {
btrfs-progs
libfaketime
fakeroot
] ++ lib.optional compressImage zstd;
]
++ lib.optional compressImage zstd;
buildCommand = ''
${if compressImage then "img=temp.img" else "img=$out"}

View File

@@ -33,7 +33,8 @@ pkgs.stdenv.mkDerivation {
libfaketime
perl
fakeroot
] ++ lib.optional compressImage zstd;
]
++ lib.optional compressImage zstd;
buildCommand = ''
${if compressImage then "img=temp.img" else "img=$out"}

View File

@@ -82,7 +82,8 @@ stdenv.mkDerivation {
syslinux
zstd
libossp_uuid
] ++ lib.optionals needSquashfs makeSquashfsDrv.nativeBuildInputs;
]
++ lib.optionals needSquashfs makeSquashfsDrv.nativeBuildInputs;
inherit
isoName

View File

@@ -29,40 +29,39 @@ stdenv.mkDerivation {
nativeBuildInputs = [ squashfsTools ];
buildCommand =
''
closureInfo=${closureInfo { rootPaths = storeContents; }}
buildCommand = ''
closureInfo=${closureInfo { rootPaths = storeContents; }}
# Also include a manifest of the closures in a format suitable
# for nix-store --load-db.
cp $closureInfo/registration nix-path-registration
# Also include a manifest of the closures in a format suitable
# for nix-store --load-db.
cp $closureInfo/registration nix-path-registration
imgPath="$out"
''
+ lib.optionalString hydraBuildProduct ''
imgPath="$out"
''
+ lib.optionalString hydraBuildProduct ''
mkdir $out
imgPath="$out/${fileName}.squashfs"
''
+ lib.optionalString stdenv.buildPlatform.is32bit ''
mkdir $out
imgPath="$out/${fileName}.squashfs"
''
+ lib.optionalString stdenv.buildPlatform.is32bit ''
# 64 cores on i686 does not work
# fails with FATAL ERROR: mangle2:: xz compress failed with error code 5
if ((NIX_BUILD_CORES > 48)); then
NIX_BUILD_CORES=48
fi
''
+ ''
# 64 cores on i686 does not work
# fails with FATAL ERROR: mangle2:: xz compress failed with error code 5
if ((NIX_BUILD_CORES > 48)); then
NIX_BUILD_CORES=48
fi
''
+ ''
# Generate the squashfs image.
# We have to set SOURCE_DATE_EPOCH to 0 here for reproducibility (https://github.com/NixOS/nixpkgs/issues/390696)
SOURCE_DATE_EPOCH=0 mksquashfs nix-path-registration $(cat $closureInfo/store-paths) $imgPath ${pseudoFilesArgs} \
-no-hardlinks ${lib.optionalString noStrip "-no-strip"} -keep-as-directory -all-root -b 1048576 ${compFlag} \
-processors $NIX_BUILD_CORES -root-mode 0755
''
+ lib.optionalString hydraBuildProduct ''
# Generate the squashfs image.
# We have to set SOURCE_DATE_EPOCH to 0 here for reproducibility (https://github.com/NixOS/nixpkgs/issues/390696)
SOURCE_DATE_EPOCH=0 mksquashfs nix-path-registration $(cat $closureInfo/store-paths) $imgPath ${pseudoFilesArgs} \
-no-hardlinks ${lib.optionalString noStrip "-no-strip"} -keep-as-directory -all-root -b 1048576 ${compFlag} \
-processors $NIX_BUILD_CORES -root-mode 0755
''
+ lib.optionalString hydraBuildProduct ''
mkdir -p $out/nix-support
echo "file squashfs-image $out/${fileName}.squashfs" >> $out/nix-support/hydra-build-products
'';
mkdir -p $out/nix-support
echo "file squashfs-image $out/${fileName}.squashfs" >> $out/nix-support/hydra-build-products
'';
}

View File

@@ -701,17 +701,16 @@ rec {
{
config = {
name = "${utils.escapeSystemdPath config.where}.mount";
mountConfig =
{
What = config.what;
Where = config.where;
}
// optionalAttrs (config.type != "") {
Type = config.type;
}
// optionalAttrs (config.options != "") {
Options = config.options;
};
mountConfig = {
What = config.what;
Where = config.where;
}
// optionalAttrs (config.type != "") {
Type = config.type;
}
// optionalAttrs (config.options != "") {
Options = config.options;
};
};
};

View File

@@ -37,18 +37,17 @@ python3Packages.buildPythonApplication {
]
++ extraPythonPackages python3Packages;
propagatedBuildInputs =
[
coreutils
netpbm
qemu_pkg
socat
vde2
]
++ lib.optionals enableOCR [
imagemagick_light
tesseract4
];
propagatedBuildInputs = [
coreutils
netpbm
qemu_pkg
socat
vde2
]
++ lib.optionals enableOCR [
imagemagick_light
tesseract4
];
passthru.tests = {
inherit (nixosTests.nixos-test-driver) driver-timeout;

View File

@@ -49,7 +49,8 @@ let
# inherit testName; TODO (roberth): need this?
nativeBuildInputs = [
hostPkgs.makeWrapper
] ++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ];
]
++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ];
buildInputs = [ testDriver ];
testScript = config.testScriptString;
preferLocalBuild = true;

View File

@@ -93,8 +93,11 @@ in
{
name = "vm-test-run-${config.name}";
requiredSystemFeatures =
[ "nixos-test" ] ++ lib.optional isLinux "kvm" ++ lib.optional isDarwin "apple-virt";
requiredSystemFeatures = [
"nixos-test"
]
++ lib.optional isLinux "kvm"
++ lib.optional isDarwin "apple-virt";
nativeBuildInputs = lib.optionals config.enableDebugHook [
hostPkgs.openssh