Commit bb984408 authored by Robert Hensing's avatar Robert Hensing
Browse files

lib/tests/release.nix: Use nix.overrideScope for >=2.26

parent d74838df
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
{
  lib ? pkgs.lib,
  pkgs,
}:

@@ -13,20 +14,8 @@

builtins.mapAttrs (
  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; }
  if lib.versionAtLeast pkg.version "2.26" then
    pkg.overrideScope (finalScope: prevScope: { aws-sdk-cpp = null; })
  else
    pkg
    pkg.override { withAWS = false; }
) pkgs.nixVersions