f5aabcc95cd62416a481c41917869e0fa418490e
[hadrian.git] / src / Settings / Builders / GhcPkg.hs
1 module Settings.Builders.GhcPkg (ghcPkgArgs) where
2
3 import Expression
4 import Predicates
5 import Settings
6 import Settings.Builders.GhcCabal
7
8 ghcPkgArgs :: Args
9 ghcPkgArgs = stagedBuilder GhcPkg ? (initArgs <> updateArgs)
10
11 initArgs :: Args
12 initArgs = file bootstrappingConf ? do
13 mconcat [ arg "init"
14 , arg =<< getOutput ]
15
16 updateArgs :: Args
17 updateArgs = notM (file bootstrappingConf) ? do
18 path <- getTargetPath
19 mconcat [ arg "update"
20 , arg "--force"
21 , bootPackageDbArgs
22 , arg $ path -/- "inplace-pkg-config" ]