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

EAPI=8

# ebuild generated by hackport 0.8.4.0.9999
#hackport: flags: demo:examples

CABAL_HACKAGE_REVISION=1

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

DESCRIPTION="Haskell library for the Microsoft Language Server Protocol"
HOMEPAGE="https://github.com/haskell/lsp"

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

RDEPEND="
	>=dev-haskell/aeson-1.0.0.0:=[profile?]
	>=dev-haskell/async-2.0:=[profile?]
	dev-haskell/attoparsec:=[profile?]
	>=dev-haskell/co-log-core-0.3.1.0:=[profile?]
	dev-haskell/data-default:=[profile?]
	dev-haskell/hashable:=[profile?]
	>=dev-haskell/lens-4.15.2:=[profile?]
	dev-haskell/lens-aeson:=[profile?]
	>=dev-haskell/lsp-types-2.1:=[profile?] <dev-haskell/lsp-types-2.1.1
	dev-haskell/prettyprinter:=[profile?]
	dev-haskell/random:=[profile?]
	dev-haskell/row-types:=[profile?]
	>=dev-haskell/sorted-list-0.2.1:=[profile?] <dev-haskell/sorted-list-0.3
	dev-haskell/text:=[profile?]
	dev-haskell/text-rope:=[profile?]
	>=dev-haskell/unliftio-core-0.2.0.0:=[profile?]
	dev-haskell/unordered-containers:=[profile?]
	>=dev-haskell/uuid-1.3:=[profile?]
	>=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? (
		dev-haskell/hspec
	)
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag examples demo)
}