From cfdc073da4cf663327bd708a81e87ed326d2b878 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 18 Nov 2021 16:12:27 +0100 Subject: [PATCH] ghcWithPackages: check targetPlatform to decide if NCG is available The availability of native codegen (which allows us to disable the LLVM backend by default) hinges on the target platform of the compiler (that is GHC), not on the platform it runs on (the host platform). --- pkgs/development/haskell-modules/with-packages-wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index fdcd40fc99b0..464590fde38c 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -1,5 +1,5 @@ { lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper -, withLLVM ? !(stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isPowerPC) +, withLLVM ? !(stdenv.targetPlatform.isx86_64 || stdenv.targetPlatform.isPowerPC) , postBuild ? "" , ghcLibdir ? null # only used by ghcjs, when resolving plugins }: