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

EAPI=8

# ebuild generated by hackport 0.9.0.0.9999
#hackport: flags: build-example:example

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

DESCRIPTION="A flexible, extensible s-expression library"
HOMEPAGE="https://github.com/aisamanra/s-cargot"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="example"
CABAL_CHBINS=(
	'example' 's-cargot-example'
	)

RDEPEND=">=dev-haskell/parsec-3.1:=[profile?] <dev-haskell/parsec-4:=[profile?]
	>=dev-haskell/text-1.2:=[profile?] <dev-haskell/text-3:=[profile?]
	>=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/hunit-1.6 <dev-haskell/hunit-1.7
		>=dev-haskell/quickcheck-2.8 <dev-haskell/quickcheck-3 )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag example build-example)
}