summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSebastian Reuße2017-07-10 12:54:59 +0200
committerSebastian Reuße2017-07-10 12:54:59 +0200
commit73f6940929698545d97bb526e002239deb33c155 (patch)
treebf7e086e464a6aa891670ed17a3320edd5c7ea2a /PKGBUILD
parent732ccd71e2e4883142b68276772011db08290665 (diff)
downloadaur-git-mediate-git.tar.gz
Provide stronger isolation from the global package DB
Since Haskell-packages on Arch no longer ship static components, a static, sandboxed build would fail if some dependencies are already installed globally. To fix this, we use the Arch-supplied boot-only-libs package DB, which will convince Cabal to reinstall our dependencies (including static components).
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD14
1 files changed, 10 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 221caf047413..ca8417ab20d4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=git-mediate-git
_gitname=git-mediate
pkgver=r94.07b1a7b
-pkgrel=1
+pkgrel=2
pkgdesc="Resolve trivial conflicts automatically when merging branches in git repositories."
arch=(i686 x86_64)
url="https://github.com/Peaker/git-mediate"
@@ -10,7 +10,7 @@ license=(GPL)
provides=(git-mediate)
conflicts=(git-mediate resolve-trivial-conflicts)
replaces=(resolve-trivial-conflicts resolve-trivial-conflicts-git)
-makedepends=(git cabal-install chrpath)
+makedepends=(git cabal-install chrpath ghc-static)
depends=(gmp libffi)
source=(git+https://github.com/Peaker/git-mediate)
md5sums=(SKIP)
@@ -27,8 +27,14 @@ build() {
cd "$_gitname"
cabal update
cabal sandbox init
- cabal install --dependencies-only
- cabal configure --prefix /usr --disable-executable-dynamic
+ local _pkgdb=(/usr/lib/ghc-*/static-package.conf.d)
+ cabal install \
+ --dependencies-only \
+ --ghc-pkg-option=--global-package-db="$_pkgdb"
+ cabal configure \
+ --prefix /usr \
+ --disable-executable-dynamic \
+ --ghc-pkg-option=--global-package-db="$_pkgdb"
cabal build
}