# 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: -skip-state-machine-test

CABAL_HACKAGE_REVISION=1

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

DESCRIPTION="Add ACID guarantees to any serializable Haskell data structure"
HOMEPAGE="https://github.com/acid-state/acid-state"

LICENSE="public-domain"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="executable"

PATCHES=(
	"${FILESDIR}/${PN}-0.16.1.1-add-executable-flag.patch"
)

RDEPEND=">=dev-haskell/cereal-0.4.1.0:=[profile?]
	dev-haskell/filelock:=[profile?]
	<dev-haskell/network-3.3:=[profile?]
	dev-haskell/network-bsd:=[profile?]
	>=dev-haskell/safecopy-0.6:=[profile?] <dev-haskell/safecopy-0.11:=[profile?]
	dev-haskell/th-expand-syns:=[profile?]
	>=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( dev-haskell/hedgehog
		dev-haskell/hspec
		dev-haskell/hspec-discover
		dev-haskell/text )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag executable executable) \
		--flag=-skip-state-machine-test
}