···20202121 output="$out/bin/$binname"
22222323- # look for existing binary from bin.core or bin.${pname}
2424- for folder in $binfolders ; do
2525- target="$folder"/bin/"$binname"
2626- if [[ -f "$target" && -x "$target" ]] ; then
2727- ln -s "$(realpath "$target")" "$output"
2828- continue 2
2929- fi
3030- done
2323+ # look for existing binary from bin.*
2424+ target="$(PATH="$HOST_PATH" command -v "$binname" || :)"
2525+ if [[ -n "$target" && -x "$target" ]] ; then
2626+ ln -s "$(realpath "$target")" "$output"
2727+ continue
2828+ fi
31293230 # look for scripts
3331 # the explicit list of extensions avoid non-scripts such as $binname.cmd, $binname.jar, $binname.pm
-7
pkgs/tools/typesetting/tex/texlive/setup-hook.sh
···11-addTeXMFPath () {
22- if test -d "$1/share/texmf-nix"; then
33- export TEXINPUTS="${TEXINPUTS}${TEXINPUTS:+:}$1/share/texmf-nix//:"
44- fi
55-}
66-77-addEnvHooks "$targetOffset" addTeXMFPath