nixpkgs/pkgs/development/interpreters/emilua/setup-hook.sh
lucasew f3d6b2ebef emilua: add setup hook that populates EMILUA_PATH
Signed-off-by: lucasew <lucas59356@gmail.com>
2024-09-05 21:41:10 -03:00

18 lines
358 B
Bash

addEmiluaPath() {
addToSearchPathWithCustomDelimiter : EMILUA_PATH $1/@sitePackages@
}
toEmiluaPath() {
local paths="$1"
local result=
for i in $paths; do
p="$i/@sitePackages@"
result="${result}${result:+:}$p"
done
echo $result
}
if [ -z "${dontAddEmiluaPath:-}" ]; then
addEnvHooks "$hostOffset" addEmiluaPath
fi