Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
phlummox committed Jul 25, 2018
0 parents commit aa8abce
Show file tree
Hide file tree
Showing 5 changed files with 3,477 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.*.swp
96 changes: 96 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

FROM ubuntu:xenial

RUN apt-get clean && \
apt-get update && \
apt-get install -y \
aptitude \
bzip2 \
ca-certificates \
curl \
git \
less \
make \
mercurial \
python-software-properties \
screen \
software-properties-common \
sudo \
time \
vim \
wget \
xterm

RUN : "build tools" && \
apt-get update && \
apt-get install -y \
binutils \
bsdmainutils \
build-essential \
coreutils \
findutils \
gawk \
libbz2-dev \
libgmp-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline6-dev \
libreadline-dev \
libyaml-dev \
locales \
netcat \
net-tools \
nodejs-legacy \
patchutils \
tar \
zlib1g-dev


# Set the locale - was (and may still be ) necessary for ghcjs-boot to work
# Got this originally here: # http://askubuntu.com/questions/581458/how-to-configure-locales-to-unicode-in-a-docker-ubuntu-14-04-container
#
# 2015-10-25 It seems like ghcjs-boot works without this now but when I
# removed it, vim starting emitting error messages when using plugins
# pathogen and vim2hs together.
#
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN : "adding .local/bin" && \
mkdir -p ~/.local/bin

RUN : "install stack" && \
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

ENV PATH="/root/.local/bin:${PATH}"

RUN \
stack setup

RUN \
stack --resolver=lts-6.2 setup && \
stack --resolver=lts-6.2 install cabal-install alex happy hscolour hsc2hs

ENV CARNAP_HM=/opt/carnap

RUN \
mkdir -p ${CARNAP_HM} && \
cd ${CARNAP_HM} && \
git clone https://github.com/phlummox/Carnap.git .

WORKDIR ${CARNAP_HM}

RUN \
git checkout 13bc8c1030a6e0ab546ef36bd54b24a99472c3fc

COPY patches/* ./

RUN \
for patch in server-sqlite-fixes Carnap-fixes semigroupoids; do \
git apply $patch; \
done



103 changes: 103 additions & 0 deletions patches/Carnap-fixes
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
diff --git a/Carnap/Carnap.cabal b/Carnap/Carnap.cabal
--- a/Carnap/Carnap.cabal
+++ b/Carnap/Carnap.cabal
@@ -33,11 +33,17 @@
, Carnap.Languages.PureFirstOrder.Syntax
, Carnap.Languages.PureFirstOrder.Parser

- build-depends: base >= 4.7
- , lens >= 4.12
- , mtl >= 2.2.1
- , containers >= 0.5.6.2
- , parsec >= 3.1.9
+-- works with base-4.8.2 / stack lts-6
+-- depends on Data.Typeable from that version
+-- doesn't seem to work with lts-7
+-- lts-6 has base-4.8.2.0, ghc 7.10.3
+-- lts-7 has base-4.9.0.0, ghc 8.0.1
+
+ build-depends: base
+ , lens
+ , mtl
+ , containers
+ , parsec
default-language: Haskell2010


diff --git a/Makefile b/Makefile
new file mode 100644
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,5 @@
+
+.PHONY: clean
+
+clean:
+ -rm -rf `find -name .stack-work`
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+
+ghcjs problems:
+
+- https://github.com/commercialhaskell/stack/issues/2364
+- https://github.com/commercialhaskell/stack/issues/1632
+
+
+
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -5,14 +5,45 @@
- Carnap/
- Carnap-Server/
- Carnap-GHCJS/
+- ./semigroupoids-5.0.1
resolver: lts-6.2

+docker:
+ enable: true
+ repo: "fpco/stack-build"
+ persist: true
+ container-name: carnap-build-cntnr

-# #Uncomment this and run stack setup to install ghcjs; you can uncomment to
-# #build the Carnap-Web with ghcjs, by running `stack build Carnap-Web`. To
-# #build the Carnap-Web components without altering this file, use
-# #`stack build --compiler ghcjs-0.2.0.20160414_ghc-7.10.3`Carnap-Web
-#
+#Uncomment this and run stack setup to install ghcjs; you can uncomment to
+#build the Carnap-Web with ghcjs, by running `stack build Carnap-Web`. To
+#build the Carnap-Web components without altering this file, use
+#`stack build --compiler ghcjs-0.2.0.20160414_ghc-7.10.3`Carnap-Web
+
+# lts 6-30
+
+#compiler: ghcjs-0.2.0.9006030_ghc-7.10.3
+#compiler-check: match-exact
+#setup-info:
+# ghcjs:
+# source:
+# ghcjs-0.2.0.9006030_ghc-7.10.3:
+# url: http://ghcjs.tolysz.org/lts-6.30-9006030.tar.gz
+# sha1: 2371e2ffe9e8781808b7a04313e6a0065b64ee51
+
+
+# lts 6-4
+
+#compiler: ghcjs-0.2.0.9006004_ghc-7.10.3
+#compiler-check: match-exact
+#setup-info:
+# ghcjs:
+# source:
+# ghcjs-0.2.0.9006004_ghc-7.10.3:
+# url: http://tolysz.org/ghcjs/lts-6.4-9006004.tar.gz
+# sha1: 4a6f7474ccc5452e8394a3eee25d5d310b91846c
+
+# lts ??5.something?
+
# compiler: ghcjs-0.2.0.20160414_ghc-7.10.3
# compiler-check: match-exact
# setup-info:
Loading

0 comments on commit aa8abce

Please sign in to comment.