# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# ebuild generated by hackport 0.6.9999
#hackport: flags: -use-mock-network

CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
inherit haskell-cabal

DESCRIPTION="TCP instantiation of Network.Transport"
HOMEPAGE="http://haskell-distributed.github.com"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE=""

RDEPEND=">=dev-haskell/data-accessor-0.2:=[profile?] <dev-haskell/data-accessor-0.3:=[profile?]
	>=dev-haskell/network-2.6.2:=[profile?]
	>=dev-haskell/network-transport-0.5:=[profile?] <dev-haskell/network-transport-0.6:=[profile?]
	>=dev-lang/ghc-7.4.1:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-1.10
	test? ( >=dev-haskell/network-transport-tests-0.2.1.0 <dev-haskell/network-transport-tests-0.3 )
"

src_prepare() {
	default

	cabal_chdeps\
		'network >= 2.6.2 && < 2.7' 'network >=2.6.2'\
		'containers >= 0.4 && < 0.6' 'containers >=0.4'\
		'network >= 2.3 && < 2.7' 'network >= 2.3'
}

src_configure() {
	haskell-cabal_src_configure \
		--flag=-use-mock-network
}