cabal-version:       1.12

name:                windns
version:             0.1.0.1
synopsis:            Domain Name Service (DNS) lookup via the <windns.h>/dnsapi.dll standard library
X-SPDX-License-Identifier: GPL-2.0-or-later
license:             GPL-2
license-files:       LICENSE LICENSE.GPLv2 LICENSE.GPLv3
author:              Herbert Valerio Riedel
maintainer:          hvr@gnu.org
bug-reports:         https://github.com/hvr/windns/issues

category:            Network
build-type:          Simple
description: {

This package implements an API for accessing
the [Domain Name Service (DNS)](https://tools.ietf.org/html/rfc1035)
resolver service via the
standard [<windns.h>/dnsapi.dll](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682100\(v=vs.85\).aspx)
system library on Win32 systems.
.
This package provides the high-level API-subset of the [resolv](https://hackage.haskell.org/package/resolv) package.

}

extra-source-files:  ChangeLog.md
                     cbits/hs_windns.h

source-repository head
  type:              git
  location:          https://github.com/hvr/windns.git

flag allow-non-windows
  description:       Allow package to be built on @!os(windows)@
  manual:            True
  default:           False

library
  exposed-modules:   Network.DNS
  other-modules:     Network.DNS.FFI

  default-language:  Haskell2010
  other-extensions:  BangPatterns
                     CApiFFI
                     DeriveFoldable
                     DeriveFunctor
                     DeriveTraversable
                     GeneralizedNewtypeDeriving
                     RecordWildCards
                     Trustworthy

  build-depends:     base       >= 4.5.1.0 && < 4.13
                   , bytestring >= 0.9.2   && < 0.11
                   , deepseq    >= 1.3.0.0 && < 1.5

  build-tools:       hsc2hs >= 0.67 && < 0.69

  hs-source-dirs:    src
  include-dirs:      cbits

  ghc-options:       -Wall
  extra-libraries:   dnsapi

  if !(os(windows) || flag(allow-non-windows))
    build-depends:base<0