diff --git a/pkgs/development/haskell-modules/generic-stack-builder.nix b/pkgs/development/haskell-modules/generic-stack-builder.nix index c7cfbef7d132..13a939fcce9a 100644 --- a/pkgs/development/haskell-modules/generic-stack-builder.nix +++ b/pkgs/development/haskell-modules/generic-stack-builder.nix @@ -29,7 +29,10 @@ stdenv.mkDerivation (args // { preferLocalBuild = true; - configurePhase = args.configurePhase or "stack setup"; + configurePhase = args.configurePhase or '' + export STACK_ROOT=$NIX_BUILD_TOP/.stack + stack setup + ''; buildPhase = args.buildPhase or "stack build";