From da3fbbc90226c3a28dc492ca1bbc475c1100b233 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Thu, 15 Oct 2026 16:29:15 +0900 Subject: [PATCH] build: provide Darwin iconv when planning stable GHC projects --- flake.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 4f514feb24..0acf196b1d 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,12 @@ # We need this, to specify we want the cabal project. # If the stack.yaml was dropped, this would not be necessary. projectFileName = "cabal.project"; + # The stable compiler's ghc-internal package names iconv without its + # external library directory. Include it in both planning and building. + cabalProjectLocal = pkgs.lib.optionalString pkgs'.stdenv.hostPlatform.isDarwin '' + package * + extra-lib-dirs: ${pkgs'.libiconv}/lib + ''; src = pkgs.haskell-nix.haskellLib.cleanGit { name = "simplex-chat"; src = ./.; @@ -686,6 +692,7 @@ }; in (drv pkgs).shellFor { withHoogle = false; + buildInputs = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ pkgs.libiconv ]; nativeBuildInputs = [ updateCmd pkgs.haskell-nix.nix-tools-unchecked-sh.exes.cabal