File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,14 @@ in runCommand "${ghc.name}-with-${package.identifier.name}" {
66
66
fi
67
67
done
68
68
69
+ # Wrap haddock, if the base GHC provides it.
70
+ if [[ -x "${ ghc } /bin/haddock" ]]; then
71
+ rm -f $out/bin/haddock
72
+ makeWrapper ${ ghc } /bin/haddock $out/bin/haddock \
73
+ --add-flags '"-B$NIX_${ ghcCommandCaps } _LIBDIR"' \
74
+ --set "NIX_${ ghcCommandCaps } _LIBDIR" "${ libDir } "
75
+ fi
76
+
69
77
# Point ghc-pkg to the package database of the component using the
70
78
# --global-package-db flag.
71
79
@@ -75,13 +83,5 @@ in runCommand "${ghc.name}-with-${package.identifier.name}" {
75
83
makeWrapper ${ ghc } /bin/$prg $out/bin/$prg --add-flags "--global-package-db=${ packageCfgDir } "
76
84
fi
77
85
done
78
-
79
- # fixme: check if this is needed
80
- # haddock was referring to the base ghc, https://github.com/NixOS/nixpkgs/issues/36976
81
- if [[ -x "${ ghc } /bin/haddock" ]]; then
82
- rm -f $out/bin/haddock
83
- makeWrapper ${ ghc } /bin/haddock $out/bin/haddock \
84
- --set "NIX_${ ghcCommandCaps } _LIBDIR" "${ libDir } "
85
- fi
86
86
''
87
87
)
You can’t perform that action at this time.
0 commit comments