Commit e01db49b authored by Matthew Bauer's avatar Matthew Bauer
Browse files

ghcjs-ng: Move to $out/lib/ghcjs-8.4

This is standard for ghc compilers & much more convenient. This seems
to fix the issues we have been having in ghcjs pkgs.

Fixes #42032
Fixes #42617
parent c5cb7e55
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -80,12 +80,12 @@ in stdenv.mkDerivation {
      cd lib/boot

      mkdir -p $out/bin
      mkdir -p $out/libexec
      mkdir -p $out/lib/${bootGhcjs.name}
      lndir ${libexec} $out/bin

      wrapProgram $out/bin/ghcjs --add-flags "-B$out/libexec"
      wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/libexec"
      wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/libexec/package.conf.d"
      wrapProgram $out/bin/ghcjs --add-flags "-B$out/lib/${bootGhcjs.name}"
      wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/lib/${bootGhcjs.name}"
      wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/lib/${bootGhcjs.name}/package.conf.d"

      env PATH=$out/bin:$PATH $out/bin/ghcjs-boot -j1 --with-ghcjs-bin $out/bin
    '';
+3 −2
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@ let
  ghcCommand'    = if isGhcjs then "ghcjs" else "ghc";
  ghcCommand = "${ghc.targetPrefix}${ghcCommand'}";
  ghcCommandCaps= lib.toUpper ghcCommand';
  libDir        = if isHaLVM then "$out/lib/HaLVM-${ghc.version}" else if isGhcjs then "$out/libexec" else "$out/lib/${ghcCommand}-${ghc.version}";
  libDir        = if isHaLVM then "$out/lib/HaLVM-${ghc.version}"
                  else "$out/lib/${ghcCommand}-${ghc.version}";
  docDir        = "$out/share/doc/ghc/html";
  packageCfgDir = "${libDir}/package.conf.d";
  paths         = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);
@@ -104,7 +105,7 @@ symlinkJoin {
        --set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
    fi

  '' + (lib.optionalString targetPlatform.isDarwin ''
  '' + (lib.optionalString (targetPlatform.isDarwin && !isGhcjs && !targetPlatform.isiOS) ''
    # 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"