From 7b6273362abb1ba4dea8f6cd6e4d186c4397ffac Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 12 Feb 2017 19:59:47 +0100
Subject: [PATCH] pandoc.cabal: use cpphs if embed_data_files and darwin.

---
 pandoc.cabal | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pandoc.cabal b/pandoc.cabal
index 3f736884b..1b834365c 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -320,6 +320,9 @@ Library
      cpp-options:   -DEMBED_DATA_FILES
      Build-Tools:   hsb2hs >= 0.3.1
      other-modules: Text.Pandoc.Data
+     if os(darwin)
+        Build-Tools:   cpphs >= 1.19
+        ghc-options:   -pgmP cpphs -optP --cpp
   if os(windows)
     Cpp-options:      -D_WINDOWS
   Ghc-Options:   -Wall -fno-warn-unused-do-bind