Skip to content

Commit

Permalink
dev-haskell/fay: bump to 0.24.1.0-r1, loosen aeson bounds.
Browse files Browse the repository at this point in the history
Upstream issue[1] has been opened to relax the same bounds.

Also, the test package has been added, though it has to be restricted
due to a circular depenedency. Check the comments in the ebuild for a
one-off workaround if you want to run the tests.

[1]: faylang/fay#469

Signed-off-by: Wolfgang E. Sanyer <[email protected]>
  • Loading branch information
ezzieyguywuf committed Jan 9, 2021
1 parent e4cb2c8 commit e91244d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

# ebuild generated by hackport 0.6.4.9999
#hackport: flags: -test
# ebuild generated by hackport 0.6.7.9999

CABAL_FEATURES="lib profile haddock hoogle hscolour"
inherit haskell-cabal
Expand All @@ -16,10 +15,23 @@ SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE=""
IUSE="test"
# There is a circular dependency with USE=test: fay → fay-base → fay. you would
# think you could resolve this by first `USE=-test emerge -1 fay fay-base`, and
# you would be right, but due to how ghc works, and since your configuration
# flags change when USE=test, we get a broken ghc-pkg thing whenever we flip
# USE=test back no for fay.
#
# As a temporary workaround, and to actually run the tests, the following can be
# done:
#
# 1. delete the dev-haskell/fay-base dependency from this ebuild
# 2. `USE=test emerge -1 fay fay-base`
# 3. `USE=test ebuild fay-0.24.1.0-r1.ebuild test`
RESTRICT="test"

RDEPEND=">dev-haskell/aeson-0.6:=[profile?] <dev-haskell/aeson-1.5:=[profile?]
>=dev-haskell/base-compat-0.10:=[profile?] <dev-haskell/base-compat-0.11:=[profile?]
RDEPEND=">dev-haskell/aeson-0.6:=[profile?]
>=dev-haskell/base-compat-0.10:=[profile?]
>=dev-haskell/data-default-0.2:=[profile?] <dev-haskell/data-default-0.8:=[profile?]
>=dev-haskell/data-lens-light-0.1:=[profile?] <dev-haskell/data-lens-light-0.2:=[profile?]
>=dev-haskell/ghc-paths-0.1:=[profile?] <dev-haskell/ghc-paths-0.2:=[profile?]
Expand All @@ -45,9 +57,33 @@ RDEPEND=">dev-haskell/aeson-0.6:=[profile?] <dev-haskell/aeson-1.5:=[profile?]
"
DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.24.0.0
test? ( dev-haskell/attoparsec:=[profile?]
dev-haskell/fay-base
net-libs/nodejs
dev-haskell/cpphs
>=dev-haskell/random-1.0:=[profile?] <dev-haskell/random-1.2:=[profile?]
>=dev-haskell/tasty-0.9:=[profile?]
>=dev-haskell/tasty-hunit-0.8:=[profile?] <dev-haskell/tasty-hunit-0.11:=[profile?]
>=dev-haskell/tasty-th-0.1:=[profile?] <dev-haskell/tasty-th-0.2:=[profile?] )
"

src_prepare() {
default

cabal_chdeps \
'aeson > 0.6 && < 1.5' 'aeson > 0.6' \
'base-compat >= 0.10 && < 0.11' 'base-compat >= 0.10' \
'tasty >= 0.9 && < 1.2' 'tasty >= 0.9'
}

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

src_test() {
local test_loc="${S}/dist/build/fay-tests"
local test_cmd="fay-tests --num-threads=$(nproc) -random 20"
echo "${test_cmd}" || die
eval "${test_loc}/${test_cmd}" || die
}
49 changes: 8 additions & 41 deletions dev-haskell/fay/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,21 @@
<email>[email protected]</email>
<name>Gentoo Haskell</name>
</maintainer>
<use>
<flag name="test">Build the fay-tests executable</flag>
</use>
<longdescription>
Fay is a proper subset of Haskell which can be compiled (type-checked)
with GHC, and compiled to JavaScript. It is lazy, pure, with a Fay monad,
an FFI, tail-recursion optimization (experimental). It implements no type
system, for type-checking you should use GHC.
Fay is a proper subset of Haskell which is type-checked
with GHC, and compiled to JavaScript. It is lazy, pure, has a Fay monad,
an FFI, tail-recursion optimization (experimental), and support for cabal packages.

/Documentation/

See documentation at &lt;http://fay-lang.org/&gt; or build your own documentation with:

&gt; $ cabal unpack fay
&gt; $ cd fay-*
&gt; $ cabal install
&gt; $ dist/build/fay-docs/fay-docs

See &lt;https://github.com/faylang/fay/wiki&gt;

/Examples/

See &lt;http://fay-lang.org/#examples&gt;.

/Release Notes/

* Enable strict list for arithmetic sequences optimisation only when compiler optimise flag set.

* Add print and putStrLn to the Prelude

* Add list utility functions from the standard Prelude

* Test optimized as well as unoptimized builds.

* Standard precendence and associativity for infix operators

* Add function utilities from Prelude, including seq

* Add math functions in Prelude

* Add support for sections (desugaring to lambdas)

* Added example of the ContT and Deferred monad, sleep and readFile.

* Add more of the prelude, including error and a lot of math stuff.

* Remove needs for module declarations in modules that define main.

* Support enumThen ([1,2..]) style lists.

* Add support for enumFromThenTo ([1,2..10]) lists.
See the examples directory and &lt;https://github.com/faylang/fay/wiki#fay-in-the-wild&gt;

See full history at: &lt;https://github.com/faylang/fay/commits&gt;
</longdescription>
</pkgmetadata>

0 comments on commit e91244d

Please sign in to comment.