Revert "Fix null deps in ghcWithHoogle"
This commit is contained in:
parent
d8a03e2f81
commit
f13f2434d0
@ -52,13 +52,10 @@ let
|
|||||||
This index includes documentation for many Haskell modules.
|
This index includes documentation for many Haskell modules.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Packages like base and bytestring are null. These must be removed
|
|
||||||
# to prevent eval errors.
|
|
||||||
nonNullPackages = builtins.filter (p: p != null) packages;
|
|
||||||
# TODO: closePropagation is deprecated; replace
|
# TODO: closePropagation is deprecated; replace
|
||||||
docPackages = lib.closePropagation
|
docPackages = lib.closePropagation
|
||||||
# we grab the doc outputs
|
# we grab the doc outputs
|
||||||
(map (lib.getOutput "doc") nonNullPackages);
|
(map (lib.getOutput "doc") packages);
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -70,10 +67,10 @@ stdenv.mkDerivation {
|
|||||||
inherit docPackages;
|
inherit docPackages;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
${lib.optionalString (nonNullPackages != [] -> docPackages == [])
|
${lib.optionalString (packages != [] -> docPackages == [])
|
||||||
("echo WARNING: localHoogle package list empty, even though"
|
("echo WARNING: localHoogle package list empty, even though"
|
||||||
+ " the following were specified: "
|
+ " the following were specified: "
|
||||||
+ lib.concatMapStringsSep ", " (p: p.name) nonNullPackages)}
|
+ lib.concatMapStringsSep ", " (p: p.name) packages)}
|
||||||
mkdir -p $out/share/doc/hoogle
|
mkdir -p $out/share/doc/hoogle
|
||||||
|
|
||||||
echo importing builtin packages
|
echo importing builtin packages
|
||||||
@ -89,9 +86,10 @@ stdenv.mkDerivation {
|
|||||||
${lib.concatMapStringsSep "\n" (el: ''
|
${lib.concatMapStringsSep "\n" (el: ''
|
||||||
ln -sfn ${el.haddockDir} "$out/share/doc/hoogle/${el.name}"
|
ln -sfn ${el.haddockDir} "$out/share/doc/hoogle/${el.name}"
|
||||||
'')
|
'')
|
||||||
(builtins.map (p: { haddockDir = if p ? haddockDir then p.haddockDir p else null;
|
(lib.filter (el: el.haddockDir != null)
|
||||||
name = p.pname; })
|
(builtins.map (p: { haddockDir = if p ? haddockDir then p.haddockDir p else null;
|
||||||
docPackages)}
|
name = p.pname; })
|
||||||
|
docPackages))}
|
||||||
|
|
||||||
echo building hoogle database
|
echo building hoogle database
|
||||||
hoogle generate --database $out/share/doc/hoogle/default.hoo --local=$out/share/doc/hoogle
|
hoogle generate --database $out/share/doc/hoogle/default.hoo --local=$out/share/doc/hoogle
|
||||||
|
Loading…
Reference in New Issue
Block a user