cabal-version: 2.4
name: http-client-rustls
version: 0.0.0.0

synopsis: http-client TLS backend using Rustls
description:
  Make HTTPS connections using [http-client](https://hackage.haskell.org/package/http-client)
  and [Rustls](https://github.com/rustls/rustls).
category: Cryptography, Network

author: amesgen
maintainer: amesgen@amesgen.de
homepage: https://github.com/amesgen/hs-rustls/tree/main/http-client-rustls
bug-reports: https://github.com/amesgen/hs-rustls/issues
license: CC0-1.0
license-file: LICENSE

extra-source-files:
  README.md
  CHANGELOG.md

source-repository head
  location: https://github.com/amesgen/hs-rustls
  type: git

common commons
  default-language: Haskell2010
  ghc-options: -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -Wno-name-shadowing -Wno-unticked-promoted-constructors -fhide-source-paths
  if impl(ghc >= 8.10)
    ghc-options: -Wunused-packages
  default-extensions: BlockArguments LambdaCase OverloadedStrings RankNTypes ScopedTypeVariables TypeApplications ViewPatterns

library
  import: commons
  ghc-options: -Wmissing-export-lists
  hs-source-dirs: src
  exposed-modules:
    Network.HTTP.Client.Rustls
  build-depends:
      base >= 4.12 && < 5
    , rustls ^>= 0.0
    , http-client ^>= 0.7.11
    , text ^>= 1.2 || ^>= 2.0
    , bytestring ^>= 0.10 || ^>= 0.11
    , resourcet ^>= 1.2
    , network ^>= 3.1

test-suite tasty
  import: commons
  type: exitcode-stdio-1.0
  main-is: Main.hs
  hs-source-dirs: test
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base
    , http-client-rustls
    , tasty >= 1.3 && < 1.5
    , tasty-hunit ^>= 0.10
    , bytestring
    , rustls
    , http-types ^>= 0.12
    , http-client
    , process ^>= 1.6
    , filepath ^>= 1.4
    , directory ^>= 1.3
    , temporary ^>= 1.3
    , network
    , port-utils ^>= 0.2