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

EAPI=8

# ebuild generated by hackport 0.5.3.9999

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

DESCRIPTION="A library for creating and using Jupyter kernels"
HOMEPAGE="https://github.com/gibiansky/haskell-jupyter"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

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

RESTRICT=test # needs running jupyter

RDEPEND=">=dev-haskell/aeson-0.6:=[profile?]
	>=dev-haskell/async-2.0:=[profile?]
	>=dev-haskell/cereal-0.3:=[profile?]
	>=dev-haskell/exceptions-0.8:=[profile?]
	>=dev-haskell/monad-control-1.0:=[profile?]
	>=dev-haskell/mtl-2.1:=[profile?]
	>=dev-haskell/sha-1.6:=[profile?]
	>=dev-haskell/temporary-1.2:=[profile?]
	>=dev-haskell/text-1.2:=[profile?]
	>=dev-haskell/unordered-containers-0.2.5:=[profile?]
	>=dev-haskell/uuid-1.3:=[profile?]
	>=dev-haskell/zeromq4-haskell-0.1:=[profile?]
	>=dev-lang/ghc-7.8.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-1.18.1.3
"

PATCHES=(
	"${FILESDIR}"/${P}-ghc84.patch
	"${FILESDIR}/${P}-add-examples-flag.patch"
	"${FILESDIR}/${P}-add-monad-fail.patch"
)

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