# 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: -disable-git-info,-hide-dependency-versions,-integration-tests,-static,-supported-build,-developer-mode

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

DESCRIPTION="The Haskell Tool Stack"
HOMEPAGE="https://haskellstack.org"

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

PATCHES=(
	"${FILESDIR}/${PN}-2.13.1-disable-network-tests.patch"
)

RDEPEND=">=dev-haskell/aeson-2.0.3.0:=[profile?]
	>=dev-haskell/aeson-warning-parser-0.1.0:=[profile?]
	>=dev-haskell/ansi-terminal-1.0:=[profile?]
	>=dev-haskell/async-2.2.4:=[profile?]
	>=dev-haskell/attoparsec-0.14.4:=[profile?]
	>=dev-haskell/base64-bytestring-1.2.1.0:=[profile?]
	>=dev-haskell/cabal-3.8.1.0:=[profile?]
	>=dev-haskell/casa-client-0.0.2:=[profile?]
	>=dev-haskell/companion-0.1.0:=[profile?]
	>=dev-haskell/conduit-1.3.5:=[profile?]
	>=dev-haskell/conduit-extra-1.3.6:=[profile?]
	>=dev-haskell/crypton-0.33:=[profile?]
	>=dev-haskell/echo-0.1.4:=[profile?]
	>=dev-haskell/extra-1.7.14:=[profile?]
	>=dev-haskell/file-embed-0.0.15.0:=[profile?]
	>=dev-haskell/filelock-0.1.1.7:=[profile?]
	>=dev-haskell/fsnotify-0.4.1:=[profile?]
	>=dev-haskell/generic-deriving-1.14.5:=[profile?]
	>=dev-haskell/githash-0.1.7.0:=[profile?]
	>=dev-haskell/hi-file-parser-0.1.4.0:=[profile?]
	>=dev-haskell/hpack-0.36.0:=[profile?]
	>=dev-haskell/http-client-0.7.14:=[profile?]
	>=dev-haskell/http-client-tls-0.3.6.2:=[profile?]
	>=dev-haskell/http-conduit-2.3.8.1:=[profile?]
	>=dev-haskell/http-download-0.2.1.0:=[profile?]
	>=dev-haskell/http-types-0.12.3:=[profile?]
	>=dev-haskell/memory-0.18.0:=[profile?]
	>=dev-haskell/microlens-0.4.13.1:=[profile?]
	>=dev-haskell/mustache-2.4.2:=[profile?]
	>=dev-haskell/neat-interpolation-0.5.1.3:=[profile?]
	>=dev-haskell/open-browser-0.2.1.0:=[profile?]
	>=dev-haskell/optparse-applicative-0.18.1.0:=[profile?]
	>=dev-haskell/optparse-simple-0.1.1.4:=[profile?]
	>=dev-haskell/pantry-0.9.2:=[profile?]
	>=dev-haskell/path-0.9.2:=[profile?]
	>=dev-haskell/path-io-1.8.1:=[profile?]
	>=dev-haskell/persistent-2.14.0.0:=[profile?] <dev-haskell/persistent-2.15:=[profile?]
	>=dev-haskell/persistent-sqlite-2.13.1.1:=[profile?]
	>=dev-haskell/project-template-0.2.1.0:=[profile?]
	>=dev-haskell/random-1.2.1.1:=[profile?]
	>=dev-haskell/rio-0.1.22.0:=[profile?]
	>=dev-haskell/rio-prettyprint-0.1.7.0:=[profile?]
	>=dev-haskell/split-0.2.3.5:=[profile?]
	>=dev-haskell/tar-0.5.1.1:=[profile?]
	>=dev-haskell/text-2.0.2:=[profile?]
	>=dev-haskell/unix-compat-0.7:=[profile?]
	>=dev-haskell/unordered-containers-0.2.19.1:=[profile?]
	>=dev-haskell/vector-0.13.0.0:=[profile?]
	>=dev-haskell/yaml-0.11.11.2:=[profile?]
	>=dev-haskell/zlib-0.6.3.0:=[profile?]
	>=dev-lang/ghc-9.4.7:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.8.1.0 <dev-haskell/cabal-3.12
	test? ( >=dev-haskell/hspec-2.10.10
		>=dev-haskell/quickcheck-2.14.3
		>=dev-haskell/raw-strings-qq-1.1 )
"

src_configure() {
	haskell-cabal_src_configure \
		--flag=-developer-mode \
		--flag=-disable-git-info \
		--flag=-hide-dependency-versions \
		--flag=-integration-tests \
		--flag=-static \
		--flag=-supported-build
}