ghcWithPackages: Fix cross, and avoid needless C compiler
This commit is contained in:
parent
bc066466fb
commit
5e31e828f8
@ -100,7 +100,7 @@ let
|
||||
defaultScope = mkScope self;
|
||||
callPackage = drv: args: callPackageWithScope defaultScope drv args;
|
||||
|
||||
withPackages = packages: callPackage ./with-packages-wrapper.nix {
|
||||
withPackages = packages: buildPackages.callPackage ./with-packages-wrapper.nix {
|
||||
inherit (self) llvmPackages;
|
||||
haskellPackages = self;
|
||||
inherit packages;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
|
||||
{ lib, targetPlatform, ghc, llvmPackages, packages, symlinkJoin, makeWrapper
|
||||
, ignoreCollisions ? false, withLLVM ? false
|
||||
, postBuild ? ""
|
||||
, haskellPackages
|
||||
@ -48,7 +48,7 @@ let
|
||||
# https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/code-generators.html
|
||||
llvm = lib.makeBinPath
|
||||
([ llvmPackages.llvm ]
|
||||
++ lib.optional stdenv.isDarwin llvmPackages.clang);
|
||||
++ lib.optional targetPlatform.isDarwin llvmPackages.clang);
|
||||
in
|
||||
if paths == [] && !withLLVM then ghc else
|
||||
symlinkJoin {
|
||||
@ -98,7 +98,7 @@ symlinkJoin {
|
||||
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
|
||||
fi
|
||||
done
|
||||
'' + (lib.optionalString stdenv.isDarwin ''
|
||||
'' + (lib.optionalString targetPlatform.isDarwin ''
|
||||
# Work around a linker limit in macOS Sierra (see generic-builder.nix):
|
||||
local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
|
||||
local dynamicLinksDir="$out/lib/links"
|
||||
|
Loading…
Reference in New Issue
Block a user