Merge pull request #324408 from Artturin/backport-323140-to-release-24.05

[24.05] nixVersions.git: Fix version
This commit is contained in:
Artturin 2024-07-16 22:23:21 +03:00 committed by GitHub
commit 62dd610f62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 6 deletions

View File

@ -84,6 +84,7 @@ in
# passthru tests
, pkgsi686Linux
, runCommand
}: let
self = stdenv.mkDerivation {
pname = "nix";
@ -255,6 +256,20 @@ self = stdenv.mkDerivation {
tests = {
nixi686 = pkgsi686Linux.nixVersions.${self_attribute_name};
srcVersion = runCommand "nix-src-version" {
inherit version;
} ''
# This file is an implementation detail, but it's a good sanity check
# If upstream changes that, we'll have to adapt.
srcVersion=$(cat ${src}/.version)
echo "Version in nix nix expression: $version"
echo "Version in nix.src: $srcVersion"
if [ "$version" != "$srcVersion" ]; then
echo "Version mismatch!"
exit 1
fi
touch $out
'';
};
};

View File

@ -1,5 +1,6 @@
{ lib
, config
, stdenv
, aws-sdk-cpp
, boehmgc
, callPackage
@ -7,6 +8,7 @@
, fetchpatch
, fetchpatch2
, runCommand
, overrideSDK
, Security
, storeDir ? "/nix/store"
@ -176,17 +178,26 @@ in lib.makeExtensible (self: ({
self_attribute_name = "nix_2_22";
};
git = common rec {
version = "2.23.1";
suffix = "pre20240627_${lib.substring 0 8 src.rev}";
git = (common rec {
version = "2.24.0";
suffix = "pre20240709_${lib.substring 0 8 src.rev}";
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "b44909ac2244bda4c387b9a17748e8a94ada9e78";
hash = "sha256-tS8i/fyi2DO5GM103b+G7K/XwFWhWvb2VDjqpLH5Kxc=";
rev = "142e566adbce587a5ed97d1648a26352f0608ec5";
hash = "sha256-fYZGuB/4LOBoMSUNj/yRU1mWm9lhdTzXF0P+zmac0hw=";
};
self_attribute_name = "git";
};
}).override (lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) {
# Fix the following error with the default x86_64-darwin SDK:
#
# error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer
#
# Despite the use of the 10.13 deployment target here, the aligned
# allocation function Clang uses with this setting actually works
# all the way back to 10.6.
stdenv = overrideSDK stdenv { darwinMinVersion = "10.13"; };
});
latest = self.nix_2_22;