diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 0fe3796c00b7..8696c0f12af2 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -50,8 +50,9 @@ # If enabled, GHC will be built with the GPL-free but slightly slower native # bignum backend instead of the faster but GPLed gmp backend. enableNativeBignum ? - !(lib.meta.availableOn stdenv.hostPlatform gmp && lib.meta.availableOn stdenv.targetPlatform gmp) - || stdenv.targetPlatform.isGhcjs, + stdenv.targetPlatform.isGhcjs + || !(lib.meta.availableOn stdenv.hostPlatform gmp) + || !(lib.meta.availableOn stdenv.targetPlatform gmp), gmp, # If enabled, use -fPIC when compiling static libs. @@ -668,7 +669,7 @@ stdenv.mkDerivation ( "--with-ffi-includes=${targetLibs.libffi.dev}/include" "--with-ffi-libraries=${targetLibs.libffi.out}/lib" ] - ++ lib.optionals (targetPlatform == hostPlatform && !enableNativeBignum) [ + ++ lib.optionals (!enableNativeBignum) [ "--with-gmp-includes=${targetLibs.gmp.dev}/include" "--with-gmp-libraries=${targetLibs.gmp.out}/lib" ]