fix: forward incoming modules when using importPackages interface

Before this patch, if a user calls `importPackages` and includes custom modules in the call, those would be lost.

@moduon MT-1075
This commit is contained in:
Jairo Llopis 2023-09-18 09:47:31 +01:00 committed by DavHau
parent f8626675d4
commit 8576970852

View File

@ -28,14 +28,17 @@
module: type:
self.lib.evalModules (forwardedArgs
// {
modules = [
(packagesDirPath + "/${module}")
{
paths.projectRoot = projectRoot;
paths.projectRootFile = projectRootFile;
paths.package = "/${packagesDir}/${module}";
}
];
modules =
args.modules
or []
++ [
(packagesDirPath + "/${module}")
{
paths.projectRoot = projectRoot;
paths.projectRootFile = projectRootFile;
paths.package = "/${packagesDir}/${module}";
}
];
})
)
(builtins.readDir packagesDirPath);