···2021 output="$out/bin/$binname"
2223- # look for existing binary from bin.core or bin.${pname}
24- for folder in $binfolders ; do
25- target="$folder"/bin/"$binname"
26- if [[ -f "$target" && -x "$target" ]] ; then
27- ln -s "$(realpath "$target")" "$output"
28- continue 2
29- fi
30- done
3132 # look for scripts
33 # the explicit list of extensions avoid non-scripts such as $binname.cmd, $binname.jar, $binname.pm
···2021 output="$out/bin/$binname"
2223+ # look for existing binary from bin.*
24+ target="$(PATH="$HOST_PATH" command -v "$binname" || :)"
25+ if [[ -n "$target" && -x "$target" ]] ; then
26+ ln -s "$(realpath "$target")" "$output"
27+ continue
28+ fi
002930 # look for scripts
31 # 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
···1-addTeXMFPath () {
2- if test -d "$1/share/texmf-nix"; then
3- export TEXINPUTS="${TEXINPUTS}${TEXINPUTS:+:}$1/share/texmf-nix//:"
4- fi
5-}
6-7-addEnvHooks "$targetOffset" addTeXMFPath