# 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

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

DESCRIPTION="Library for working with product types generically"
HOMEPAGE="https://github.com/Shimuuar/fixed-vector-hetero"

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

PATCHES=(
	"${FILESDIR}/${PN}-0.6.2.0-cabal-doctest.patch"
)

RDEPEND=">=dev-haskell/fixed-vector-1.0.0.0:=[profile?] <dev-haskell/fixed-vector-1.3:=[profile?]
	>=dev-haskell/primitive-0.6.2:=[profile?]
	>=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? (
		>=dev-haskell/base-compat-0.10.5 <dev-haskell/base-compat-1
		>=dev-haskell/cabal-doctest-1.0.9 <dev-haskell/cabal-doctest-1.1
	)
"

src_configure() {
	if use test; then
		export GHC_BOOTSTRAP_PACKAGES+=( 'cabal-doctest' )
	fi

	haskell-cabal_src_configure
}