on iko/ghcjs-patch-master help sign in
Fix haddock links to base packages (#1315)

* Fix haddock links to base packages * Enable quickjump haddock

commit2e30cbafe3d39854b201a9145db0934b5e438f17 authorCheng Shao <astrohavoc@gmail.com> dateMon 27 Dec 2021, 04:11 (5 years ago) parentea554b7
2 files changed+16−9
compiler/ghc/configured-src.nix+5−2 compiler/ghc/default.nix+11−7
compiler/ghc/configured-src.nix+5−2
@@ -119,9 +119,12 @@ stdenv.mkDerivation (rec {
119119 "--with-libdw-libraries=${lib.getLib elfutils}/lib"
120120 ];
121121
122− outputs = [ "out" ];
122+ outputs = [ "out" "doc" ];
123123 phases = [ "unpackPhase" "patchPhase" ]
124124 ++ lib.optional (ghc-patches != []) "autoreconfPhase"
125125 ++ [ "configurePhase" "installPhase" ];
126− installPhase = "cp -r . $out";
126+ installPhase = ''
127+ cp -r . $out
128+ mkdir $doc
129+ '';
127130})
compiler/ghc/default.nix+11−7
@@ -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;