From 15b8169348a3f19bd51f988526f1288697dd5129 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 Oct 2014 15:25:02 -0400 Subject: use pinned package versions from cabal.config --- standalone/android/install-haskell-packages | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'standalone/android') diff --git a/standalone/android/install-haskell-packages b/standalone/android/install-haskell-packages index 166ef3b15..d9d494b0b 100755 --- a/standalone/android/install-haskell-packages +++ b/standalone/android/install-haskell-packages @@ -4,13 +4,10 @@ # # You should install ghc-android first. # -# Note that the newest version of packages are installed. -# It attempts to reuse patches for older versions, but -# new versions of packages often break cross-compilation by adding TH, -# etc -# -# Future work: Convert to using the method used here: -# https://github.com/kaoskorobase/ghc-ios-cabal-scripts/ +# The cabal.config is used to pin the haskell packages to the last +# versions that have been gotten working. To update, delete the +# cabal.config, run this script with an empty cabal and fix up the broken +# patches, and then use cabal freeze to generate a new cabal.config. set -e @@ -46,6 +43,9 @@ cabalinstall () { patched () { pkg=$1 ver=$2 + if [ -z "$ver" ]; then + ver="$(grep " $pkg " cabal.config | cut -d= -f 3 | sed 's/,$//')" + fi if [ -z "$ver" ]; then cabal unpack $pkg else -- cgit v1.2.3