@@ -97,6 +97,7 @@ let
9797 endif
9898 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
9999 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
100+ EXTRA_HADDOCK_OPTS += --quickjump --hyperlinked-source
100101 '' + lib.optionalString (targetPlatform != hostPlatform) ''
101102 CrossCompilePrefix = ${targetPrefix}
102103 '' + lib.optionalString isCrossTarget ''
@@ -195,18 +196,21 @@ stdenv.mkDerivation (rec {
195196
196197 # these two are required
197198 substituteInPlace mk/config.mk --replace "$TOP" "$PWD" \
198− --replace "$PREFIX" "$out"
199+ --replace "$PREFIX" "$out" \
200+ --replace "${configured-src.doc}" "$doc"
199201
200202 substituteInPlace mk/install.mk --replace "$TOP" "$PWD" \
201− --replace "$PREFIX" "$out"
203+ --replace "$PREFIX" "$out" \
204+ --replace "${configured-src.doc}" "$doc"
202205
203206 # these two only for convencience.
204− substituteInPlace config.log --replace "$TOP" "$PWD"\
205− --replace "$PREFIX" "$out"
206− substituteInPlace config.status --replace "$TOP" "$PWD"\
207− --replace "$PREFIX" "$out")
208−
207+ substituteInPlace config.log --replace "$TOP" "$PWD" \
208+ --replace "$PREFIX" "$out" \
209+ --replace "${configured-src.doc}" "$doc"
209210
211+ substituteInPlace config.status --replace "$TOP" "$PWD" \
212+ --replace "$PREFIX" "$out" \
213+ --replace "${configured-src.doc}" "$doc")
210214 '';
211215
212216 enableParallelBuilding = true;