packages feed

dns-4.2.0: dns.cabal

cabal-version:      2.0
name:               dns
version:            4.2.0
license:            BSD3
license-file:       LICENSE
maintainer:         Kazu Yamamoto <kazu@iij.ad.jp>
author:             Kazu Yamamoto <kazu@iij.ad.jp>
tested-with:
    ghc ==8.0.2 ghc ==8.2.2 ghc ==8.4.4 ghc ==8.6.5 ghc ==8.8.1

synopsis:           DNS library in Haskell
description:
    A thread-safe DNS library for both clients and servers written
    in pure Haskell.

category:           Network
build-type:         Simple
extra-source-files:
    Changelog.md
    cabal.project
    cbits/dns.c

source-repository head
    type:     git
    location: https://github.com/kazu-yamamoto/dns.git

library
    exposed-modules:
        Network.DNS
        Network.DNS.Lookup
        Network.DNS.LookupRaw
        Network.DNS.Resolver
        Network.DNS.Utils
        Network.DNS.Types
        Network.DNS.Decode
        Network.DNS.Encode
        Network.DNS.IO

    other-modules:    Network.DNS.Transport
    default-language: Haskell2010
    ghc-options:      -Wall
    build-depends:
        dns-internal,
        base >=4 && <5,
        array,
        async,
        attoparsec,
        auto-update,
        base16-bytestring,
        base64-bytestring,
        bytestring,
        containers,
        crypton,
        hourglass,
        iproute >=1.3.2,
        mtl,
        network >=2.3,
        psqueues

library dns-internal
    exposed-modules:
        Network.DNS.Imports
        Network.DNS.Types.Internal
        Network.DNS.Types.Resolver
        Network.DNS.Resolver.Internal
        Network.DNS.Decode.Parsers
        Network.DNS.Decode.Internal
        Network.DNS.Encode.Builders
        Network.DNS.Encode.Internal
        Network.DNS.StateBinary
        Network.DNS.Memo
        Network.DNS.Base32Hex

    hs-source-dirs:   internal
    default-language: Haskell2010
    ghc-options:      -Wall
    build-depends:
        base,
        array,
        async,
        attoparsec,
        auto-update,
        base16-bytestring,
        base64-bytestring,
        bytestring,
        case-insensitive,
        containers,
        crypton,
        hourglass,
        iproute,
        mtl,
        network,
        psqueues

    if os(windows)
        c-sources:       cbits/dns.c
        extra-libraries: iphlpapi

test-suite network-tests
    type:               exitcode-stdio-1.0
    main-is:            Spec.hs
    build-tool-depends: hspec-discover:hspec-discover
    hs-source-dirs:     test2
    other-modules:
        LookupSpec
        IOSpec

    default-language:   Haskell2010
    ghc-options:        -Wall
    build-depends:
        dns,
        dns-internal,
        base,
        hspec,
        network

test-suite spec-tests
    type:               exitcode-stdio-1.0
    main-is:            Spec.hs
    build-tool-depends: hspec-discover:hspec-discover
    hs-source-dirs:     test
    other-modules:
        EncodeSpec
        DecodeSpec
        RoundTripSpec

    default-language:   Haskell2010
    ghc-options:        -Wall
    build-depends:
        dns,
        dns-internal,
        QuickCheck >=2.9,
        base,
        bytestring,
        case-insensitive,
        hspec,
        iproute >=1.3.2,
        word8