Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Distribution.PkgConfigVersionHook
Description
main :: IO () main = defaultMainWithHooks $ simpleUserHooks & addHook (mkSettings "nix-store") { macroName = NIX, flagPrefixName = "nix" }
The above will look for a pkg-config package nix-store
, and then
Define CPP, C and C++ macros
NIX_MAJOR
, an integerNIX_MINOR
, an integerNIX_PATCH
, an integer; 0 if missingNIX_IS_AT_LEAST(major,minor,patch)
, returning true when the discovered version>=
the specified version
- Set or unset flags like `nix-2_4` so that the flag is true when the discovered version is at least the version in the flag's name.
Synopsis
- addHook :: Settings -> UserHooks -> UserHooks
- mkSettings :: String -> Settings
- data Settings = Settings {}
- composeConfHook :: Settings -> ((GenericPackageDescription, a) -> ConfigFlags -> IO b) -> (GenericPackageDescription, a) -> ConfigFlags -> IO b
Documentation
addHook :: Settings -> UserHooks -> UserHooks Source #
Hook into Cabal to provide pkg-config metadata. Can be applied multiple times to support multiple packages.
mkSettings :: String -> Settings Source #
Derive a default Settings
value from just a pkg-config package name.
How the metadata for a pkg-config package should be made available to the cabal file.
Constructors
Settings | |
Fields
|
composeConfHook :: Settings -> ((GenericPackageDescription, a) -> ConfigFlags -> IO b) -> (GenericPackageDescription, a) -> ConfigFlags -> IO b Source #