Skip to content

Commit

Permalink
tests.stdenv.outputs-no-out: cause less rebuilds
Browse files Browse the repository at this point in the history
now gcc isn't built
  • Loading branch information
Artturin authored and roberth committed Mar 2, 2023
1 parent c8b7048 commit 6e422a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/test/stdenv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? { } }:

Expand Down Expand Up @@ -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"];
Expand Down

0 comments on commit 6e422a0

Please sign in to comment.