@@ -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