use pinned package versions from cabal.config

This commit is contained in:
Joey Hess 2014-10-14 15:25:02 -04:00
parent 9fd3e657e3
commit 7a78d111fc

View file

@ -4,13 +4,10 @@
# #
# You should install ghc-android first. # You should install ghc-android first.
# #
# Note that the newest version of packages are installed. # The cabal.config is used to pin the haskell packages to the last
# It attempts to reuse patches for older versions, but # versions that have been gotten working. To update, delete the
# new versions of packages often break cross-compilation by adding TH, # cabal.config, run this script with an empty cabal and fix up the broken
# etc # patches, and then use cabal freeze to generate a new cabal.config.
#
# Future work: Convert to using the method used here:
# https://github.com/kaoskorobase/ghc-ios-cabal-scripts/
set -e set -e
@ -46,6 +43,9 @@ cabalinstall () {
patched () { patched () {
pkg=$1 pkg=$1
ver=$2 ver=$2
if [ -z "$ver" ]; then
ver="$(grep " $pkg " cabal.config | cut -d= -f 3 | sed 's/,$//')"
fi
if [ -z "$ver" ]; then if [ -z "$ver" ]; then
cabal unpack $pkg cabal unpack $pkg
else else