Merge pull request #20619 from Profpatsch/ghcWithHoogle-empty-packagelist
haskell/hoogle.nix: make an empty packages list possible
This commit is contained in:
commit
baea6a8d82
@ -23,8 +23,8 @@
|
|||||||
# This will build mmorph and monadControl, and have the hoogle installation
|
# This will build mmorph and monadControl, and have the hoogle installation
|
||||||
# refer to their documentation via symlink so they are not garbage collected.
|
# refer to their documentation via symlink so they are not garbage collected.
|
||||||
|
|
||||||
{ lib, stdenv, hoogle, writeText
|
{ lib, stdenv, hoogle, writeText, ghc
|
||||||
, ghc, packages ? [ ghc.ghc ]
|
, packages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -51,6 +51,9 @@ let
|
|||||||
else writeText "ghcjs-prologue.txt" ''
|
else writeText "ghcjs-prologue.txt" ''
|
||||||
This index includes documentation for many Haskell modules.
|
This index includes documentation for many Haskell modules.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
docPackages = lib.closePropagation packages;
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "hoogle-local-0.1";
|
name = "hoogle-local-0.1";
|
||||||
@ -58,14 +61,9 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
|
|
||||||
docPackages = (lib.closePropagation packages);
|
inherit docPackages;
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
if [ -z "$docPackages" ]; then
|
|
||||||
echo "ERROR: The packages attribute has not been set"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p $out/share/doc/hoogle
|
mkdir -p $out/share/doc/hoogle
|
||||||
|
|
||||||
echo importing builtin packages
|
echo importing builtin packages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user