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

EAPI=8

# ebuild generated by hackport 0.7.3.0
#hackport: flags: buildexample:examples,buildexe:executable

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

DESCRIPTION="pretty printer for data types with a 'Show' instance"
HOMEPAGE="https://github.com/cdepillabout/pretty-simple"

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

GHC_BOOTSTRAP_PACKAGES=(
	cabal-doctest
)

RDEPEND=">=dev-haskell/prettyprinter-1.7.0:=[profile?]
	>=dev-haskell/prettyprinter-ansi-terminal-1.1.2:=[profile?]
	>=dev-lang/ghc-8.4.3:=
	examples? ( dev-haskell/aeson:=[profile?] )
	executable? ( dev-haskell/optparse-applicative:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.2.0.1
	>=dev-haskell/cabal-doctest-1.0.2
	test? ( >=dev-haskell/doctest-0.13
		dev-haskell/glob
		dev-haskell/quickcheck )
"

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