Skip to content

Commit

Permalink
Consider "package.yaml" to be a pkg file #1819
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Feb 21, 2016
1 parent 26feb97 commit b725c46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ resolvePackage packageConfig gpkg =
runReaderT
(packageDescModulesAndFiles pkg)
(cabalfp, buildDir distDir)
buildFiles <- liftM (S.insert cabalfp) $
setupFiles <-
if buildType pkg `elem` [Nothing, Just Custom]
then do
let setupHsPath = pkgDir </> $(mkRelFile "Setup.hs")
Expand All @@ -231,6 +231,10 @@ resolvePackage packageConfig gpkg =
setupLhsExists <- doesFileExist setupLhsPath
if setupLhsExists then return (S.singleton setupLhsPath) else return S.empty
else return S.empty
buildFiles <- liftM (S.insert cabalfp . S.union setupFiles) $ do
let hpackPath = pkgDir </> $(mkRelFile Hpack.packageConfig)
hpackExists <- doesFileExist hpackPath
return $ if hpackExists then S.singleton hpackPath else S.empty
return (componentModules, componentFiles, buildFiles <> dataFiles', warnings)
pkgId = package (packageDescription gpkg)
name = fromCabalPackageName (pkgName pkgId)
Expand Down

0 comments on commit b725c46

Please sign in to comment.