Skip to content

Commit

Permalink
Fix #26441: avoid infinite recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Jun 14, 2017
1 parent 537944e commit 9cad707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/haskell-modules/generic-stack-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ with stdenv.lib;
{ buildInputs ? []
, extraArgs ? []
, LD_LIBRARY_PATH ? []
, ghc ? ghc
, ghc' ? ghc
, ...
}@args:

Expand All @@ -14,7 +14,7 @@ stdenv.mkDerivation (args // {
buildInputs =
buildInputs ++
optional stdenv.isLinux glibcLocales ++
[ ghc pkgconfig ];
[ ghc' pkgconfig ];

STACK_PLATFORM_VARIANT="nix";
STACK_IN_NIX_SHELL=1;
Expand Down

3 comments on commit 9cad707

@ElvishJerricco
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work. Any existing call to buildStackProject now has to change the name of the ghc field they pass in to ghc'. I would instead suggest this:

{ stdenv, ghc, pkgconfig, glibcLocales, cacert }@pkgArgs:

with stdenv.lib;

{ buildInputs ? []
, extraArgs ? []
, LD_LIBRARY_PATH ? []
, ghc ? pkgArgs.ghc
, ...
}@args:

@domenkozar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will fix :) reverted in 7c455b5

@domenkozar
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.