on iko/ghcjs-patch-master help sign in
Fix for #647 (cross builds broken on haddock) (#649)
96f4062Hamish Mackenzie
builder/default.nix+1−1
@@ -21,7 +21,7 @@ let
21 # Wraps GHC to provide dependencies in a way that works for both the
21 # Wraps GHC to provide dependencies in a way that works for both the
22 # component builder and for nix-shells.
22 # component builder and for nix-shells.
23 ghcForComponent = import ./ghc-for-component-wrapper.nix {
23 ghcForComponent = import ./ghc-for-component-wrapper.nix {
24− inherit lib ghc;
24+ inherit lib ghc haskellLib;
25 inherit (buildPackages) stdenv runCommand makeWrapper;
25 inherit (buildPackages) stdenv runCommand makeWrapper;
26 inherit (buildPackages.xorg) lndir;
26 inherit (buildPackages.xorg) lndir;
27 };
27 };
builder/ghc-for-component-wrapper.nix+2−2
@@ -6,7 +6,7 @@
6# GHC automatically configured with the dependencies in the package
6# GHC automatically configured with the dependencies in the package
7# database.
7# database.
8
8
9−{ lib, stdenv, ghc, runCommand, lndir, makeWrapper
9+{ lib, stdenv, ghc, runCommand, lndir, makeWrapper, haskellLib
10}:
10}:
11
11
12{ componentName # Full derivation name of the component
12{ componentName # Full derivation name of the component
@@ -19,7 +19,7 @@ let
19 libDir = "$out/${configFiles.libDir}";
19 libDir = "$out/${configFiles.libDir}";
20 docDir = "$out/share/doc/ghc/html";
20 docDir = "$out/share/doc/ghc/html";
21 # For musl we can use haddock from the buildGHC
21 # For musl we can use haddock from the buildGHC
22− haddock = if stdenv.hostPlatform.isLinux && stdenv.targetPlatform.isMusl && !(stdenv.buildPlatform == stdenv.hostPlatform)
22+ haddock = if stdenv.hostPlatform.isLinux && stdenv.targetPlatform.isMusl && !haskellLib.isNativeMusl
23 then ghc.buildGHC
23 then ghc.buildGHC
24 else ghc;
24 else ghc;
25
25