Merge pull request #127252 from SuperSandro2000/expect
This commit is contained in:
commit
53b46ef5b1
@ -2,6 +2,8 @@
|
|||||||
# * wrap any installed executables with a wrapper that configures TCLLIBPATH
|
# * wrap any installed executables with a wrapper that configures TCLLIBPATH
|
||||||
# * write a setup hook that extends the TCLLIBPATH of any anti-dependencies
|
# * write a setup hook that extends the TCLLIBPATH of any anti-dependencies
|
||||||
|
|
||||||
|
tclWrapperArgs=( ${tclWrapperArgs-} )
|
||||||
|
|
||||||
# Add a directory to TCLLIBPATH, provided that it exists
|
# Add a directory to TCLLIBPATH, provided that it exists
|
||||||
_addToTclLibPath() {
|
_addToTclLibPath() {
|
||||||
local tclPkg="$1"
|
local tclPkg="$1"
|
||||||
@ -50,10 +52,12 @@ wrapTclBins() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
tclWrapperArgs+=(--prefix TCLLIBPATH ' ' "$TCLLIBPATH")
|
||||||
|
|
||||||
find "$tclBinsDir" -type f -executable -print |
|
find "$tclBinsDir" -type f -executable -print |
|
||||||
while read -r someBin; do
|
while read -r someBin; do
|
||||||
echo "Adding TCLLIBPATH wrapper for $someBin"
|
echo "Adding TCLLIBPATH wrapper for $someBin"
|
||||||
wrapProgram "$someBin" --prefix TCLLIBPATH ' ' "$TCLLIBPATH"
|
wrapProgram "$someBin" "${tclWrapperArgs[@]}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ tcl.mkTclDerivation rec {
|
|||||||
|
|
||||||
dontPatchShebangs = true;
|
dontPatchShebangs = true;
|
||||||
|
|
||||||
|
# TODO: can this use tclWrapperArgs?
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
sed -i -e '1c#!'"$out"'/bin/tcscid' "$out/bin/scidpgn"
|
sed -i -e '1c#!'"$out"'/bin/tcscid' "$out/bin/scidpgn"
|
||||||
sed -i -e '1c#!${tk}/bin/wish' "$out/bin/sc_remote"
|
sed -i -e '1c#!${tk}/bin/wish' "$out/bin/sc_remote"
|
||||||
|
@ -31,6 +31,7 @@ tcl.mkTclDerivation {
|
|||||||
|
|
||||||
dontPatchShebangs = true;
|
dontPatchShebangs = true;
|
||||||
|
|
||||||
|
# TODO: can this use tclWrapperArgs?
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
for cmd in sc_addmove sc_eco sc_epgn scidpgn \
|
for cmd in sc_addmove sc_eco sc_epgn scidpgn \
|
||||||
sc_import sc_spell sc_tree spliteco
|
sc_import sc_spell sc_tree spliteco
|
||||||
|
@ -25,10 +25,9 @@ tcl.mkTclDerivation rec {
|
|||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
postInstall = ''
|
||||||
for i in $out/bin/*; do
|
tclWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ tcl ]})
|
||||||
wrapProgram $i --prefix DYLD_LIBRARY_PATH : $out/lib/expect${version}
|
${lib.optionalString stdenv.isDarwin "tclWrapperArgs+=(--prefix DYLD_LIBRARY_PATH : $out/lib/expect${version})"}
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user