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