diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index fdcd40fc99b0..7b85d01876ed 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -1,5 +1,14 @@ { lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper -, withLLVM ? !(stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isPowerPC) +# Include LLVM by default if GHC doesn't have native code generation support +# See https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms +, withLLVM ? !(lib.any lib.id ([ + stdenv.targetPlatform.isx86 + stdenv.targetPlatform.isPowerPC + stdenv.targetPlatform.isSparc + ] ++ lib.optionals (lib.versionAtLeast ghc.version "9.2" || ghc.version == "8.10.7") [ + (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin) + # TODO(@sternenseemann): Is armv7a supported for iOS? + ])) , postBuild ? "" , ghcLibdir ? null # only used by ghcjs, when resolving plugins }: