From 35a8d735cf66ac3a8867247b3f1a734af2add2ab Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 16 Jul 2022 23:00:09 +0200 Subject: Initial --- notes.txt | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 notes.txt (limited to 'notes.txt') diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..02a2bc4 --- /dev/null +++ b/notes.txt @@ -0,0 +1,76 @@ +# Getting a statically-linked cabal-install in termux + +Be sure to have lots of free RAM; building the Cabal library from source takes roughly 4.5GiB at peak. Force stop apps if needed. + +apt install ghc ghc-libs-static +apt install cabal-install + +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 direcrory, ghc-boot-pkgdb + +In ghc-boot-pkgdb, run `ghc-pkg recache` + +cat >ghc-shim.sh </dev/tty "!! ghc $*" + ghc "$@" +fi +EOF + +cat >ghc-pkg-shim.sh </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-boot-pkgdb "${args[@]}" +EOF + +Make a new directory 'cbl', and in that directory: + +cabal get resolv +cabal get cabal-install +cat >cabal.project <