From 35cd146befd74d49292704a6a389451f24aa02cc Mon Sep 17 00:00:00 2001 From: Richard Top Date: Mon, 25 Nov 2024 20:08:38 +0000 Subject: [PATCH] Added Nim hook --- eb_hooks.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index 03642656ea..3ec1c7d323 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -241,6 +241,16 @@ def parse_hook_grpcio_zlib(ec, ecprefix): raise EasyBuildError("grpcio-specific hook triggered for a non-grpcio easyconfig?!") +def parse_hook_Nim_add_XDG_CACHE_HOME(ec, ecprefix): + """Add XDG_CACHE_HOME to modextravars in the easyconfig to avoid The :File name too long """ + tmpdir = '/tmp' + if ec.name == 'Nim': + ec['modextravars']['XDG_CACHE_HOME'] = tmpdir + print_msg("Added XDG_CACHE_HOME='%s' in modextravars.", tmpdir) + else: + raise EasyBuildError("Nim-specific hook triggered for non-Nim easyconfig?!") + + def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix): """Relax number of failing numerical LAPACK tests for aarch64/neoverse_v1 CPU target for OpenBLAS < 0.3.23""" cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') @@ -970,6 +980,7 @@ def inject_gpu_property(ec): 'grpcio': parse_hook_grpcio_zlib, 'LAMMPS': parse_hook_lammps_remove_deps_for_aarch64, 'CP2K': parse_hook_CP2K_remove_deps_for_aarch64, + 'Nim': parse_hook_Nim_add_XDG_CACHE_HOME, 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'pybind11': parse_hook_pybind11_replace_catch2, 'Qt5': parse_hook_qt5_check_qtwebengine_disable,