52
52
This index includes documentation for many Haskell modules.
53
53
'' ;
54
54
55
- # Packages like base and bytestring are null. These must be removed
56
- # to prevent eval errors.
57
- nonNullPackages = builtins . filter ( p : p != null ) packages ;
58
55
# TODO: closePropagation is deprecated; replace
59
56
docPackages = lib . closePropagation
60
57
# we grab the doc outputs
61
- ( map ( lib . getOutput "doc" ) nonNullPackages ) ;
58
+ ( map ( lib . getOutput "doc" ) packages ) ;
62
59
63
60
in
64
61
stdenv . mkDerivation {
@@ -70,10 +67,10 @@ stdenv.mkDerivation {
70
67
inherit docPackages ;
71
68
72
69
buildPhase = ''
73
- ${ lib . optionalString ( nonNullPackages != [ ] -> docPackages == [ ] )
70
+ ${ lib . optionalString ( packages != [ ] -> docPackages == [ ] )
74
71
( "echo WARNING: localHoogle package list empty, even though"
75
72
+ " the following were specified: "
76
- + lib . concatMapStringsSep ", " ( p : p . name ) nonNullPackages ) }
73
+ + lib . concatMapStringsSep ", " ( p : p . name ) packages ) }
77
74
mkdir -p $out/share/doc/hoogle
78
75
79
76
echo importing builtin packages
@@ -89,9 +86,10 @@ stdenv.mkDerivation {
89
86
${ lib . concatMapStringsSep "\n " ( el : ''
90
87
ln -sfn ${ el . haddockDir } "$out/share/doc/hoogle/${ el . name } "
91
88
'' )
92
- ( builtins . map ( p : { haddockDir = if p ? haddockDir then p . haddockDir p else null ;
93
- name = p . pname ; } )
94
- docPackages ) }
89
+ ( lib . filter ( el : el . haddockDir != null )
90
+ ( builtins . map ( p : { haddockDir = if p ? haddockDir then p . haddockDir p else null ;
91
+ name = p . pname ; } )
92
+ docPackages ) ) }
95
93
96
94
echo building hoogle database
97
95
hoogle generate --database $out/share/doc/hoogle/default.hoo --local=$out/share/doc/hoogle
0 commit comments