Merge pull request #127252 from SuperSandro2000/expect

This commit is contained in:
Sandro 2021-06-18 02:42:20 +02:00 committed by GitHub
commit 53b46ef5b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View File

@ -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
}

View File

@ -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"

View File

@ -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

View File

@ -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" ];