From 520bd28d3770fc9fecb19c6e06946579169125fc Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Thu, 18 Jan 2024 11:08:12 -0500 Subject: [PATCH] fix(build): Disable C++ flags for text --- cabal.project | 7 ++++++- flake.nix | 14 +++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/cabal.project b/cabal.project index 1c065cb2d..d1a875363 100644 --- a/cabal.project +++ b/cabal.project @@ -44,10 +44,15 @@ package cryptonite -- generation is dubious. Set the flag so we use /dev/urandom by default. flags: -support_rdrand +-- Do not depend on C++ for slightly faster utf8 parsing. +package text + flags: -simdutf + -- concurrent-output is incompatible with our haskell.nix version due to -- arch(wasm32). -- TODO[sgillespie]: Upgrade haskell.nix -constraints: concurrent-output < 1.10.19 +constraints: + , concurrent-output < 1.10.19 -- --------------------------------------------------------- -- Enable tests diff --git a/flake.nix b/flake.nix index ab1c419cc..64763412a 100644 --- a/flake.nix +++ b/flake.nix @@ -146,14 +146,18 @@ echo "file binary-dist $out/$NAME" > $out/nix-support/hydra-build-products ''; - project = (nixpkgs.haskell-nix.cabalProject' ({ config, lib, ... }: rec { + project = (nixpkgs.haskell-nix.cabalProject' ({ config, lib, pkgs, ... }: rec { src = ./.; name = "cardano-db-sync"; - compiler-nix-name = lib.mkDefault "ghc8107"; + compiler-nix-name = + if system == "x86_64-linux" + then lib.mkDefault "ghc810" + else lib.mkDefault "ghc963"; flake.variants = - lib.genAttrs - ["ghc963"] - (compiler-nix-name: { inherit compiler-nix-name; }); + let + compilers = lib.optionals (system == "x86_64-linux") ["ghc963"]; + in + lib.genAttrs compilers (c: { compiler-nix-name = c; }); inputMap = { "https://chap.intersectmbo.org/" = inputs.CHaP;