on iko/ghcjs-patch-master help sign in
Fix haddock links to base packages (#1315)
2e30cbaCheng Shao
compiler/ghc/configured-src.nix+5−2
@@ -119,9 +119,12 @@ stdenv.mkDerivation (rec {
119 "--with-libdw-libraries=${lib.getLib elfutils}/lib"
119 "--with-libdw-libraries=${lib.getLib elfutils}/lib"
120 ];
120 ];
121
121
122− outputs = [ "out" ];
122+ outputs = [ "out" "doc" ];
123 phases = [ "unpackPhase" "patchPhase" ]
123 phases = [ "unpackPhase" "patchPhase" ]
124 ++ lib.optional (ghc-patches != []) "autoreconfPhase"
124 ++ lib.optional (ghc-patches != []) "autoreconfPhase"
125 ++ [ "configurePhase" "installPhase" ];
125 ++ [ "configurePhase" "installPhase" ];
126− installPhase = "cp -r . $out";
126+ installPhase = ''
127+ cp -r . $out
128+ mkdir $doc
129+ '';
127})
130})
compiler/ghc/default.nix+11−7
@@ -97,6 +97,7 @@ let
97 endif
97 endif
98 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
98 DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
99 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
99 INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
100+ EXTRA_HADDOCK_OPTS += --quickjump --hyperlinked-source
100 '' + lib.optionalString (targetPlatform != hostPlatform) ''
101 '' + lib.optionalString (targetPlatform != hostPlatform) ''
101 CrossCompilePrefix = ${targetPrefix}
102 CrossCompilePrefix = ${targetPrefix}
102 '' + lib.optionalString isCrossTarget ''
103 '' + lib.optionalString isCrossTarget ''
@@ -195,18 +196,21 @@ stdenv.mkDerivation (rec {
195
196
196 # these two are required
197 # these two are required
197 substituteInPlace mk/config.mk --replace "$TOP" "$PWD" \
198 substituteInPlace mk/config.mk --replace "$TOP" "$PWD" \
198− --replace "$PREFIX" "$out"
199+ --replace "$PREFIX" "$out" \
200+ --replace "${configured-src.doc}" "$doc"
199
201
200 substituteInPlace mk/install.mk --replace "$TOP" "$PWD" \
202 substituteInPlace mk/install.mk --replace "$TOP" "$PWD" \
201− --replace "$PREFIX" "$out"
203+ --replace "$PREFIX" "$out" \
204+ --replace "${configured-src.doc}" "$doc"
202
205
203 # these two only for convencience.
206 # these two only for convencience.
204− substituteInPlace config.log --replace "$TOP" "$PWD"\
207+ substituteInPlace config.log --replace "$TOP" "$PWD" \
205− --replace "$PREFIX" "$out"
208+ --replace "$PREFIX" "$out" \
206− substituteInPlace config.status --replace "$TOP" "$PWD"\
209+ --replace "${configured-src.doc}" "$doc"
207− --replace "$PREFIX" "$out")
208−
209
210
211+ substituteInPlace config.status --replace "$TOP" "$PWD" \
212+ --replace "$PREFIX" "$out" \
213+ --replace "${configured-src.doc}" "$doc")
210 '';
214 '';
211
215
212 enableParallelBuilding = true;
216 enableParallelBuilding = true;