Skip to content

Commit

Permalink
Merge pull request #324408 from Artturin/backport-323140-to-release-2…
Browse files Browse the repository at this point in the history
…4.05

[24.05] nixVersions.git: Fix version
  • Loading branch information
Artturin authored Jul 16, 2024
2 parents 36660ac + 1eb2c7b commit 62dd610
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
15 changes: 15 additions & 0 deletions pkgs/tools/package-management/nix/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ in

# passthru tests
, pkgsi686Linux
, runCommand
}: let
self = stdenv.mkDerivation {
pname = "nix";
Expand Down Expand Up @@ -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
'';
};
};

Expand Down
23 changes: 17 additions & 6 deletions pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{ lib
, config
, stdenv
, aws-sdk-cpp
, boehmgc
, callPackage
, fetchFromGitHub
, fetchpatch
, fetchpatch2
, runCommand
, overrideSDK
, Security

, storeDir ? "/nix/store"
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 62dd610

Please sign in to comment.