@@ -38,7 +38,8 @@ let
3838 ghcCommand' = if isGhcjs then "ghcjs" else "ghc";
3939 ghcCommand = "${ghc.targetPrefix}${ghcCommand'}";
4040 ghcCommandCaps= lib.toUpper ghcCommand';
41− libDir = if isHaLVM then "$out/lib/HaLVM-${ghc.version}" else if isGhcjs then "$out/libexec" else "$out/lib/${ghcCommand}-${ghc.version}";
41+ libDir = if isHaLVM then "$out/lib/HaLVM-${ghc.version}"
42+ else "$out/lib/${ghcCommand}-${ghc.version}";
4243 docDir = "$out/share/doc/ghc/html";
4344 packageCfgDir = "${libDir}/package.conf.d";
4445 paths = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);
@@ -104,7 +105,7 @@ symlinkJoin {
104105 --set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
105106 fi
106107
107− '' + (lib.optionalString targetPlatform.isDarwin ''
108+ '' + (lib.optionalString (targetPlatform.isDarwin && !isGhcjs && !targetPlatform.isiOS) ''
108109 # Work around a linker limit in macOS Sierra (see generic-builder.nix):
109110 local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
110111 local dynamicLinksDir="$out/lib/links"