diff --git a/pkgs/development/interpreters/tcl/tcl-package-hook.sh b/pkgs/development/interpreters/tcl/tcl-package-hook.sh index 5f105e2fc7ea..261feda55af1 100644 --- a/pkgs/development/interpreters/tcl/tcl-package-hook.sh +++ b/pkgs/development/interpreters/tcl/tcl-package-hook.sh @@ -21,7 +21,7 @@ _addToTclLibPath() { if [ -z "${TCLLIBPATH-}" ]; then export TCLLIBPATH="$tclPkg" else - if [[ "$TCLLIBPATH" != *"$tclPkg"* ]]; then + if [[ "$TCLLIBPATH" != *"$tclPkg "* && "$TCLLIBPATH" != *"$tclPkg" ]]; then export TCLLIBPATH="${TCLLIBPATH} $tclPkg" fi fi @@ -53,7 +53,7 @@ wrapTclBins() { find "$tclBinsDir" -type f -executable -print | while read -r someBin; do echo "Adding TCLLIBPATH wrapper for $someBin" - wrapProgram "$someBin" --set TCLLIBPATH "$TCLLIBPATH" + wrapProgram "$someBin" --prefix TCLLIBPATH ' ' "$TCLLIBPATH" done }