cabal-version:       2.2
name:                data-prometheus
version:             0.1.0.0
synopsis:            Prometheus metrics text format
description:         Pure Prometheus metrics text data parser and builder
homepage:            https://github.com/sorki/data-prometheus
license:             BSD-3-Clause
license-file:        LICENSE
author:              Sorki
maintainer:          srk@48.io
copyright:           2024 Sorki
category:            Metrics
build-type:          Simple
extra-source-files:
  README.md

library
  hs-source-dirs:      src
  exposed-modules:     Data.Prometheus
                     , Data.Prometheus.Monad
                     , Data.Prometheus.Parse
                     , Data.Prometheus.Pretty
                     , Data.Prometheus.Types
  build-depends:       base >= 4.7 && < 5
                     , attoparsec
                     , containers
                     , mtl
                     , text
                     , transformers
  ghc-options:         -Wall
  default-language:    Haskell2010

flag buildExecutable
    description: Build example executable
    default: False

executable data-prometheus-exe
  if flag(buildExecutable)
    buildable: True
  else
    buildable: False
  hs-source-dirs:      app
  main-is:             Main.hs
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  build-depends:       base
                     , attoparsec
                     , bytestring
                     , lens
                     , wreq
                     , data-prometheus
  default-language:    Haskell2010


test-suite data-prometheus-tests
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  main-is:             Spec.hs
  other-modules:       ParseSpec
                       PrettySpec
                       MonadSpec
                       SpecHelper
  build-depends:       base >= 4.7 && < 5
                     , data-prometheus
                     , attoparsec
                     , containers
                     , raw-strings-qq
                     , hspec
  default-language:    Haskell2010

source-repository head
  type:     git
  location: https://github.com/sorki/data-prometheus