name: start9-registry
version: 0.1.0

default-extensions:
- NoImplicitPrelude
- GeneralizedNewtypeDeriving
- LambdaCase
- MultiWayIf
- NamedFieldPuns
- NumericUnderscores
- OverloadedStrings

dependencies:
- base >=4.9.1.0 && <5
- aeson >=1.4 && <1.5
- bytestring
- casing
- comonad
- conduit
- conduit-extra
- data-default
- directory
- dns
- either
- errors
- file-embed
- fast-logger >=2.2 && <2.5
- filepath
- http-client
- http-conduit
- http-types
- interpolate
- jose-jwt
- lens
- lens-aeson
- memory
- monad-logger >=0.3 && <0.4
- monad-loops
- persistent
- persistent-sqlite
- persistent-postgresql
- persistent-template
- process
- protolude
- safe
- singletons
- split
- template-haskell
- text >=0.11 && <2.0
- time
- transformers
- unordered-containers
- unix
- wai
- wai-cors
- wai-extra >=3.0 && <3.1
- wai-logger >=2.2 && <2.4
- warp >=3.0 && <3.3
- warp-tls
- yaml >=0.11 && <0.12
- yesod >=1.6 && <1.7
- yesod-core >=1.6 && <1.7
- yesod-static
- yesod-persistent >= 1.6 && < 1.7
- shakespeare >=2.0 && <2.1

library:
  source-dirs: src
  when:
    - condition: (flag(dev)) || (flag(library-only))
      then:
        cpp-options: -DDEVELOPMENT
        ghc-options:
          - -Wall
          - -fwarn-tabs
          - -O0
          - -fdefer-typed-holes
      else:
        ghc-options:
          - -Wall
          - -fwarn-tabs
          - -O2
          - -fdefer-typed-holes

executables:
  start9-registry:
    source-dirs: app
    main: main.hs
    ghc-options:
      - -threaded
      - -rtsopts
      - -with-rtsopts=-N
      - -fdefer-typed-holes
    dependencies:
      - start9-registry
    when:
      - condition: flag(library-only)
        buildable: false

tests:
  start9-registry-test:
    source-dirs: test
    main: Main.hs
    ghc-options:
      - -Wall
      - -fdefer-typed-holes
    dependencies:
      - start9-registry
      - hspec
      - yesod-test
      - hedgehog

flags:
  library-only:
    manual: false
    default: false
    description: Build for use with "yesod devel"
  dev:
    manual: false
    default: false
    description: Turn on development settings, like auto-reload templates.