summaryrefslogtreecommitdiff
path: root/archive
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-04-15 11:10:16 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-04-15 11:10:16 -0700
commita282335862dddca2e3eb510189c6cea1323dac94 (patch)
tree5cab346233a4391b157551f2d36d411e484354b4 /archive
parent8974c294ac273e2ab11e6182dc098bbbccbb6274 (diff)
downloaddotfiles-a282335862dddca2e3eb510189c6cea1323dac94.tar.gz
drop use of mkcabalc
For Haskell dev I am likely to use stack or manually create a sandbox.
Diffstat (limited to 'archive')
-rwxr-xr-xarchive/bin/mkcabalc41
1 files changed, 41 insertions, 0 deletions
diff --git a/archive/bin/mkcabalc b/archive/bin/mkcabalc
new file mode 100755
index 00000000..17fae327
--- /dev/null
+++ b/archive/bin/mkcabalc
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# Create my cabal config file, which needs to be different for root
+# and must contain absolute path to home directory (AFAICT).
+
+if [ "$USER" = "root" ]; then
+ sandbox="False"
+else
+ sandbox="True"
+fi
+
+mkdir -p $HOME/.cabal
+cat > $HOME/.cabal/config << EOF
+-- Cabal library version: 1.22.0.0
+-- cabal-install version: 1.22.0.0
+
+-- DO NOT EDIT. This file was automatically generated by
+-- ~/bin/mkcabalc AND WILL BE OVERWRITTEN on the next invocation.
+
+require-sandbox: $sandbox
+remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
+remote-repo-cache: $HOME/.cabal/packages
+world-file: $HOME/.cabal/world
+extra-prog-path: $HOME/.cabal/bin
+build-summary: $HOME/.cabal/logs/build.log
+remote-build-reporting: anonymous
+jobs: \$ncpus
+
+-- The following line is suggested by
+-- <http://www.vex.net/~trebla/haskell/cabal-cabal.xhtml>.
+-- Unfortunately a lot of Debian ghc-* and libghc-* packages don't
+-- have profiling information and you have to install the -prof
+-- version. This is too much to do for now. Maybe I'll kick myself
+-- later when I want profiling.
+
+-- library-profiling: True
+
+documentation: True
+haddock
+ hyperlink-source: True
+EOF