Skip to content

Commit e8198e9

Browse files
committed
Better linux cross
1 parent 8c33c01 commit e8198e9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

overlays/linux-cross.nix

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,21 @@ let
4242
writeShellScriptBin ("iserv-wrapper" + lib.optionalString enableProfiling "-prof") ''
4343
#!${stdenv.shell}
4444
set -euo pipefail
45+
ISERV_ARGS=''${ISERV_ARGS:-}
46+
PROXY_ARGS=''${PROXY_ARGS:-}
4547
# Unset configure flags as configure should have run already
4648
unset configureFlags
4749
PORT=$((5000 + $RANDOM % 5000))
4850
(>&2 echo "---> Starting ${interpreter.exeName} on port $PORT")
49-
${qemu}/bin/qemu-${qemuSuffix} ${interpreter.override (lib.optionalAttrs hostPlatform.isAndroid { setupBuildFlags = ["--ghc-option=-optl-static" ] ++ lib.optional hostPlatform.isAarch32 "--ghc-option=-optl-no-pie";})}/bin/${interpreter.exeName} tmp $PORT &
51+
${qemu}/bin/qemu-${qemuSuffix} ${interpreter.override
52+
(lib.optionalAttrs hostPlatform.isAndroid {
53+
setupBuildFlags = ["--ghc-option=-optl-static" ] ++ lib.optional hostPlatform.isAarch32 "--ghc-option=-optl-no-pie";
54+
patches = [ ./patches/iserv-proxy-interpreter-9.3-android.patch ];
55+
enableDebugRTS = true;
56+
})}/bin/${interpreter.exeName} tmp $PORT $ISERV_ARGS &
5057
(>&2 echo "---| ${interpreter.exeName} should have started on $PORT")
5158
RISERV_PID="$!"
52-
${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT"
59+
${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT" $PROXY_ARGS
5360
(>&2 echo "---> killing ${interpreter.exeName}...")
5461
kill $RISERV_PID
5562
'';

0 commit comments

Comments
 (0)