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

EAPI=8

# ebuild generated by hackport 0.8.5.1.9999
#hackport: flags: -test

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

DESCRIPTION="Haskell OAuth2 authentication client"
HOMEPAGE="https://github.com/freizl/hoauth2"

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

CABAL_CHDEPS=(
	'text                  >=2.0    && <2.3' 'text >=0.11'
)

RDEPEND="
	>=dev-haskell/aeson-2.0:=[profile?] <dev-haskell/aeson-2.3:=[profile?]
	>=dev-haskell/base64-0.4:=[profile?] <dev-haskell/base64-0.5:=[profile?]
	>=dev-haskell/cryptonite-0.30:=[profile?] <dev-haskell/cryptonite-0.31:=[profile?]
	>=dev-haskell/data-default-0.7:=[profile?] <dev-haskell/data-default-0.8:=[profile?]
	>=dev-haskell/http-conduit-2.1:=[profile?] <dev-haskell/http-conduit-2.4:=[profile?]
	>=dev-haskell/http-types-0.11:=[profile?] <dev-haskell/http-types-0.13:=[profile?]
	>=dev-haskell/memory-0.18:=[profile?] <dev-haskell/memory-0.19:=[profile?]
	>=dev-haskell/microlens-0.4.0:=[profile?] <dev-haskell/microlens-0.5:=[profile?]
	>=dev-haskell/text-0.11:=[profile?]
	>=dev-haskell/uri-bytestring-0.2.3:=[profile?] <dev-haskell/uri-bytestring-0.4:=[profile?]
	>=dev-haskell/uri-bytestring-aeson-0.1:=[profile?] <dev-haskell/uri-bytestring-aeson-0.2:=[profile?]
	>=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? (
		>=dev-haskell/hspec-2 <dev-haskell/hspec-3
	)
"

src_configure() {
	haskell-cabal_src_configure \
		--flag=-test
}