summaryrefslogtreecommitdiff
path: root/standalone
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-14 15:25:02 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-14 15:25:02 -0400
commit15b8169348a3f19bd51f988526f1288697dd5129 (patch)
tree380ee3c809ecaca2941468c58c87165e29c0abae /standalone
parent6a5c2a6a5c0bfb287309b26e0b230bf66eebf5b6 (diff)
use pinned package versions from cabal.config
Diffstat (limited to 'standalone')
-rwxr-xr-xstandalone/android/install-haskell-packages14
1 files changed, 7 insertions, 7 deletions
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
@@ -47,6 +44,9 @@ 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
cabal unpack $pkg-$ver