Avoid nixpkgs reevaluation

The bsc attrset is now extensible: replacing a few bsc packages is very
fast. Also we allow the complete bscpkgs to be within other custom
overlays (not tested yet).
This commit is contained in:
2020-11-17 10:49:45 +01:00
parent 3372f94855
commit 18afcb1f44
2 changed files with 60 additions and 77 deletions

View File

@@ -4,6 +4,7 @@
, stages
, targetMachine
, garlicTools
, bsc
}:
with stdenv.lib;
@@ -82,18 +83,8 @@ rec {
stdPipeline = stdPipelineOverride {};
# FIXME: Remove this hack and allow custom nixpkgs
bscOverlay = import ../overlay.nix;
nixpkgs = import <nixpkgs>;
genPkgs = newOverlay: nixpkgs {
overlays = [
bscOverlay
newOverlay
];
};
replaceMpi = mpi: genPkgs (self: super: {
bsc = super.bsc // { inherit mpi; };
replaceMpi = customMpi: bsc.extend (self: super: {
mpi = customMpi;
});
# Generate the experimental units