nixVersions.nix_2_31: init at 2.31.0 (#437584)

Changed files
+81 -46
nixos
pkgs
by-name
bm
bmake
tools
package-management
nix
modular
src
libfetchers-tests
libflake-tests
libstore-tests
+4 -1
nixos/tests/all-tests.nix
···
nix-config = runTest ./nix-config.nix;
nix-ld = runTest ./nix-ld.nix;
nix-misc = handleTest ./nix/misc.nix { };
-
nix-upgrade = handleTest ./nix/upgrade.nix { inherit (pkgs) nixVersions; };
+
nix-upgrade = handleTest ./nix/upgrade.nix {
+
inherit (pkgs) nixVersions;
+
inherit system;
+
};
nix-required-mounts = runTest ./nix-required-mounts;
nix-serve = runTest ./nix-serve.nix;
nix-serve-ssh = runTest ./nix-serve-ssh.nix;
+9 -4
nixos/tests/nix/upgrade.nix
···
-
{ pkgs, nixVersions, ... }:
+
{
+
pkgs,
+
nixVersions,
+
system,
+
...
+
}:
let
lib = pkgs.lib;
fallback-paths-external = pkgs.writeTextDir "fallback-paths.nix" ''
{
-
${pkgs.system} = "${nixVersions.latest}";
+
${system} = "${nixVersions.latest}";
}'';
nixos-module = builtins.toFile "nixos-module.nix" ''
···
if not match: raise Exception("Couldn't find new version in output: " + result)
with subtest("nix-build-with-mismatch-daemon"):
-
machine.succeed("runuser -u alice -- nix build --expr 'derivation {name =\"test\"; system = \"${pkgs.system}\";builder = \"/bin/sh\"; args = [\"-c\" \"echo test > $out\"];}' --print-out-paths")
+
machine.succeed("runuser -u alice -- nix build --expr 'derivation {name =\"test\"; system = \"${system}\";builder = \"/bin/sh\"; args = [\"-c\" \"echo test > $out\"];}' --print-out-paths")
with subtest("remove-new-nix"):
···
if not match: raise Exception("Couldn't find new version in output: " + result)
with subtest("nix-build-with-new-daemon"):
-
machine.succeed("runuser -u alice -- nix build --expr 'derivation {name =\"test-new\"; system = \"${pkgs.system}\";builder = \"/bin/sh\"; args = [\"-c\" \"echo test > $out\"];}' --print-out-paths")
+
machine.succeed("runuser -u alice -- nix build --expr 'derivation {name =\"test-new\"; system = \"${system}\";builder = \"/bin/sh\"; args = [\"-c\" \"echo test > $out\"];}' --print-out-paths")
with subtest("nix-collect-garbage-with-old-nix"):
machine.succeed("${nixVersions.stable}/bin/nix-collect-garbage")
+12 -6
pkgs/by-name/bm/bmake/package.nix
···
# * opt-keep-going-indirect: not yet known
# * varmod-localtime: musl doesn't support TZDIR and this test relies on
# impure, implicit paths
-
env.BROKEN_TESTS = builtins.concatStringsSep " " [
-
"directive-export"
-
"directive-export-gmake"
-
"opt-keep-going-indirect"
-
"varmod-localtime"
-
];
+
# * interrupt-compat (fails on x86_64-linux building for i686-linux)
+
env.BROKEN_TESTS = lib.concatStringsSep " " (
+
[
+
"directive-export"
+
"directive-export-gmake"
+
"opt-keep-going-indirect"
+
"varmod-localtime"
+
]
+
++ lib.optionals stdenv.targetPlatform.is32bit [
+
"interrupt-compat"
+
]
+
);
strictDeps = true;
+14
pkgs/tools/package-management/nix/default.nix
···
nix_2_30 = addTests "nix_2_30" self.nixComponents_2_30.nix-everything;
+
nixComponents_2_31 = nixDependencies.callPackage ./modular/packages.nix rec {
+
version = "2.31.0";
+
inherit (self.nix_2_30.meta) maintainers teams;
+
otherSplices = generateSplicesForNixComponents "nixComponents_2_31";
+
src = fetchFromGitHub {
+
owner = "NixOS";
+
repo = "nix";
+
tag = version;
+
hash = "sha256-5JYyijH2q/uQCDIZCCyQEBsZ0VPNP2SS1wgZ4+qeIWM=";
+
};
+
};
+
+
nix_2_31 = addTests "nix_2_31" self.nixComponents_2_31.nix-everything;
+
nixComponents_git = nixDependencies.callPackage ./modular/packages.nix rec {
version = "2.31pre20250712_${lib.substring 0 8 src.rev}";
inherit maintainers teams;
+14 -1
pkgs/tools/package-management/nix/dependencies.nix
···
{
scopeFunction = scope: {
-
boehmgc = regular.boehmgc.override { enableLargeConfig = true; };
+
boehmgc =
+
(regular.boehmgc.override {
+
enableLargeConfig = true;
+
}).overrideAttrs
+
(attrs: {
+
# Increase the initial mark stack size to avoid stack
+
# overflows, since these inhibit parallel marking (see
+
# GC_mark_some()). To check whether the mark stack is too
+
# small, run Nix with GC_PRINT_STATS=1 and look for messages
+
# such as `Mark stack overflow`, `No room to copy back mark
+
# stack`, and `Grew mark stack to ... frames`.
+
NIX_CFLAGS_COMPILE = "-DINITIAL_MARK_STACK_SIZE=1048576";
+
});
+
aws-sdk-cpp =
(regular.aws-sdk-cpp.override {
apis = [
+7 -11
pkgs/tools/package-management/nix/modular/src/libfetchers-tests/package.nix
···
buildPackages,
stdenv,
mkMesonExecutable,
+
writableTmpDirAsHomeHook,
nix-fetchers,
nix-fetchers-c,
···
runCommand "${finalAttrs.pname}-run"
{
meta.broken = !stdenv.hostPlatform.emulatorAvailable buildPackages;
+
buildInputs = [ writableTmpDirAsHomeHook ];
}
-
(
-
lib.optionalString stdenv.hostPlatform.isWindows ''
-
export HOME="$PWD/home-dir"
-
mkdir -p "$HOME"
-
''
-
+ ''
-
export _NIX_TEST_UNIT_DATA=${resolvePath ./data}
-
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage}
-
touch $out
-
''
-
);
+
''
+
export _NIX_TEST_UNIT_DATA=${resolvePath ./data}
+
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage}
+
touch $out
+
'';
};
};
+8 -12
pkgs/tools/package-management/nix/modular/src/libflake-tests/package.nix
···
buildPackages,
stdenv,
mkMesonExecutable,
+
writableTmpDirAsHomeHook,
nix-flake,
nix-flake-c,
···
runCommand "${finalAttrs.pname}-run"
{
meta.broken = !stdenv.hostPlatform.emulatorAvailable buildPackages;
+
buildInputs = [ writableTmpDirAsHomeHook ];
}
-
(
-
lib.optionalString stdenv.hostPlatform.isWindows ''
-
export HOME="$PWD/home-dir"
-
mkdir -p "$HOME"
-
''
-
+ ''
-
export _NIX_TEST_UNIT_DATA=${resolvePath ./data}
-
export NIX_CONFIG="extra-experimental-features = flakes"
-
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage}
-
touch $out
-
''
-
);
+
(''
+
export _NIX_TEST_UNIT_DATA=${resolvePath ./data}
+
export NIX_CONFIG="extra-experimental-features = flakes"
+
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage}
+
touch $out
+
'');
};
};
+13 -11
pkgs/tools/package-management/nix/modular/src/libstore-tests/package.nix
···
buildPackages,
stdenv,
mkMesonExecutable,
+
writableTmpDirAsHomeHook,
nix-store,
nix-store-c,
···
mesonFlags = [
];
+
excludedTestPatterns = lib.optionals (lib.versionOlder finalAttrs.version "2.31") [
+
"nix_api_util_context.nix_store_real_path_binary_cache"
+
];
+
passthru = {
tests = {
run =
···
runCommand "${finalAttrs.pname}-run"
{
meta.broken = !stdenv.hostPlatform.emulatorAvailable buildPackages;
+
buildInputs = [ writableTmpDirAsHomeHook ];
}
-
(
-
lib.optionalString stdenv.hostPlatform.isWindows ''
-
export HOME="$PWD/home-dir"
-
mkdir -p "$HOME"
-
''
-
+ ''
-
export _NIX_TEST_UNIT_DATA=${data + "/src/libstore-tests/data"}
-
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage}
-
touch $out
-
''
-
);
+
(''
+
export _NIX_TEST_UNIT_DATA=${data + "/src/libstore-tests/data"}
+
export NIX_REMOTE=$HOME/store
+
${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe finalAttrs.finalPackage} \
+
--gtest_filter=-${lib.concatStringsSep ":" finalAttrs.excludedTestPatterns}
+
touch $out
+
'');
};
};