doctrine/lib: refactor 'close' helper
This commit is contained in:
parent
a8ef8e43b9
commit
c435223641
|
@ -3,8 +3,18 @@
|
|||
doctrine,
|
||||
pkgs,
|
||||
}: let
|
||||
close = f: args: f (args // {inherit lib pkgs doctrine;});
|
||||
close = vars: f: args:
|
||||
(
|
||||
if builtins.isPath f
|
||||
then import f
|
||||
else f
|
||||
)
|
||||
(args // vars);
|
||||
|
||||
closeLib = close {inherit lib;};
|
||||
closeFull = close {inherit lib pkgs doctrine;};
|
||||
in {
|
||||
importAll = pkgs.callPackage ./importAll.nix {};
|
||||
mkModule = close (import ./mk-module.nix);
|
||||
inherit close;
|
||||
importAll = closeLib ./importAll.nix;
|
||||
mkModule = closeFull ./mk-module.nix;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{lib}: {
|
||||
{
|
||||
lib,
|
||||
root,
|
||||
exclude ? ["default"],
|
||||
}:
|
||||
|
|
Loading…
Reference in a new issue