|
28 | 28 | writeScriptBin ("iserv-wrapper" + lib.optionalString enableProfiling "-prof") ''
|
29 | 29 | #!${stdenv.shell}
|
30 | 30 | set -euo pipefail
|
| 31 | + ISERV_ARGS=''${ISERV_ARGS:-} |
| 32 | + PROXY_ARGS=''${PROXY_ARGS:-} |
31 | 33 | # unset the configureFlags.
|
32 | 34 | # configure should have run already
|
33 | 35 | # without restting it, wine might fail
|
|
36 | 38 | PORT=$((5000 + $RANDOM % 5000))
|
37 | 39 | (>&2 echo "---> Starting ${interpreter.exeName} on port $PORT")
|
38 | 40 | REMOTE_ISERV=$(mktemp -d)
|
39 |
| - ln -s ${interpreter}/bin/* $REMOTE_ISERV |
| 41 | + ln -s ${interpreter.override { enableDebugRTS = true; }}/bin/* $REMOTE_ISERV |
40 | 42 | # See coment in comp-builder.nix for where this comes from and why it's here
|
41 | 43 | for p in $pkgsHostTargetAsString; do
|
42 | 44 | find "$p" -iname '*.dll' -exec ln -sf {} $REMOTE_ISERV \;
|
|
53 | 55 | )
|
54 | 56 | # Not sure why this `unset` helps. It might avoids some kind of overflow issue. We see `wine` fail to start when building `cardano-wallet-cli` test `unit`.
|
55 | 57 | unset pkgsHostTargetAsString
|
56 |
| - WINEDLLOVERRIDES="winemac.drv=d" WINEDEBUG=warn-all,fixme-all,-menubuilder,-mscoree,-ole,-secur32,-winediag WINEPREFIX=$TMP ${wine}/bin/wine64 $REMOTE_ISERV/${interpreter.exeName} tmp $PORT & |
| 58 | + WINEDLLOVERRIDES="winemac.drv=d" WINEDEBUG=warn-all,fixme-all,-menubuilder,-mscoree,-ole,-secur32,-winediag WINEPREFIX=$TMP ${wine}/bin/wine64 $REMOTE_ISERV/${interpreter.exeName} tmp $PORT $ISERV_ARGS & |
57 | 59 | (>&2 echo "---| ${interpreter.exeName} should have started on $PORT")
|
58 | 60 | RISERV_PID="$!"
|
59 |
| - ${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT" |
| 61 | + ISERV_TARGET=WINE ${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT" $PROXY_ARGS |
60 | 62 | (>&2 echo "---> killing ${interpreter.exeName}...")
|
61 | 63 | kill $RISERV_PID
|
62 | 64 | '';
|
|
0 commit comments