@@ -12,10 +12,13 @@
12# when tests are run.
12# when tests are run.
13, extra-test-libs ? []
13, extra-test-libs ? []
14, hostPlatform
14, hostPlatform
19+ configureFlags = lib.optional hostPlatform.isWindows "--disable-split-sections";
18− wineIservWrapper = writeScriptBin "iserv-wrapper" ''
21+ wineIservWrapperVanilla = writeScriptBin "iserv-wrapper" ''
19 #!${stdenv.shell}
22 #!${stdenv.shell}
20 set -euo pipefail
23 set -euo pipefail
21 # unset the configureFlags.
24 # unset the configureFlags.
@@ -32,6 +35,27 @@ let
32 (>&2 echo "---> killing remote-iserv...")
35 (>&2 echo "---> killing remote-iserv...")
33 kill $RISERV_PID
36 kill $RISERV_PID
39+ wineIservWrapperProf = writeScriptBin "iserv-wrapper-prof" ''
42+ # unset the configureFlags.
43+ # configure should have run already
44+ # without restting it, wine might fail
45+ # due to a too large environment.
47+ PORT=$((5000 + $RANDOM % 5000))
48+ (>&2 echo "---> Starting remote-iserv on port $PORT")
49+ WINEDLLOVERRIDES="winemac.drv=d" WINEDEBUG=warn-all,fixme-all,-menubuilder,-mscoree,-ole,-secur32,-winediag WINEPREFIX=$TMP ${wine}/bin/wine64 ${remote-iserv.override { enableExecutableProfiling = true; }}/bin/remote-iserv.exe tmp $PORT &
50+ (>&2 echo "---| remote-iserv should have started on $PORT")
52+ ${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT"
53+ (>&2 echo "---> killing remote-iserv...")
57+ wineIservWrapper = symlinkJoin { name = "iserv-wrapper"; paths = [ wineIservWrapperVanilla wineIservWrapperProf ]; };
35 ################################################################################
59 ################################################################################
36 # Build logic (TH support via remote iserv via wine)
60 # Build logic (TH support via remote iserv via wine)
@@ -89,4 +113,4 @@ let
89 echo "================================================================================"
113 echo "================================================================================"
92−in { inherit preCheck testWrapper postCheck setupBuildFlags; }
116+in { inherit preCheck testWrapper postCheck setupBuildFlags configureFlags; }