Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix null deps in ghcWithHoogle" #42368

Merged
merged 1 commit into from
Jun 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions pkgs/development/haskell-modules/hoogle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,10 @@ let
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
docPackages = lib.closePropagation
# we grab the doc outputs
(map (lib.getOutput "doc") nonNullPackages);
(map (lib.getOutput "doc") packages);

in
stdenv.mkDerivation {
Expand All @@ -70,10 +67,10 @@ stdenv.mkDerivation {
inherit docPackages;

buildPhase = ''
${lib.optionalString (nonNullPackages != [] -> docPackages == [])
${lib.optionalString (packages != [] -> docPackages == [])
("echo WARNING: localHoogle package list empty, even though"
+ " the following were specified: "
+ lib.concatMapStringsSep ", " (p: p.name) nonNullPackages)}
+ lib.concatMapStringsSep ", " (p: p.name) packages)}
mkdir -p $out/share/doc/hoogle

echo importing builtin packages
Expand All @@ -89,9 +86,10 @@ stdenv.mkDerivation {
${lib.concatMapStringsSep "\n" (el: ''
ln -sfn ${el.haddockDir} "$out/share/doc/hoogle/${el.name}"
'')
(builtins.map (p: { haddockDir = if p ? haddockDir then p.haddockDir p else null;
name = p.pname; })
docPackages)}
(lib.filter (el: el.haddockDir != null)
(builtins.map (p: { haddockDir = if p ? haddockDir then p.haddockDir p else null;
name = p.pname; })
docPackages))}

echo building hoogle database
hoogle generate --database $out/share/doc/hoogle/default.hoo --local=$out/share/doc/hoogle
Expand Down