Skip to content

Commit eb80f01

Browse files
committed
nix: fixed crosscompilation to windows
* use `ucrt64` rather than `mingw64` for Windows * disabled some C compiler warnings for basement on Windows
1 parent 07d9974 commit eb80f01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nix/ouroboros-network.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ let
5353

5454
# we also want cross compilation to windows on linux (and only with default compiler).
5555
crossPlatforms =
56-
p: lib.optionals (pkgs.stdenv.hostPlatform.isLinux && config.compiler-nix-name == crossGHCVersion) [ p.mingwW64 ];
56+
p: lib.optionals (pkgs.stdenv.hostPlatform.isLinux && config.compiler-nix-name == crossGHCVersion) [ p.ucrt64 ];
5757

5858
#
5959
# VARIANTS
@@ -109,6 +109,9 @@ let
109109
packages.ouroboros-network.components.tests.sim-tests.preCheck =
110110
if buildSystem == "x86_64-linux" then "export GHCRTS=-M600M" else "";
111111
})
112+
({ pkgs, ... }: lib.mkIf pkgs.stdenv.hostPlatform.isWindows {
113+
packages.basement.configureFlags = [ "--hsc2hs-options=--cflag=-Wno-int-conversion" ];
114+
})
112115
];
113116
});
114117
in

0 commit comments

Comments
 (0)