From f1e3a6961ba661c219b6aaf0997c3c893e1f98ed Mon Sep 17 00:00:00 2001 From: Travis Whitaker Date: Wed, 21 Aug 2019 19:38:03 -0700 Subject: [PATCH] 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. --- pkgs/development/haskell-modules/hoogle.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/hoogle.nix b/pkgs/development/haskell-modules/hoogle.nix index c7fbab6ab88..0bb930a8bb3 100644 --- a/pkgs/development/haskell-modules/hoogle.nix +++ b/pkgs/development/haskell-modules/hoogle.nix @@ -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: "