# 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 <