Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From ce93cd00f23d35f70a7bc2bae73153db2a627e5e Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Mon, 30 May 2016 19:22:23 +0200
Subject: [PATCH] cabal.exlib: fix excablaconf for Cabal-1.22.5.0
Change-Id: Ie6e83d89bb33f27df64732cb32fc097d5be38f24
---
exlibs/cabal.exlib | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/exlibs/cabal.exlib b/exlibs/cabal.exlib
index f7c1dd4..1f09a2b 100644
--- a/exlibs/cabal.exlib
+++ b/exlibs/cabal.exlib
@@ -57,6 +57,11 @@ excabalconf() {
local profile=
exparam -b has_lib && exparam -b has_profile && profile=$(option_enable profile library-profiling)
local tests=$(expecting_tests --enable-tests --disable-tests)
+
+ local additional_flags=()
+ if runhaskell Setup configure --help | grep -q -- --allow-newer ; then
+ additional_flags+=( --allow-newer )
+ fi
# set --with-compiler explicitly so the (un)registration scripts use the right ghc-pkg
exrunhaskell Setup configure \
--prefix=/usr/$(exhost --target) \
@@ -72,11 +77,11 @@ excabalconf() {
--with-strip=$(exhost --target)-strip \
--enable-shared \
--disable-executable-stripping \
- --allow-newer \
--global \
--verbose \
${profile} \
${tests} \
+ ${additional_flags} \
"${@}"
}
--
2.8.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.