mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-15 01:53:25 -04:00
nim-utils.eclass: allow generating nim.cfg in custom dir
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -87,15 +87,18 @@ etestament() {
|
||||
}
|
||||
|
||||
# @FUNCTION: nim_gen_config
|
||||
# @USAGE:
|
||||
# @USAGE: [<dir>]
|
||||
# @DESCRIPTION:
|
||||
# Generate the ${WORKDIR}/nim.cfg to respect user's toolchain and preferences.
|
||||
# Generate a nim.cfg file in <dir> (default: $WORKDIR) to respect user's
|
||||
# toolchain and preferences.
|
||||
nim_gen_config() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
|
||||
xdg_environment_reset
|
||||
|
||||
cat > "${WORKDIR}/nim.cfg" <<- EOF || die "Failed to create Nim config"
|
||||
local dir=${1:-${WORKDIR}}
|
||||
|
||||
cat > "${dir}"/nim.cfg <<- EOF || die "Failed to create Nim config"
|
||||
cc:"gcc"
|
||||
gcc.exe:"$(tc-getCC)"
|
||||
gcc.linkerexe:"$(tc-getCC)"
|
||||
|
||||
Reference in New Issue
Block a user