mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
lib: Update deferredModuleWith
polyfill
<dfd98a5da2
> (cherry picked from commit3bbcca6b6f
)
This commit is contained in:
parent
07f6395285
commit
0399486bc7
2 changed files with 6 additions and 3 deletions
5
lib.nix
5
lib.nix
|
@ -37,8 +37,11 @@ let
|
|||
attrs@{ staticModules ? [ ] }: mkOptionType {
|
||||
name = "deferredModule";
|
||||
description = "module";
|
||||
descriptionClass = "noun";
|
||||
check = x: isAttrs x || isFunction x || path.check x;
|
||||
merge = loc: defs: staticModules ++ map (def: lib.setDefaultModuleLocation "${def.file}, via option ${showOption loc}" def.value) defs;
|
||||
merge = loc: defs: {
|
||||
imports = staticModules ++ map (def: lib.setDefaultModuleLocation "${def.file}, via option ${showOption loc}" def.value) defs;
|
||||
};
|
||||
inherit (submoduleWith { modules = staticModules; })
|
||||
getSubOptions
|
||||
getSubModules;
|
||||
|
|
|
@ -119,9 +119,9 @@ in
|
|||
_module.args.moduleWithSystem = throwAliasError "moduleWithSystem";
|
||||
};
|
||||
});
|
||||
apply = modules: system:
|
||||
apply = module: system:
|
||||
(lib.evalModules {
|
||||
inherit modules;
|
||||
modules = [ module ];
|
||||
prefix = [ "perSystem" system ];
|
||||
specialArgs = {
|
||||
inherit system;
|
||||
|
|
Loading…
Reference in a new issue