aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2018-04-28 13:31:33 -0700
committerGravatar Benjamin Barenblat <bbaren@google.com>2018-04-28 13:31:33 -0700
commit4718b5c523e1beccc2baee2e1ee3c991a0dedd55 (patch)
tree31951c140beee29e4e37e3f9d964ab3b08489fbb /Setup.hs
parent9093457e1f4bb437eb73c8cf1bcbb9eb342735e9 (diff)
Switch to c2hs
Let the computer figure out its own types for most foreign imports. Continue using the vanilla FFI for finalizers, though, as that’s the easiest way to deal with function pointers. Reuse the build hook from gtk2hs-buildtools to work around Cabal’s inability to topologically sort .chs dependencies (https://github.com/haskell/cabal/issues/1906).
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Setup.hs b/Setup.hs
index 381605f..5b0c850 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -23,6 +23,7 @@ import qualified Distribution.Simple.LocalBuildInfo
as LocalBuildInfo
import qualified Distribution.Simple.Setup as Setup
import qualified Distribution.Simple.Utils as Utils
+import qualified Gtk2HsSetup
import System.Directory (getCurrentDirectory)
import System.FilePath ((</>))
@@ -42,6 +43,7 @@ main =
\info flags -> do
buildinfo <- Simple.confHook h info flags
boringsslUpdateExtraLibDirs buildinfo
+ , Simple.buildHook = Simple.buildHook Gtk2HsSetup.gtk2hsUserHooks
}
boringsslDir = "third_party" </> "boringssl"