stack: fix build (again)

Seems like we'll have to go through this kind of ordeal every time
stack needs to be rebuilt for some reason...
This commit is contained in:
q66 2020-03-25 03:44:49 +01:00
parent d1c7b4354f
commit 7366d05394

View file

@ -20,10 +20,26 @@ skip_extraction="cabal.config-${_stackage}"
nocross=yes
nopie_files="/usr/bin/stack"
_patch_exts() {
vsed -i '1s;^;{-# LANGUAGE DerivingStrategies #-}\n;' $1
vsed -i '1s;^;{-# LANGUAGE StandaloneDeriving #-}\n;' $1
}
post_extract() {
mv ../pantry-0.2.0.0 .
vsed -e 's/hackage-security/hackage-security <0.6.0.0/g' -i pantry-0.2.0.0/pantry.cabal
_patch_exts pantry-0.2.0.0/src/Pantry/Storage.hs
vsed -e 's/^- \./&\n- pantry-0.2.0.0/' -i stack.yaml
vsed -e 's/http-download >=0.1.0.0/& \&\& <0.2.0.0/g' -i stack.cabal
vsed -e 's/path >=0.6.1/& \&\& <0.7.0/g' -i stack.cabal
_patch_exts src/Stack/Storage/User.hs
_patch_exts src/Stack/Storage/Project.hs
vsed -i 's/parseRelFile (replaceExtension/parseRelFile (FilePath.replaceExtension/' \
src/Stack/Package.hs
}
do_build() {