Skip to content

Commit 39ba092

Browse files
committed
Fix cabal-simple-prof test
1 parent 9e7ddaf commit 39ba092

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: test/cabal-simple-prof/default.nix

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ let
2525
inherit modules;
2626
};
2727

28+
exe = (project.getComponent "cabal-simple:exe:cabal-simple")
29+
.override (lib.optionalAttrs stdenv.hostPlatform.isAndroid { setupBuildFlags = ["--ghc-option=-optl-static" ]; });
30+
2831
in recurseIntoAttrs {
2932
# This test seeems to be broken on 8.6 and 8.8 and ghcjs
3033
meta.disabled = compiler-nix-name == "ghc865" || compiler-nix-name == "ghc884" || stdenv.hostPlatform.isGhcjs;
@@ -35,7 +38,7 @@ in recurseIntoAttrs {
3538
name = "cabal-simple-prof-test";
3639

3740
buildCommand = ''
38-
exe="${(project.getComponent "cabal-simple:exe:cabal-simple").exePath}"
41+
exe="${exe.exePath}"
3942
4043
size=$(command stat --format '%s' "$exe")
4144
printf "size of executable $exe is $size. \n" >& 2
@@ -45,7 +48,7 @@ in recurseIntoAttrs {
4548
# Curiosity: cross compilers prodcing profiling with `+RTS -p -h` lead to the following cryptic message:
4649
# cabal-simple: invalid heap profile option: -h*
4750
# Hence we pass `-hc`.
48-
${toString (project.getComponent "cabal-simple:exe:cabal-simple").config.testWrapper} $exe +RTS -p -hc
51+
${toString exe.config.testWrapper} $exe +RTS -p -hc
4952
5053
touch $out
5154
'';

0 commit comments

Comments
 (0)