tests.stdenv.outputs-no-out: cause less rebuilds

now gcc isn't built
This commit is contained in:
Artturin 2023-03-02 14:40:45 +02:00 committed by Robert Hensing
parent c8b7048233
commit 6e422a0fba

View file

@ -4,18 +4,20 @@
{ stdenv
, pkgs
, lib
, runCommand
, testers
}:
let
# early enough not to rebuild gcc but late enough to have patchelf
earlyPkgs = stdenv.__bootPackages.stdenv.__bootPackages;
earlierPkgs = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages;
# use a early stdenv so when hacking on stdenv this test can be run quickly
bootStdenv = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv;
pkgsStructured = import pkgs.path { config = { structuredAttrsByDefault = true; }; inherit (stdenv.hostPlatform) system; };
bootStdenvStructuredAttrsByDefault = pkgsStructured.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv;
runCommand = earlierPkgs.runCommand;
ccWrapperSubstitutionsTest = { name, stdenv', extraAttrs ? { } }:
@ -101,7 +103,7 @@ in
hooks = lib.recurseIntoAttrs (import ./hooks.nix { stdenv = bootStdenv; pkgs = earlyPkgs; inherit lib; });
outputs-no-out = runCommand "outputs-no-out-assert" {
result = testers.testBuildFailure (stdenv.mkDerivation {
result = earlierPkgs.testers.testBuildFailure (bootStdenv.mkDerivation {
NIX_DEBUG = 1;
name = "outputs-no-out";
outputs = ["foo"];