cabal-version:       2.2

name:                socket-unix
version:             0.2.1.0
synopsis:            Unix domain sockets
description:         A Unix domain socket extension for the socket library
homepage:            https://github.com/flip111/haskell-socket-unix#readme
license:             MIT
license-file:        LICENSE
author:              flip111, Vyacheslav Hashov
maintainer:          flip101@gmail.com, vyacheslavhashov@gmail.com
copyright:           2017 Vyacheslav Hashov
category:            System, Network
stability:           Experimental
build-type:          Simple
extra-source-files:  README.md CHANGELOG.md

source-repository head
  type:     git
  location: https://github.com/flip111/haskell-socket-unix

library
  hs-source-dirs:      src
  if os(linux)
    hs-source-dirs:    platform/linux
  if os(osx) || os(darwin) || os(freebsd) || os(openbsd) || os(netbsd) || os(solaris)
    hs-source-dirs:    platform/unix
  exposed-modules:     System.Socket.Family.Unix
  other-modules:       System.Socket.Family.Unix.Internal
                       System.Socket.Family.Unix.Platform
  build-depends:
      base >= 4.11 && < 5
    , socket == 0.8.3.0
    , bytestring >= 0.10 && < 0.13

  ghc-options:
    -Wall
  default-language:    Haskell2010

test-suite default
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  if os(linux)
    hs-source-dirs:    platform_test/linux
  if os(osx) || os(darwin) || os(freebsd) || os(openbsd) || os(netbsd) || os(solaris)
    hs-source-dirs:    platform_test/unix
  main-is:             test.hs
  other-modules:       Internal
                       Platform
  build-depends:
      base >= 4.11 && < 5
    , socket == 0.8.3.0
    , socket-unix
    , tasty >= 1.1 && < 1.6
    , tasty-hunit >= 0.10 && < 0.11
    , bytestring >= 0.10 && < 0.13
    , unix >= 2.7 && < 2.9
    , async >= 2.2 && < 2.3
  default-language:    Haskell2010

test-suite threaded
  type:                exitcode-stdio-1.0
  hs-source-dirs:      test
  if os(linux)
    hs-source-dirs:    platform_test/linux
  if os(osx) || os(darwin) || os(freebsd) || os(openbsd) || os(netbsd) || os(solaris)
    hs-source-dirs:    platform_test/unix
  main-is:             test.hs
  other-modules:       Internal
                       Platform
  build-depends:
      base >= 4.11 && < 5
    , socket == 0.8.3.0
    , socket-unix
    , tasty >= 1.1 && < 1.6
    , tasty-hunit >= 0.10 && < 0.11
    , bytestring >= 0.10 && < 0.13
    , unix >= 2.7 && < 2.9
    , async >= 2.2 && < 2.3
  ghc-options:         -threaded
  default-language:    Haskell2010