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

EAPI=8

# ebuild generated by hackport 0.7

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

DESCRIPTION="A tasty Haskell front-end framework"
HOMEPAGE="https://github.com/dmjio/miso"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE="ios jsaddle tests"

RDEPEND="dev-haskell/aeson:=[profile?]
	dev-haskell/file-embed:=[profile?]
	dev-haskell/http-api-data:=[profile?]
	dev-haskell/http-types:=[profile?]
	dev-haskell/jsaddle:=[profile?]
	dev-haskell/lucid:=[profile?]
	dev-haskell/network-uri:=[profile?]
	dev-haskell/servant:=[profile?]
	dev-haskell/servant-lucid:=[profile?]
	dev-haskell/tagsoup:=[profile?]
	dev-haskell/text:=[profile?]
	dev-haskell/vector:=[profile?]
	>=dev-lang/ghc-8.4.3:=
	jsaddle? ( dev-haskell/scientific:=[profile?]
			dev-haskell/unordered-containers:=[profile?]
			ios? ( dev-haskell/jsaddle-wkwebview:=[profile?] )
			!ios? ( dev-haskell/jsaddle-warp:=[profile?] ) )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.2.0.1
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag ios ios) \
		$(cabal_flag jsaddle jsaddle) \
		$(cabal_flag tests tests)
}