Skip to content

Commit

Permalink
cabal-install: update to 3.10.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAdityaAlok committed Jul 26, 2023
1 parent da273b7 commit 6453dd9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 29 deletions.
21 changes: 0 additions & 21 deletions scripts/cabal-install/correct-host-triplet.patch

This file was deleted.

17 changes: 17 additions & 0 deletions scripts/cabal-install/fix-cabal-osStr.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# NOTE: Haskell/Hardian(it's build system) always refers to Android as "linux_android" but cabal
# ambiguously refer to it as simply "android".
# This causes problem with libraries:
# It installs in "$arch-android-ghc$ghc_version" instead of "$arch-linux_android-ghc$ghc_version"
# where Hadrian tries to find it.

--- a/Cabal/src/Distribution/Simple/PreProcess.hs 2023-05-23 08:17:29.000000000 +0530
+++ b/Cabal/src/Distribution/Simple/PreProcess.hs 2023-07-26 16:24:23.651999803 +0530
@@ -708,7 +708,7 @@
IRIX -> ["irix"]
HaLVM -> []
IOS -> ["ios"]
- Android -> ["android"]
+ Android -> ["linux_android"]
Ghcjs -> ["ghcjs"]
Wasi -> ["wasi"]
Hurd -> ["hurd"]
13 changes: 5 additions & 8 deletions scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ mkdir -p "${BINDIR}"
build_cabal() {
setup_ghc
setup_cabal
local version=3.8.1.0
local version=3.10.1.0
local srcurl="https://github.com/haskell/cabal/archive/Cabal-v${version}.tar.gz"
local sha256=d4eff9c1fcc5212360afac8d97da83b3aff79365490a449e9c47d3988c14b6bc
local sha256=710f9b14ad2851cb6192666599c37eff23b578cf619a1040bdf0b3f2c44df8b5

local tar_tmpfile && tar_tmpfile="$(mktemp -t cabal.XXXXXX)"
download "${srcurl}" "${tar_tmpfile}" "${sha256}"
Expand All @@ -29,10 +29,8 @@ build_cabal() {
tar -xf "${tar_tmpfile}" -C "${build_dir}" --strip-components=1

cd "${build_dir}"
(
cd ./Cabal
patch -p1 <"${ROOT}"/cabal-install/correct-host-triplet.patch
)

patch -p1 <"${ROOT}"/cabal-install/fix-cabal-osStr.patch

mkdir -p "${build_dir}/bin"
cabal install cabal-install \
Expand All @@ -56,8 +54,7 @@ build_iserv_proxy() {
cd "$ROOT"/iserv-proxy
mkdir -p ./bin

cabal install iserv-proxy\
--project-file=cabal.project \
cabal install iserv-proxy --project-file=cabal.project \
--install-method=copy \
--installdir="$(realpath ./bin)" \
-flibrary -fproxy --constraint="libiserv +network" \
Expand Down

0 comments on commit 6453dd9

Please sign in to comment.