From 1c9f4874f4c01fda68375913a9c87946813b00fe Mon Sep 17 00:00:00 2001 From: Roman Melnikov Date: Mon, 1 Apr 2024 15:54:04 +0200 Subject: [PATCH] [Chore] Fix issues with windows cross-compilation via nix Problem: Cross-compilation to windows is broken. Solution: Build 'bitvec' without 'simd' flag --- flake.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 58b1894b..ba5d45f2 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,7 @@ name = "xrefcheck"; path = ./.; }; - modules = [{ + modules = [({ pkgs, ... }: { packages.xrefcheck = { ghcOptions = [ "-Werror" ]; @@ -51,7 +51,10 @@ xrefcheck-tests.build-tools = [ pkgs.git ]; }; }; - }]; + # bitvec compilation on mingw64 with 'simd' flag fails with + # unknown symbol `__cpu_model' + packages.bitvec.flags.simd = !pkgs.stdenv.targetPlatform.isWindows; + })]; }).flake { crossPlatforms = p: [ p.musl64 p.mingwW64 ]; }; in