From b453d30f73352b5b8e974f9bb4e7aafdf85bca99 Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Sat, 30 Jan 2016 16:20:42 +0100 Subject: [PATCH] Only Custom setup scripts should be compiled with '-i -i.'. See https://github.com/haskell/cabal/issues/3003#issuecomment-176494768. --- cabal-install/Distribution/Client/SetupWrapper.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cabal-install/Distribution/Client/SetupWrapper.hs b/cabal-install/Distribution/Client/SetupWrapper.hs index 47814a62c71..64a2bb2f5c7 100644 --- a/cabal-install/Distribution/Client/SetupWrapper.hs +++ b/cabal-install/Distribution/Client/SetupWrapper.hs @@ -568,7 +568,9 @@ externalSetupMethod verbosity options pkg bt mkargs = do , ghcOptObjDir = Flag setupDir , ghcOptHiDir = Flag setupDir , ghcOptSourcePathClear = Flag True - , ghcOptSourcePath = toNubListR [workingDir] + , ghcOptSourcePath = case bt of + Custom -> toNubListR [workingDir] + _ -> mempty , ghcOptPackageDBs = usePackageDB options'' , ghcOptHideAllPackages = Flag newPedanticDeps , ghcOptCabal = Flag newPedanticDeps