Skip to content

Commit 98c396d

Browse files
committed
Fix cabal-simple test
1 parent d7e4744 commit 98c396d

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

builder/comp-builder.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,11 @@ let
281281
if builtins.isFunction shellHook then shellHook { inherit package shellWrappers; }
282282
else abort "shellHook should be a string or a function";
283283

284-
exeExt = if stdenv.hostPlatform.isGhcjs && builtins.compareVersions defaults.ghc.version "9.8" < 0
285-
then ".jsexe/all.js"
284+
exeExt =
285+
if stdenv.hostPlatform.isWasm
286+
then ".wasm"
287+
else if stdenv.hostPlatform.isGhcjs && builtins.compareVersions defaults.ghc.version "9.8" < 0
288+
then ".jsexe/all.js"
286289
else stdenv.hostPlatform.extensions.executable;
287290
exeName = componentId.cname + exeExt;
288291
testExecutable = "dist/build/${componentId.cname}/${exeName}";

overlays/wasm.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,14 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.targetPlatform.isWasm {
4040
'';
4141
nativeBuildInputs = old.nativeBuildInputs or [] ++ [ final.buildPackages.lld ];
4242
});
43+
44+
haskell-nix = prev.haskell-nix // ({
45+
defaultModules = prev.haskell-nix.defaultModules ++ [
46+
({ pkgs, ... }: {
47+
testWrapper = ["HOME=$(mktemp -d)" (pkgs.pkgsBuildBuild.wasmtime + "/bin/wasmtime")];
48+
package-keys = ["clock"];
49+
packages.clock.configureFlags = ["--ghc-option=-optc-Wno-int-conversion"];
50+
})
51+
];
52+
});
4353
}

0 commit comments

Comments
 (0)