cabal-version: 2.2

name: json-feed
version: 2.0.0.10

synopsis: JSON Feed
description:
  This is an implementation of the JSON Feed spec in Haskell. The spec is
  available at <https://jsonfeed.org>. JSON Feed is similar to the Atom and RSS
  feed formats, but it is serialized as JSON rather than XML.

build-type: Simple
category: Web
extra-source-files:
  CHANGELOG.markdown
  README.markdown
  feeds/allenpike.com.json
  feeds/daringfireball.net.json
  feeds/flyingmeat.com.json
  feeds/hypercritical.co.json
  feeds/inessential.com.json
  feeds/jsonfeed.org.json
  feeds/manton.org.json
  feeds/maybepizza.com.json
  feeds/shapeof.com.json
  feeds/therecord.co.json
  feeds/timetable.manton.org.json
license-file: LICENSE.markdown
license: MIT
maintainer: Taylor Fausak

source-repository head
  location: https://github.com/tfausak/json-feed
  type: git

flag pedantic
  default: False
  description: Enables @-Werror@, which turns warnings into errors.
  manual: True

common library
  build-depends:
    , aeson >= 2.0.3 && < 2.3
    , base >= 4.16.0 && < 4.20
    , bytestring >= 0.11.3 && < 0.12
    , mime-types >= 0.1.0 && < 0.2
    , network-uri >= 2.6.4 && < 2.7
    , tagsoup >= 0.14.8 && < 0.15
    , text >= 1.2.5 && < 1.3 || >= 2.0 && < 2.2
    , time >= 1.11.1 && < 1.13
  default-language: Haskell2010
  ghc-options:
    -Weverything
    -Wno-all-missed-specialisations
    -Wno-implicit-prelude
    -Wno-missed-specialisations
    -Wno-missing-deriving-strategies
    -Wno-missing-exported-signatures
    -Wno-missing-kind-signatures
    -Wno-missing-safe-haskell-mode
    -Wno-prepositive-qualified-module
    -Wno-unsafe

  if flag(pedantic)
    ghc-options: -Werror

common executable
  import: library

  build-depends: json-feed
  ghc-options:
    -rtsopts
    -threaded
    -Wno-unused-packages

library
  import: library

  exposed-modules: JsonFeed
  hs-source-dirs: source/library

test-suite json-feed-test-suite
  import: executable

  build-depends:
    , filepath >= 1.4.2 && < 1.5
    , hspec >= 2.9.7 && < 2.12
  hs-source-dirs: source/test-suite
  main-is: Main.hs
  type: exitcode-stdio-1.0