nixpack icon indicating copy to clipboard operation
nixpack copied to clipboard

extern: set external_modules with new modules attribute

Open dguibert opened this issue 3 years ago • 2 comments

This path allow to define extern packages that require a modulefile to be loaded.

Maybe an environment attribute could be usefull as well.

dguibert avatar Aug 30 '22 14:08 dguibert

This is to load modules at build-time of dependencies, right? Sort of tepted to name it extern_modules or something instead. If something has external_modules, it's necessarily extern, right? Should we only use modules if extern is set, or should we treat setting modules as if extern is set (for the purpose of distinguishing extern from non)? Or should instead there be a way to set extern to a list of modules? Does any of this propagate into module generation? (We don't use external modules so I'm not sure what the best semantics are.)

You can already set environment variables in a build through build, but I guess you want a way to set environment variables when building dependencies.

dylex avatar Aug 30 '22 15:08 dylex

Yes it's at build-time. This propagates the loading of the dependancy modules thru load_external_modules in setup_package (lib/spack/spack/build_environment.py).

Could be extern_modules only if extern is set, I think.

I know about build but here it's more like setup_dependent_build_environment to set environment variables required to use a package within another build environment.

dguibert avatar Aug 31 '22 14:08 dguibert