# 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

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

DESCRIPTION="relational-record on persistent backends"
HOMEPAGE="https://github.com/himura/persistent-relational-record"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

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

RDEPEND=">=dev-haskell/conduit-1.3.0:=[profile?]
	dev-haskell/mtl:=[profile?]
	dev-haskell/names-th:=[profile?]
	>=dev-haskell/persistable-record-0.6:=[profile?]
	>=dev-haskell/persistent-2.5:=[profile?]
	>=dev-haskell/relational-query-0.12.0.0:=[profile?]
	>=dev-haskell/resourcet-1.1:=[profile?]
	>=dev-haskell/text-0.8:=[profile?]
	>=dev-lang/ghc-8.0.1:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-1.24.0.0
	test? ( >=dev-haskell/hlint-1.7
		dev-haskell/hunit
		dev-haskell/persistent-template
		dev-haskell/test-framework
		dev-haskell/test-framework-hunit
		dev-haskell/test-framework-th
		test-examples? ( dev-haskell/monad-logger
					dev-haskell/persistent-mysql ) )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag test-examples test-examples)
}