name: simplex-chat
version: 4.5.0.3
#synopsis:
#description:
homepage: https://github.com/simplex-chat/simplex-chat#readme
license: AGPL-3
author: simplex.chat
maintainer: chat@simplex.chat
copyright: 2020-22 simplex.chat
category: Web, System, Services, Cryptography
extra-source-files:
  - README.md

dependencies:
  - aeson == 2.0.*
  - ansi-terminal >= 0.10 && < 0.12
  - async == 2.2.*
  - attoparsec == 0.14.*
  - base >= 4.7 && < 5
  - base64-bytestring >= 1.0 && < 1.3
  - bytestring == 0.10.*
  - composition == 1.0.*
  - containers == 0.6.*
  - cryptonite >= 0.27 && < 0.30
  - directory == 1.3.*
  - direct-sqlcipher == 2.3.*
  - email-validate == 2.3.*
  - exceptions == 0.10.*
  - filepath == 1.4.*
  - http-types == 0.12.*
  - mtl == 2.2.*
  - network >= 3.1.2.7 && < 3.2
  - optparse-applicative >= 0.15 && < 0.17
  - process == 1.6.*
  - random >= 1.1 && < 1.3
  - record-hasfield == 1.0.*
  - simple-logger == 0.1.*
  - simplexmq >= 3.4
  - socks == 0.6.*
  - sqlcipher-simple == 0.4.*
  - stm == 2.5.*
  - template-haskell == 2.16.*
  - terminal == 0.2.*
  - text == 1.2.*
  - time == 1.9.*
  - unliftio == 0.2.*
  - unliftio-core == 0.2.*
  - zip == 1.7.*

flags:
  swift:
    description: Enable swift JSON format
    manual: True
    default: False

when:
  - condition: flag(swift)
    cpp-options:
      - -DswiftJSON

library:
  source-dirs: src

executables:
  simplex-chat:
    source-dirs: apps/simplex-chat
    main: Main.hs
    dependencies:
      - simplex-chat
      - network == 3.1.*
      - websockets == 0.12.*
    ghc-options:
      - -threaded

  simplex-bot:
    source-dirs: apps/simplex-bot
    main: Main.hs
    dependencies:
      - simplex-chat
    ghc-options:
      - -threaded

  simplex-bot-advanced:
    source-dirs: apps/simplex-bot-advanced
    main: Main.hs
    dependencies:
      - simplex-chat
    ghc-options:
      - -threaded

tests:
  simplex-chat-test:
    source-dirs: tests
    main: Test.hs
    dependencies:
      - simplex-chat
      - async == 2.2.*
      - deepseq == 1.4.*
      - hspec == 2.7.*
      - network == 3.1.*
      - stm == 2.5.*
    ghc-options:
      - -threaded

ghc-options:
  # - -haddock
  - -Wall
  - -Wcompat
  - -Werror=incomplete-patterns
  - -Wredundant-constraints
  - -Wincomplete-record-updates
  - -Wincomplete-uni-patterns
  - -Wunused-type-patterns
