cabal-install-solver-3.10.1.0: The command-line interface for Cabal and Hackage.

Copyright | (c) Iñaki García Etxebarria 2016
License | BSD-like
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Solver.Types.PkgConfigDb

Description

Read the list of packages available to pkg-config.

Synopsis

- data PkgConfigDb
  - = PkgConfigDb (Map PkgconfigName (Maybe PkgconfigVersion))
  - | NoPkgConfigDb
- readPkgConfigDb :: Verbosity -> ProgramDb -> IO PkgConfigDb
- pkgConfigDbFromList :: [(String, String)] -> PkgConfigDb
- pkgConfigPkgIsPresent :: PkgConfigDb -> PkgconfigName -> PkgconfigVersionRange -> Bool
- pkgConfigDbPkgVersion :: PkgConfigDb -> PkgconfigName -> Maybe (Maybe PkgconfigVersion)
- getPkgConfigDbDirs :: Verbosity -> ProgramDb -> IO [FilePath]

# Documentation

data PkgConfigDb #

The list of packages installed in the system visible to `pkg-config`. This is an opaque datatype, to be constructed with `readPkgConfigDb` and queried with `pkgConfigPkgPresent`.

Constructors

PkgConfigDb (Map PkgconfigName (Maybe PkgconfigVersion)) | If an entry is `Nothing`, this means that the package seems to be present, but we don't know the exact version (because parsing of the version number failed).
NoPkgConfigDb | For when we could not run pkg-config successfully.

#### Instances

Instances details

Structured PkgConfigDb # |
Instance details Defined in Distribution.Solver.Types.PkgConfigDb Methods structure :: Proxy PkgConfigDb -> Structure structureHash' :: Tagged PkgConfigDb MD5
Generic PkgConfigDb # |
Instance details Defined in Distribution.Solver.Types.PkgConfigDb Associated Types type Rep PkgConfigDb :: Type -> Type Methods from :: PkgConfigDb -> Rep PkgConfigDb x to :: Rep PkgConfigDb x -> PkgConfigDb
Show PkgConfigDb # |
Instance details Defined in Distribution.Solver.Types.PkgConfigDb Methods showsPrec :: Int -> PkgConfigDb -> ShowS # show :: PkgConfigDb -> String # showList :: [PkgConfigDb] -> ShowS #
Binary PkgConfigDb # |
Instance details Defined in Distribution.Solver.Types.PkgConfigDb Methods put :: PkgConfigDb -> Put # get :: Get PkgConfigDb # putList :: [PkgConfigDb] -> Put #
type Rep PkgConfigDb # |
Instance details Defined in Distribution.Solver.Types.PkgConfigDb type Rep PkgConfigDb = D1 ('MetaData "PkgConfigDb" "Distribution.Solver.Types.PkgConfigDb" "cabal-install-solver-3.10.1.0-4I9p4uuKME01q5xZ1JjXoT" 'False) (C1 ('MetaCons "PkgConfigDb" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map PkgconfigName (Maybe PkgconfigVersion)))) :+: C1 ('MetaCons "NoPkgConfigDb" 'PrefixI 'False) (U1 :: Type -> Type))

readPkgConfigDb :: Verbosity -> ProgramDb -> IO PkgConfigDb #

Query pkg-config for the list of installed packages, together with their versions. Return a `PkgConfigDb` encapsulating this information.

pkgConfigDbFromList :: [(String, String)] -> PkgConfigDb #

Create a `PkgConfigDb` from a list of `(packageName, version)` pairs.

pkgConfigPkgIsPresent :: PkgConfigDb -> PkgconfigName -> PkgconfigVersionRange -> Bool #

Check whether a given package range is satisfiable in the given `pkg-config` database.

pkgConfigDbPkgVersion :: PkgConfigDb -> PkgconfigName -> Maybe (Maybe PkgconfigVersion) #

Query the version of a package in the `pkg-config` database. `Nothing` indicates the package is not in the database, while `Just Nothing` indicates that the package is in the database, but its version is not known.

getPkgConfigDbDirs :: Verbosity -> ProgramDb -> IO [FilePath] #

Query pkg-config for the locations of pkg-config's package files. Use this to monitor for changes in the pkg-config DB.