mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 09:43:14 +00:00
tcl: fix TCLLIBPATH edge cases in tcl package hook
TCLLIBPATH was not actually extended if a package's path was a substring of a package already on the path. This commit fixes that behavior. Additionally, '--prefix' is now used in place of '--set', as the latter was found to break tkremind from the remind package.
This commit is contained in:
parent
1c44a44932
commit
e22fe366af
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user