nixVersions.nix_2_26: Fix cross and static

This commit is contained in:
Robert Hensing
2025-03-26 18:33:43 -04:00
committed by John Ericson
parent e94780f9f5
commit 90c1822309
3 changed files with 46 additions and 7 deletions
+17 -1
View File
@@ -12,5 +12,21 @@
# See also: https://github.com/NixOS/nix/issues/7582
builtins.mapAttrs (
_: pkg: if builtins.isAttrs pkg then pkg.override { withAWS = false; } else pkg
attr: pkg:
if
# TODO descend in `nixComponents_*` and override `nix-store`. Also
# need to introduce the flag needed to do that with.
#
# This must be done before Nix 2.26 and beyond becomes the default.
!(builtins.elem attr [
"nixComponents_2_26"
"nix_2_26"
"latest"
])
# There may-be non-package things, like functions, in there too
&& builtins.isAttrs pkg
then
pkg.override { withAWS = false; }
else
pkg
) pkgs.nixVersions
+23 -2
View File
@@ -5,6 +5,7 @@
aws-sdk-cpp,
boehmgc,
callPackage,
generateSplicesForMkScope,
fetchFromGitHub,
fetchpatch2,
runCommand,
@@ -199,6 +200,19 @@ let
};
};
# Factored out for when we have package sets for multiple versions of
# Nix.
#
# `nixPackages_*` would be the most regular name, analogous to
# `linuxPackages_*`, especially if we put other 3rd-party software in
# here, but `nixPackages_*` would also be *very* confusing to humans!
generateSplicesForNixComponents =
nixComponentsAttributeName:
generateSplicesForMkScope [
"nixVersions"
nixComponentsAttributeName
];
in
lib.makeExtensible (
self:
@@ -235,10 +249,17 @@ lib.makeExtensible (
self_attribute_name = "nix_2_25";
};
nix_2_26 = addTests "nix_2_26" (
callPackage ./vendor/2_26/componentized.nix { inherit (self.nix_2_24.meta) maintainers; }
nixComponents_2_26 = (
callPackage ./vendor/2_26/componentized.nix {
inherit (self.nix_2_24.meta) maintainers;
otherSplices = generateSplicesForNixComponents "nixComponents_2_26";
}
);
# Note, this might eventually become an alias, as packages should
# depend on the components they need in `nixComponents_2_26`.
nix_2_26 = addTests "nix_2_26" self.nixComponents_2_26.nix-everything;
git = common rec {
version = "2.25.0";
suffix = "pre20241101_${lib.substring 0 8 src.rev}";
@@ -7,7 +7,7 @@
pkgs,
stdenv,
maintainers,
...
otherSplices,
}:
let
officialRelease = true;
@@ -24,7 +24,7 @@ let
inherit (nixDependencies) newScope;
}
{
otherSplices = generateSplicesForMkScope "nixComponents";
inherit otherSplices;
f = import ./packaging/components.nix {
inherit
lib
@@ -45,11 +45,13 @@ let
inherit newScope; # layered directly on pkgs, unlike nixComponents above
}
{
otherSplices = generateSplicesForMkScope "nixDependencies";
# Technically this should point to the nixDependencies set only, but
# this is ok as long as the scopes don't intersect.
inherit otherSplices;
f = import ./dependencies.nix {
inherit pkgs;
inherit stdenv;
};
};
in
(nixComponents.overrideSource src).nix-everything
nixComponents.overrideSource src