haskellPackages.shellFor: Work around hoogle generation failure
Workaround for https://github.com/NixOS/nixpkgs/issues/82245 Although this doesn't tackle the root cause of a null package sneaking in (via executableHaskellDepends), it does effectively treat the symptom by just ignoring any null packages. Seeing as that issue has been open for more than a year I think this band-aid is necessary.
This commit is contained in:
parent
4327400c1b
commit
d8daa7af73
1 changed files with 5 additions and 2 deletions
|
@ -63,10 +63,13 @@ buildPackages.stdenv.mkDerivation {
|
|||
passAsFile = ["buildCommand"];
|
||||
|
||||
buildCommand = ''
|
||||
${lib.optionalString (packages != [] -> docPackages == [])
|
||||
${let # Filter out nulls here to work around https://github.com/NixOS/nixpkgs/issues/82245
|
||||
# If we don't then grabbing `p.name` here will fail.
|
||||
packages' = lib.filter (p: p != null) packages;
|
||||
in lib.optionalString (packages' != [] -> docPackages == [])
|
||||
("echo WARNING: localHoogle package list empty, even though"
|
||||
+ " the following were specified: "
|
||||
+ lib.concatMapStringsSep ", " (p: p.name) packages)}
|
||||
+ lib.concatMapStringsSep ", " (p: p.name) packages')}
|
||||
mkdir -p $out/share/doc/hoogle
|
||||
|
||||
echo importing builtin packages
|
||||
|
|
Loading…
Reference in a new issue