From e01db49bfa43b0016229150fa19c9967677a808c Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 26 Jun 2018 16:34:03 -0400 Subject: 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 --- pkgs/development/compilers/ghcjs-ng/default.nix | 8 ++++---- pkgs/development/haskell-modules/with-packages-wrapper.nix | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/compilers/ghcjs-ng/default.nix b/pkgs/development/compilers/ghcjs-ng/default.nix index 65b43f712ae2..9aa3efe614eb 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 7fda1d84e55b..1a29732b651a 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" -- cgit 1.4.1