mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 07:18:31 +01:00
Default build flags available
This commit is contained in:
parent
d4432cd95b
commit
5a410bf896
@ -40,6 +40,7 @@ defaultBuildSettings = BuildSettings
|
||||
, cleanBeforeBuild = True
|
||||
, excludedPackages = empty
|
||||
, testWorkerThreads = 4
|
||||
, flags = Set.fromList $ words "blaze_html_0_5"
|
||||
}
|
||||
|
||||
build :: BuildSettings -> IO ()
|
||||
|
||||
@ -31,7 +31,7 @@ getInstallInfo settings = do
|
||||
| otherwise = stablePackages settings
|
||||
allPackages = dropExcluded settings allPackages'
|
||||
let totalCore = extraCore settings `Set.union` Set.map (\(PackageIdentifier p _) -> p) (hpcore hp)
|
||||
pdb <- loadPackageDB totalCore allPackages
|
||||
pdb <- loadPackageDB settings totalCore allPackages
|
||||
final <- narrowPackageDB pdb $ Set.fromList $ Map.toList $ Map.map snd $ allPackages
|
||||
|
||||
putStrLn "Printing build plan to build-plan.log"
|
||||
|
||||
@ -26,7 +26,8 @@ import Distribution.PackageDescription (Condition (..),
|
||||
genPackageFlags,
|
||||
libBuildInfo,
|
||||
packageDescription,
|
||||
testBuildInfo)
|
||||
testBuildInfo,
|
||||
FlagName (FlagName))
|
||||
import Distribution.PackageDescription.Parse (ParseResult (ParseOk),
|
||||
parsePackageDescription)
|
||||
import Distribution.System (buildArch, buildOS)
|
||||
@ -46,10 +47,11 @@ import Stackage.Util
|
||||
-- version.
|
||||
--
|
||||
-- * For other packages, select the maximum version number.
|
||||
loadPackageDB :: Set PackageName -- ^ core packages
|
||||
loadPackageDB :: BuildSettings
|
||||
-> Set PackageName -- ^ core packages
|
||||
-> Map PackageName (VersionRange, Maintainer) -- ^ additional deps
|
||||
-> IO PackageDB
|
||||
loadPackageDB core deps = do
|
||||
loadPackageDB settings core deps = do
|
||||
tarName <- getTarballName
|
||||
lbs <- L.readFile tarName
|
||||
addEntries mempty $ Tar.read lbs
|
||||
@ -119,4 +121,5 @@ loadPackageDB core deps = do
|
||||
checkCond' (COr c1 c2) = checkCond' c1 || checkCond' c2
|
||||
checkCond' (CAnd c1 c2) = checkCond' c1 && checkCond' c2
|
||||
|
||||
flags = map flagName $ filter flagDefault $ genPackageFlags gpd
|
||||
flags = map flagName (filter flagDefault $ genPackageFlags gpd) ++
|
||||
(map FlagName $ Set.toList $ Stackage.Types.flags settings)
|
||||
|
||||
@ -79,4 +79,6 @@ data BuildSettings = BuildSettings
|
||||
-- packages are dependencies of others, they will still be included.
|
||||
, testWorkerThreads :: Int
|
||||
-- ^ How many threads to spawn for running test suites.
|
||||
, flags :: Set String
|
||||
-- ^ Compile flags which should be turned on.
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user