summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-06-26 16:34:03 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-06-26 17:43:58 -0400
commite01db49bfa43b0016229150fa19c9967677a808c (patch)
treeb00bd9d11e81e8b91a6f0059fccc1336326be105
parentc5cb7e550ef0bf0438240f6998afffc64b3c3fa7 (diff)
downloadnixpkgs-e01db49bfa43b0016229150fa19c9967677a808c.tar
nixpkgs-e01db49bfa43b0016229150fa19c9967677a808c.tar.gz
nixpkgs-e01db49bfa43b0016229150fa19c9967677a808c.tar.bz2
nixpkgs-e01db49bfa43b0016229150fa19c9967677a808c.tar.lz
nixpkgs-e01db49bfa43b0016229150fa19c9967677a808c.tar.xz
nixpkgs-e01db49bfa43b0016229150fa19c9967677a808c.tar.zst
nixpkgs-e01db49bfa43b0016229150fa19c9967677a808c.zip
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
-rw-r--r--pkgs/development/compilers/ghcjs-ng/default.nix8
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix5
2 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/development/compilers/ghcjs-ng/default.nix b/pkgs/development/compilers/ghcjs-ng/default.nix
index 65b43f712ae..9aa3efe614e 100644
--- a/pkgs/development/compilers/ghcjs-ng/default.nix
+++ b/pkgs/development/compilers/ghcjs-ng/default.nix
@@ -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
     '';
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index 7fda1d84e55..1a29732b651 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -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"