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

EAPI=8

# ebuild generated by hackport 0.7.9999
#hackport: flags: -static

CABAL_FEATURES="lib profile haddock hoogle hscolour" # test-suite needs newer hspec-2.8
inherit haskell-cabal

DESCRIPTION="Dockerfile Linter JavaScript API"
HOMEPAGE="https://github.com/hadolint/hadolint"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"

RESTRICT=test # needs hspec-2.8

RDEPEND="dev-haskell/aeson:=[profile?]
	dev-haskell/cabal:=[profile?]
	dev-haskell/colourista:=[profile?]
	dev-haskell/cryptonite:=[profile?]
	dev-haskell/data-default:=[profile?]
	dev-haskell/email-validate:=[profile?]
	dev-haskell/foldl:=[profile?]
	>=dev-haskell/gitrev-1.3.1:=[profile?]
	dev-haskell/hsyaml:=[profile?]
	dev-haskell/ilist:=[profile?]
	>=dev-haskell/language-docker-10.3.0:=[profile?] <dev-haskell/language-docker-11:=[profile?]
	>=dev-haskell/megaparsec-9.0.0:=[profile?]
	dev-haskell/mtl:=[profile?]
	dev-haskell/network-uri:=[profile?]
	>=dev-haskell/optparse-applicative-0.14.0:=[profile?]
	dev-haskell/parallel:=[profile?]
	>=dev-haskell/parsec-3.1.14:=[profile?]
	>=dev-haskell/prettyprinter-1.7.0:=[profile?]
	dev-haskell/semver:=[profile?]
	>=dev-haskell/spdx-1.0:=[profile?]
	>=dev-haskell/split-0.2:=[profile?]
	dev-haskell/text:=[profile?]
	>=dev-haskell/timerep-2.0:=[profile?]
	dev-haskell/void:=[profile?]
	>=dev-lang/ghc-8.6.3:=
	>=dev-util/shellcheck-0.7.1:=[profile?]
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.4.0.1
"
# 	test? ( >=dev-haskell/hspec-2.8.3
# 		>=dev-haskell/hunit-1.2
# 		dev-haskell/silently )
# "

src_prepare() {
	default

	cabal_chdeps \
		'deepseq ==1.4.4.*' 'deepseq >=1.4.4'
}

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