cabal-install BuildFlags is not exported?
In Distribution.Client.CmdBuild module, BuildFlags is defined but not exported.
https://github.com/haskell/cabal/blob/dd312ecc44b79945061a4cb45e15b90f26382be4/cabal-install/src/Distribution/Client/CmdBuild.hs#L4-L12
https://github.com/haskell/cabal/blob/dd312ecc44b79945061a4cb45e15b90f26382be4/cabal-install/src/Distribution/Client/CmdBuild.hs#L83-L85
Thank you for the report. But is that a problem? Perhaps the flag is an implementation detail or perhaps it's deprecated? Does the flag do anything useful on the commandline?
I'm trying to import cabal-install as a library to my application. But I can not construct the argument for buildAction

How about using defaultBuildFlags?
defaultBuildFlags
Unfortunately, defaultBuildFlags is also not exported. (I found BuildFlags and defaultBuildFlags both in Cabal and cabal-install, but they are not the same, right?)
Oh, you are right, this API seems broken. Yes, they are not the same. We should probably export both BuildFlags and defaultBuildFlags. PR welcome.