summary refs log blame commit diff
path: root/pkgs/stdenv/custom/default.nix
blob: 4c7380118f7d5107ec78eb15bdfede1b8177385a (plain) (tree)
1
2
3
4
5
6
7
8
9
     
                                                                
  
 
                                  
 

                            
                                                 

                                                             
    
 



                                               
                            



                                                           
    
 
 
{ lib
, localSystem, crossSystem, config, overlays, crossOverlays ? []
}:

assert crossSystem == localSystem;

let
  bootStages = import ../. {
    inherit lib localSystem crossSystem overlays;
    # Remove config.replaceStdenv to ensure termination.
    config = builtins.removeAttrs config [ "replaceStdenv" ];
  };

in bootStages ++ [

  # Additional stage, built using custom stdenv
  (vanillaPackages: {
    inherit config overlays;
    stdenv =
      assert vanillaPackages.hostPlatform == localSystem;
      assert vanillaPackages.targetPlatform == localSystem;
      config.replaceStdenv { pkgs = vanillaPackages; };
  })

]