diff options
author | tomsmeding <tom.smeding@gmail.com> | 2022-07-16 23:12:12 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2022-07-16 23:12:12 +0200 |
commit | 87b4e2b3585a9579d4e93d84a94992c5cec6e322 (patch) | |
tree | 27566324862a68d484e891bd391eba26bcce8335 /notes.txt | |
parent | 200440e8a437d1313e245d3728db6b69c4b03fb3 (diff) |
Diffstat (limited to 'notes.txt')
-rw-r--r-- | notes.txt | 33 |
1 files changed, 3 insertions, 30 deletions
@@ -8,41 +8,14 @@ apt install cabal-install I assume you're currently in $HOME/ghc-cabal-build. Check using `dpkg -L ghc-libs-static' which libraries have static libs available -Copy the .conf files for just those libraries from /data/data/com.termux/files/usr/lib/ghc-8.10.7/package.conf.d/ into a new directory, ghc-boot-pkgdb +Copy the .conf files for just those libraries from /data/data/com.termux/files/usr/lib/ghc-8.10.7/package.conf.d/ into a new directory in the root of this repository, called ghc-boot-pkgdb In ghc-boot-pkgdb, run `ghc-pkg recache` -cat >ghc-shim.sh <<EOF -#!/usr/bin/env bash -if [[ $# = 1 && $1 = --print-global-package-db ]]; then - echo /data/data/com.termux/files/home/ghc-cabal-build/ghc-boot-pkgdb -else - #echo >/dev/tty "!! ghc $*" - ghc "$@" -fi -EOF - -cat >ghc-pkg-shim.sh <<EOF -#!/usr/bin/env bash -#echo >/dev/tty "!! ghc-pkg $*" -args=() -for arg; do - if [[ $arg != --global ]]; then - args[${#args[@]}]="$arg" - fi -done -ghc-pkg --package-db /data/data/com.termux/files/home/ghc-cabal-build/ghc-boot-pkgdb "${args[@]}" -EOF - -Make a new directory 'cbl', and in that directory: +In the directory 'cbl': cabal get resolv cabal get cabal-install -cat >cabal.project <<EOF -packages: - resolv-0.1.2.0/ - cabal-install-3.6.2.0/ -EOF cd resolv-0.1.2.0 patch -p1 <<EOF # this is https://raw.githubusercontent.com/termux/termux-packages/master/packages/haskell-resolv/hs_resolv.patch --- resolv-0.1.2.0/cbits/hs_resolv.h 2001-09-09 07:16:40.000000000 +0530 @@ -71,7 +44,7 @@ patch -p1 <<EOF # this is https://raw.githubusercontent.com/termux/termux-packa inline static int EOF cd .. -cabal install -w ../ghc-shim.sh --with-hc-pkg=../ghc-pkg-shim.sh cabal-install +cabal install -w "$PWD"/../ghc-shim.sh --with-hc-pkg="$PWD"/../ghc-pkg-shim.sh cabal-install # Remove the extraneous dynamic libs that were installed, so that our system is stable again apt remove cabal-install |