summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Manenti2022-09-14 15:20:25 +0200
committerAndrea Manenti2022-09-14 15:20:25 +0200
commitf7ce91daf4c8f70b2772b795373b711a8770939f (patch)
tree0ab75f01f862339cf22d41dea4ed0f018429034a
parentf92dca3b1a00de1c3dfb6c354b9734580a86b2a0 (diff)
downloadaur-f7ce91daf4c8f70b2772b795373b711a8770939f.tar.gz
adopted package: ihaskell-git and redesigned the PKGBUILD
-rw-r--r--.SRCINFO43
-rw-r--r--PKGBUILD71
2 files changed, 77 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 455e8fe6a684..4b853c89e6c1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,40 @@
pkgbase = ihaskell-git
- pkgdesc = A Haskell kernel for Jupyter, built in a sandbox.
- pkgver = 0.8.4
+ pkgdesc = A Haskell backend kernel for the IPython project
+ pkgver = 2129.e0c1a8d
pkgrel = 1
url = https://github.com/gibiansky/IHaskell
- arch = i686
arch = x86_64
license = MIT
makedepends = git
- makedepends = happy
- makedepends = haskell-gtk2hs-buildtools
- depends = python-pyzmq
- depends = jupyter
- depends = stack
- depends = ghc
- provides = ihaskell
+ makedepends = ghc
+ makedepends = haskell-hunit
+ makedepends = haskell-here
+ makedepends = haskell-hspec
+ makedepends = haskell-hspec-contrib
+ makedepends = haskell-raw-strings-qq
+ makedepends = haskell-setenv
+ makedepends = fakechroot
+ makedepends = ghc-static
+ depends = ghc-libs
+ depends = haskell-aeson
+ depends = haskell-base64-bytestring
+ depends = haskell-cmdargs
+ depends = haskell-ghc
+ depends = haskell-ghc-parser
+ depends = haskell-ghc-paths
+ depends = hlint
+ depends = haskell-http-client
+ depends = haskell-http-client-tls
+ depends = haskell-ipython-kernel
+ depends = haskell-random
+ depends = haskell-shelly
+ depends = haskell-split
+ depends = haskell-strict
+ depends = haskell-unordered-containers
+ depends = haskell-utf8-string
+ depends = haskell-vector
+ depends = jupyterlab
source = git+https://github.com/gibiansky/IHaskell
- sha512sums = SKIP
+ sha256sums = SKIP
pkgname = ihaskell-git
-
diff --git a/PKGBUILD b/PKGBUILD
index a438cf3cdd30..280ac7ebf2e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,39 +1,60 @@
-# Maintainer: Jiehong Ma <email@majiehong.com>
+# Maintainer: Andrea Manenti <andrea [dot] manenti [at] yahoo [dot] com>
pkgname=ihaskell-git
-pkgver=0.8.4
+pkgver=2129.e0c1a8d
pkgrel=1
-pkgdesc="A Haskell kernel for Jupyter, built in a sandbox."
-arch=('i686' 'x86_64')
+pkgdesc="A Haskell backend kernel for the IPython project"
+arch=('x86_64')
url="https://github.com/gibiansky/IHaskell"
license=('MIT')
-depends=('python-pyzmq' 'jupyter' 'stack' 'ghc')
-makedepends=('git' 'happy' 'haskell-gtk2hs-buildtools')
-provides=('ihaskell')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-base64-bytestring' 'haskell-cmdargs' 'haskell-ghc'
+ 'haskell-ghc-parser' 'haskell-ghc-paths' 'hlint' 'haskell-http-client' 'haskell-http-client-tls'
+ 'haskell-ipython-kernel' 'haskell-random' 'haskell-shelly' 'haskell-split' 'haskell-strict'
+ 'haskell-unordered-containers' 'haskell-utf8-string' 'haskell-vector' 'jupyterlab')
+makedepends=('git' 'ghc' 'haskell-hunit' 'haskell-here' 'haskell-hspec' 'haskell-hspec-contrib'
+ 'haskell-raw-strings-qq' 'haskell-setenv' 'fakechroot' 'ghc-static')
conflicts=()
source=("git+https://github.com/gibiansky/IHaskell")
-sha512sums=('SKIP')
+sha256sums=('SKIP')
-prepare()
-{
- cd "$srcdir/IHaskell"
+build() {
+ cd IHaskell
+
+ runhaskell Setup configure --ghc-option='-dynamic' --prefix=/usr --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --enable-tests
+
+ runhaskell Setup build
}
-build() {
- export STACK_ROOT="$HOME/.stack/"
- cd "$srcdir/IHaskell"
- stack setup
- printf '%s\n' 'If you never used stack before, run `stack init` first.'
- stack install ghc-parser --no-copy-bins
- stack install ipython-kernel --no-copy-bins
- stack install system-argv0 --no-copy-bins
- stack install ihaskell --no-copy-bins
- stack build
- stack build
+ check() {
+ cd IHaskell
+ export PATH=$PWD/dist/build/ihaskell:$PATH
+ export GHC_PACKAGE_PATH=$PWD/dist/package.conf.inplace/:$GHC_PACKAGE_PATH
+ runhaskell Setup test
}
package() {
- printf '\n%s\n' 'Now, install ihaskell with `ihaskell install`, and enjoy it in `jupyter notebook`!'
- printf '%s\n\n' 'Also make sure to set resolver to `resolver: lts-6.2` in your ~/.stack/global/stack.yaml file.'
- printf '%s\n' 'If you run in any issue, make sure to check that you initialiazed stack with `stack init`' 'But change the resolver as mentionned'
+ cd IHaskell
+
+ runhaskell Setup copy --destdir="$pkgdir"
+ install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+
+ _ghc_ver=$(ghc -V | sed -e 's/[A-Za-z, ]\+\([0-9.]\+\)$/\1/')
+ _kernel_json_content='{"argv":["/usr/bin/ihaskell","kernel","{connection_file}","--ghclib","/usr/lib/ghc-'$_ghc_ver'","+RTS","-M3g","-N2","-RTS"],"display_name":"Haskell","language":"haskell"}'
+
+ msg2 "Generating kernel.json"
+ echo $_kernel_json_content > html/kernel.json
+
+ msg2 "Copying labextension and kernel in jupyter share folder"
+ for _file in $(ls jupyterlab-ihaskell/labextension/static)
+ do
+ install -D -m644 jupyterlab-ihaskell/labextension/static/$_file "$pkgdir"/usr/share/jupyter/labextension/jupyterlab-ihaskell/static/$_file
+ done
+
+ install -D -m644 jupyterlab-ihaskell/labextension/package.json "$pkgdir"/usr/share/jupyter/labextension/jupyterlab-ihaskell/package.json
+
+ for _file in $(ls html)
+ do
+ install -D -m644 html/$_file "$pkgdir"/usr/share/jupyter/kernels/haskell/$_file
+ done
+
}