Skip to content

Commit 0fffbb6

Browse files
committed
Move iserv-proxy-interpreter overrides into overlays/haskell.nix
1 parent 8fd9d41 commit 0fffbb6

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

overlays/armv6l-linux.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final: prev:
1818
inherit (pkgs) gmp;
1919
# iserv-proxy needs to come from the buildPackages, as it needs to run on the
2020
# build host.
21-
inherit (final.haskell-nix.iserv-proxy-exes.${config.compiler.nix-name}) iserv-proxy iserv-proxy-interpreter;
21+
inherit (final.haskell-nix.iserv-proxy-exes.${config.compiler.nix-name}) iserv-proxy iserv-proxy-interpreter iserv-proxy-interpreter-prof;
2222
} // {
2323
# we can perform testing of cross compiled test-suites by using wine.
2424
# Therefore let's enable doCrossCheck here!

overlays/haskell.nix

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,10 +1056,20 @@ final: prev: {
10561056
allow-newer: *:base, *:bytestring
10571057
'';
10581058
})).hsPkgs.iserv-proxy.components.exes;
1059-
in {
1059+
in rec {
10601060
# We need the proxy for the build system and the interpreter for the target
10611061
inherit (exes final.pkgsBuildBuild) iserv-proxy;
1062-
inherit (exes final) iserv-proxy-interpreter;
1062+
iserv-proxy-interpreter = (exes final).iserv-proxy-interpreter.override
1063+
(lib.optionalAttrs hostPlatform.isAndroid {
1064+
setupBuildFlags = ["--ghc-option=-optl-static" ] ++ lib.optional hostPlatform.isAarch32 "--ghc-option=-optl-no-pie";
1065+
enableDebugRTS = true;
1066+
} // lib.optionalAttrs hostPlatform.isWindows {
1067+
setupBuildFlags = ["--ghc-option=-optl-Wl,--disable-dynamicbase,--disable-high-entropy-va,--image-base=0x400000" ];
1068+
enableDebugRTS = true;
1069+
});
1070+
iserv-proxy-interpreter-prof = iserv-proxy-interpreter.override {
1071+
enableProfiling = true;
1072+
};
10631073
}) final.haskell-nix.compiler;
10641074

10651075
# Add this to your tests to make all the dependencies of haskell.nix

overlays/linux-cross.nix

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
, qemuSuffix ? (haskellLib.qemuByHostPlatform hostPlatform)
77
, iserv-proxy
88
, iserv-proxy-interpreter
9+
, iserv-proxy-interpreter-prof
910
, gmp
1011
, buildPlatform
1112
, hostPlatform
@@ -36,7 +37,7 @@ let
3637
let
3738
interpreter =
3839
if enableProfiling
39-
then iserv-proxy-interpreter.override { inherit enableProfiling; }
40+
then iserv-proxy-interpreter-prof
4041
else iserv-proxy-interpreter;
4142
in
4243
writeShellScriptBin ("iserv-wrapper" + lib.optionalString enableProfiling "-prof") ''
@@ -48,11 +49,7 @@ let
4849
unset configureFlags
4950
PORT=$((5000 + $RANDOM % 5000))
5051
(>&2 echo "---> Starting ${interpreter.exeName} on port $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-
enableDebugRTS = true;
55-
})}/bin/${interpreter.exeName} tmp $PORT $ISERV_ARGS &
52+
${qemu}/bin/qemu-${qemuSuffix} ${interpreter}/bin/${interpreter.exeName} tmp $PORT $ISERV_ARGS &
5653
(>&2 echo "---| ${interpreter.exeName} should have started on $PORT")
5754
RISERV_PID="$!"
5855
${iserv-proxy}/bin/iserv-proxy $@ 127.0.0.1 "$PORT" $PROXY_ARGS

overlays/mingw_w64.nix

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
, mingw_w64_pthreads
77
, iserv-proxy
88
, iserv-proxy-interpreter
9+
, iserv-proxy-interpreter-prof
910
, gmp
1011
, hostPlatform
1112
, symlinkJoin
@@ -18,7 +19,7 @@ let
1819
let
1920
interpreter =
2021
if enableProfiling
21-
then iserv-proxy-interpreter.override { inherit enableProfiling; }
22+
then iserv-proxy-interpreter-prof
2223
else iserv-proxy-interpreter;
2324
no-load-call = lib.optionalString (interpreter.exeName != "remote-iserv.exe") "--no-load-call";
2425
in
@@ -37,11 +38,7 @@ let
3738
PORT=$((5000 + $RANDOM % 5000))
3839
(>&2 echo "---> Starting ${interpreter.exeName} on port $PORT")
3940
REMOTE_ISERV=$(mktemp -d)
40-
ln -s ${interpreter.override
41-
{
42-
enableDebugRTS = true;
43-
setupBuildFlags = ["--ghc-option=-optl-Wl,--disable-dynamicbase,--disable-high-entropy-va,--image-base=0x400000" ];
44-
}}/bin/* $REMOTE_ISERV
41+
ln -s ${interpreter}/bin/* $REMOTE_ISERV
4542
# See coment in comp-builder.nix for where this comes from and why it's here
4643
# TODO use `LINK_DLL_FOLDERS` here once it is in all the nixpkgs we want to support.
4744
for p in $pkgsHostTargetAsString; do

overlays/windows.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ final: prev:
5050
inherit (pkgs.pkgsBuildBuild) symlinkJoin;
5151
# iserv-proxy needs to come from the buildPackages, as it needs to run on the
5252
# build host.
53-
inherit (final.haskell-nix.iserv-proxy-exes.${config.compiler.nix-name}) iserv-proxy iserv-proxy-interpreter;
53+
inherit (final.haskell-nix.iserv-proxy-exes.${config.compiler.nix-name}) iserv-proxy iserv-proxy-interpreter iserv-prox-interpreter-prof;
5454
} // {
5555
# we can perform testing of cross compiled test-suites by using wine.
5656
# Therefore let's enable doCrossCheck here!

0 commit comments

Comments
 (0)