From 020c2332f98b2c566d3a19bd783a635df586cfab Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 19 May 2024 16:20:32 +0200 Subject: [PATCH] use NESSI_SITE_INSTALL when it is set --- EESSI-extend-2023.06-easybuild.eb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/EESSI-extend-2023.06-easybuild.eb b/EESSI-extend-2023.06-easybuild.eb index ed71ee5b53..d514293706 100644 --- a/EESSI-extend-2023.06-easybuild.eb +++ b/EESSI-extend-2023.06-easybuild.eb @@ -95,7 +95,19 @@ elseif (os.getenv("NESSI_SITE_INSTALL") ~= nil) then if ((os.getenv("NESSI_PROJECT_INSTALL") ~= nil) or (os.getenv("NESSI_USER_INSTALL") ~= nil)) then LmodError("You cannot use NESSI_SITE_INSTALL in combination with any other NESSI_*_INSTALL environment variables") end - easybuild_installpath = string.gsub(os.getenv("EESSI_SOFTWARE_PATH"), 'versions', 'host_injections') + site_install = os.getenv("NESSI_SITE_INSTALL") + site_modulepath = nil + if (site_install ~= nil) then + -- Check the folder exists + if not isDir(site_install) then + LmodError("The location of NESSI_SITE_INSTALL (" .. site_install .. ") does not exist or is not a folder") + end + if (mode() == "load") then + LmodMessage("Configuring for use of NESSI_SITE_INSTALL under " .. site_install) + end + easybuild_installpath = string.gsub(os.getenv("EESSI_SOFTWARE_PATH"), os.getenv("EESSI_CVMFS_REPO"), site_install) + site_modulepath = pathJoin(easybuild_installpath, 'modules', 'all') + end else -- Deal with user and project installs project_install = os.getenv("NESSI_PROJECT_INSTALL")