Unverified Commit d29ca634 authored by John Ericson's avatar John Ericson Committed by GitHub
Browse files

nixVersions.nix_2_26: fix cross (#393530)

parents 8b857576 90c18223
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -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 −3
Original line number Diff line number Diff line
@@ -4,8 +4,8 @@
  stdenv,
  aws-sdk-cpp,
  boehmgc,
  libgit2,
  callPackage,
  generateSplicesForMkScope,
  fetchFromGitHub,
  fetchpatch2,
  runCommand,
@@ -200,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:
@@ -236,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}";
+6 −4
Original line number Diff line number Diff line
@@ -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