From ffa3d7160ead338a75f04167bc4931b8b55d608c Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Wed, 27 Dec 2017 20:21:37 -0800
Subject: [PATCH] Removed stack.pkg.yaml.

We only really need stack.yaml; we can put flag settings
for pandoc-citeproc there.

Also use ghc-8.0.2 in dockerized linux build.  This is
the only version available for alpine so far.
---
 linux/Dockerfile                   |  4 ++--
 macos/make_macos_package.sh        |  2 +-
 stack.pkg.yaml                     | 16 ----------------
 stack.yaml                         |  9 ++++++++-
 windows/make-windows-installer.bat |  2 +-
 5 files changed, 12 insertions(+), 21 deletions(-)
 delete mode 100644 stack.pkg.yaml

diff --git a/linux/Dockerfile b/linux/Dockerfile
index 3660aa4fc..ddba77826 100644
--- a/linux/Dockerfile
+++ b/linux/Dockerfile
@@ -14,7 +14,7 @@ RUN mkdir -p /usr/src/
 WORKDIR /usr/src/
 RUN git clone https://github.com/jgm/pandoc
 WORKDIR /usr/src/pandoc
-RUN stack install --stack-yaml stack.pkg.yaml --only-dependencies \
+RUN stack install --compiler 'ghc-8.0.2' --only-dependencies \
     --flag 'pandoc:static' \
     --flag 'pandoc:embed_data_files' \
     --flag 'pandoc-citeproc:static' \
@@ -24,7 +24,7 @@ RUN stack install --stack-yaml stack.pkg.yaml --only-dependencies \
     pandoc pandoc-citeproc
 CMD git pull && \
     git checkout -b work $TREE && \
-    stack install --stack-yaml stack.pkg.yaml \
+    stack install --compiler 'ghc-8.0.2' \
       --flag 'pandoc:static' \
       --flag 'pandoc:embed_data_files' \
       --flag 'pandoc-citeproc:static' \
diff --git a/macos/make_macos_package.sh b/macos/make_macos_package.sh
index 4b565b0de..85155c66c 100755
--- a/macos/make_macos_package.sh
+++ b/macos/make_macos_package.sh
@@ -27,7 +27,7 @@ stack setup
 
 echo Building pandoc...
 stack clean
-stack install --ghc-options="-O2" --stack-yaml=stack.pkg.yaml --local-bin-path $DEST/bin/ pandoc pandoc-citeproc
+stack install --ghc-options="-O2" --local-bin-path $DEST/bin/ pandoc pandoc-citeproc
 
 strip $DEST/bin/pandoc
 strip $DEST/bin/pandoc-citeproc
diff --git a/stack.pkg.yaml b/stack.pkg.yaml
deleted file mode 100644
index 450c7c3ae..000000000
--- a/stack.pkg.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-flags:
-  pandoc:
-    trypandoc: false
-    embed_data_files: true
-    old-locale: false
-    network-uri: true
-  pandoc-citeproc:
-    bibutils: true
-    embed_data_files: true
-    unicode_collation: false
-    test_citeproc: false
-    debug: false
-packages:
-- '.'
-extra-deps: []
-resolver: lts-10.1
diff --git a/stack.yaml b/stack.yaml
index e04468cfc..450c7c3ae 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,9 +1,16 @@
 flags:
   pandoc:
     trypandoc: false
-    embed_data_files: false
+    embed_data_files: true
     old-locale: false
     network-uri: true
+  pandoc-citeproc:
+    bibutils: true
+    embed_data_files: true
+    unicode_collation: false
+    test_citeproc: false
+    debug: false
 packages:
+- '.'
 extra-deps: []
 resolver: lts-10.1
diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat
index 15d97d9d2..a64af6621 100644
--- a/windows/make-windows-installer.bat
+++ b/windows/make-windows-installer.bat
@@ -1,5 +1,5 @@
 @echo off
-stack install --test --ghc-options="-O2" --stack-yaml=..\stack.pkg.yml
+stack install --test --ghc-options="-O2" --stack-yaml=..\stack.yaml
 if %errorlevel% neq 0 exit /b %errorlevel%
 for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
 %BINPATH%\pandoc.exe -s --toc ..\MANUAL.txt -o MANUAL.html