From 7366d053944a1aaaad08ce063dd13c02f9063cf0 Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 25 Mar 2020 03:44:49 +0100 Subject: [PATCH] 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... --- srcpkgs/stack/template | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/srcpkgs/stack/template b/srcpkgs/stack/template index 27a7124c9bb..ef2b835da04 100644 --- a/srcpkgs/stack/template +++ b/srcpkgs/stack/template @@ -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() {