on iko/ghcjs-patch-master help sign in
Fix for #647 (cross builds broken on haddock) (#649)

In de3f82a419976c5a5f95a149553673b72fbe94ea a isNativeMusl function was added, but we did not use it in `builder/ghc-for-component-wrapper.nix` for selecting a ghc with a suitable `haddock` executable (it was only used in builder/default.nix).

commit96f406263f89dea325db2de4aba6a70a62fd0b24 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateThu 4 Jun 2020, 03:04 (6 years ago) parentb059ec4
2 files changed+3−3
builder/default.nix+1−1 builder/ghc-for-component-wrapper.nix+2−2
builder/default.nix+1−1
@@ -21,7 +21,7 @@ let
2121 # Wraps GHC to provide dependencies in a way that works for both the
2222 # component builder and for nix-shells.
2323 ghcForComponent = import ./ghc-for-component-wrapper.nix {
24− inherit lib ghc;
24+ inherit lib ghc haskellLib;
2525 inherit (buildPackages) stdenv runCommand makeWrapper;
2626 inherit (buildPackages.xorg) lndir;
2727 };
builder/ghc-for-component-wrapper.nix+2−2
@@ -6,7 +6,7 @@
66# GHC automatically configured with the dependencies in the package
77# database.
88
9−{ lib, stdenv, ghc, runCommand, lndir, makeWrapper
9+{ lib, stdenv, ghc, runCommand, lndir, makeWrapper, haskellLib
1010}:
1111
1212{ componentName # Full derivation name of the component
@@ -19,7 +19,7 @@ let
1919 libDir = "$out/${configFiles.libDir}";
2020 docDir = "$out/share/doc/ghc/html";
2121 # 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
2323 then ghc.buildGHC
2424 else ghc;
2525