Merge pull request #323140 from hercules-ci/fix-nixVersions-git-version

`nixVersions.git`: Fix version and test it
This commit is contained in:
Artturin 2024-07-02 22:45:07 +03:00 committed by GitHub
commit 4e8d08a197
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View File

@ -85,6 +85,7 @@ in
# passthru tests
, pkgsi686Linux
, runCommand
}: let
self = stdenv.mkDerivation {
pname = "nix";
@ -259,6 +260,21 @@ self = stdenv.mkDerivation {
# Basic smoke test that needs to pass when upgrading nix.
# Note that this test does only test the nixVersions.stable attribute.
misc = nixosTests.nix-misc.default;
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

@ -183,7 +183,7 @@ in lib.makeExtensible (self: ({
};
git = common rec {
version = "2.23.1";
version = "2.24.0";
suffix = "pre20240627_${lib.substring 0 8 src.rev}";
src = fetchFromGitHub {
owner = "NixOS";