Pass hoogle-local's buildCommand as a file.

This is necessary when a very large number of packages are included in the
package database. Without this change, setting up the build environment will
fail, since the environment will be too large.

This simply applies the technique mentioned in
https://github.com/NixOS/nixpkgs/issues/25057 to solve this problem.
This commit is contained in:
Travis Whitaker 2019-08-21 19:38:03 -07:00 committed by Peter Simons
parent d00582b437
commit f1e3a6961b

View File

@ -57,11 +57,11 @@ stdenv.mkDerivation {
name = "hoogle-local-0.1";
buildInputs = [ghc hoogle];
phases = [ "buildPhase" ];
inherit docPackages;
buildPhase = ''
passAsFile = ["buildCommand"];
buildCommand = ''
${lib.optionalString (packages != [] -> docPackages == [])
("echo WARNING: localHoogle package list empty, even though"
+ " the following were specified: "