diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-01-02 23:39:28 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-01-03 01:24:57 -0500 |
commit | 5e31e828f88a8aa229d68bade00d9f2d70f7b9f8 (patch) | |
tree | f9cec274263c5eb2829c1af85832923d71877d5f /pkgs/development/haskell-modules/with-packages-wrapper.nix | |
parent | bc066466fbdd38c1982ea162d01b74d7df88e874 (diff) | |
download | nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.gz nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.bz2 nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.lz nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.xz nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.tar.zst nixlib-5e31e828f88a8aa229d68bade00d9f2d70f7b9f8.zip |
ghcWithPackages: Fix cross, and avoid needless C compiler
Diffstat (limited to 'pkgs/development/haskell-modules/with-packages-wrapper.nix')
-rw-r--r-- | pkgs/development/haskell-modules/with-packages-wrapper.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index d92201b87673..6b3d6dfd2b0c 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -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" |