1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
7 pkgdesc="Functional Programming Language with Dependent Types"
8 url="https://www.idris-lang.org/"
11 depends=('ghc-libs' 'haskell-aeson' 'haskell-annotated-wl-pprint' 'haskell-ansi-terminal'
12 'haskell-ansi-wl-pprint' 'haskell-async' 'haskell-base64-bytestring' 'haskell-blaze-html'
13 'haskell-blaze-markup' 'haskell-cheapskate' 'haskell-code-page' 'haskell-fingertree'
14 'haskell-fsnotify' 'haskell-ieee754' 'haskell-libffi' 'haskell-megaparsec'
15 'haskell-network' 'haskell-optparse-applicative' 'haskell-parser-combinators'
16 'haskell-regex-tdfa' 'haskell-safe' 'haskell-split' 'haskell-terminal-size'
17 'haskell-uniplate' 'haskell-unordered-containers' 'haskell-utf8-string' 'haskell-vector'
18 'haskell-vector-binary-instances' 'haskell-zip-archive')
19 makedepends=('ghc' 'uusi' 'haskell-tagged' 'haskell-tasty' 'haskell-tasty-golden' 'haskell-tasty-rerun'
21 source=("https://github.com/idris-lang/Idris-dev/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
22 sha512sums=('5c081c34cf09c130b213626e5cc4f85ae82fef3f7ac1c76636e497a472b31a638c829e29dfe81b9a240a068736fd27db0de592be9d1b48956b809908a913ad64')
26 sed -i '1ioverride IDRIS := env LD_PRELOAD=$(shell ls ../../dist/build/libHSidris-*-ghc*.so) $(IDRIS)' \
28 uusi -u Cabal -u aeson -u fsnotify -u network -u libffi -u optparse-applicative -u vector idris.cabal
34 export CFLAGS+=' -ffat-lto-objects'
35 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
36 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
37 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
38 -fFFI -fGMP -f-release -f-freestanding -f-CI -f-execonly --ghc-option='-pie'
39 LC_CTYPE=en_US.UTF-8 runhaskell Setup build $MAKEFLAGS
40 runhaskell Setup register --gen-script
41 runhaskell Setup unregister --gen-script
42 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
43 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
48 # TODO: figure out the tests
49 PATH="$PWD/dist/build:$PWD/dist/build/idris:$PATH" LD_LIBRARY_PATH="$PWD/dist/build" IDRIS_LIBRARY_PATH="$PWD/libs" runhaskell Setup test || echo "Tests failed"
55 install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
56 install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
57 runhaskell Setup copy --destdir="${pkgdir}"
58 install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
59 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE