diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,12 +1,11 @@
 {-# LANGUAGE OverloadedStrings #-}
 
-import Distribution.Simple (defaultMainWithHooks)
-import Data.GI.CodeGen.CabalHooks (simpleHaskellGIHooks)
+import Data.GI.CodeGen.CabalHooks (setupHaskellGIBinding)
 
-main = defaultMainWithHooks (simpleHaskellGIHooks name version verbose
-                             overridesFile outputDir)
-    where name = "cairo"
-          version = "1.0"
-          verbose = False
-          overridesFile = Nothing
-          outputDir = Nothing
+main :: IO ()
+main = setupHaskellGIBinding name version verbose overridesFile outputDir
+  where name = "cairo"
+        version = "1.0"
+        overridesFile = Nothing
+        verbose = False
+        outputDir = Nothing
diff --git a/gi-cairo.cabal b/gi-cairo.cabal
--- a/gi-cairo.cabal
+++ b/gi-cairo.cabal
@@ -1,31 +1,29 @@
-name:               gi-cairo
-version:            1.0.2
-synopsis:           Cairo bindings
-description:        Bindings for Cairo, autogenerated by haskell-gi.
-homepage:           https://github.com/haskell-gi/haskell-gi
-license:            LGPL-2.1
-license-file:       LICENSE
-author:             Will Thompson, Iñaki García Etxebarria and Jonas Platte
-maintainer:         Iñaki García Etxebarria (garetxe@gmail.com)
-category:           Bindings
-build-type:         Custom
-cabal-version:      >= 1.24
+name:                 gi-cairo
+version:              1.0.3
+synopsis:             Cairo bindings
+description:          Bindings for Cairo, autogenerated by haskell-gi.
+homepage:             https://github.com/haskell-gi/haskell-gi
+license:              LGPL-2.1
+license-file:         LICENSE
+author:               Will Thompson, Iñaki García Etxebarria and Jonas Platte
+maintainer:           Iñaki García Etxebarria (garetxe@gmail.com)
+category:             Bindings
+build-type:           Custom
+cabal-version:        >= 1.22
 
-custom-setup
-  setup-depends: base >= 4.7,
-                 Cabal >= 1.24,
-                 haskell-gi >= 0.15
+extra-source-files: stack.yaml 
 
 library
-    default-language:   Haskell2010
-    default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts
-    other-extensions:   PatternSynonyms ViewPatterns
-    ghc-options:        -fno-warn-unused-imports -fno-warn-warnings-deprecations
+      default-language: Haskell2010
+      default-extensions: NoImplicitPrelude, ScopedTypeVariables, CPP, OverloadedStrings, NegativeLiterals, ConstraintKinds, TypeFamilies, MultiParamTypeClasses, KindSignatures, FlexibleInstances, UndecidableInstances, DataKinds, FlexibleContexts
+      other-extensions: PatternSynonyms, ViewPatterns
+      ghc-options: -fno-warn-unused-imports -fno-warn-warnings-deprecations
 
-    pkgconfig-depends:  cairo-gobject >= 1.0 && < 2
-    build-depends: base >= 4.7 && <5,
-        haskell-gi-base >= 0.15 && < 1,
-        bytestring >= 0.10,
-        containers >= 0.5,
-        text >= 1.0,
-        transformers >= 0.4
+      pkgconfig-depends: cairo-gobject >= 1.0 && < 2
+      build-depends: base >= 4.7 && <5,
+                     haskell-gi-base >= 0.17 && < 1,
+                     haskell-gi >= 0.17.3 && < 1,
+                     bytestring >= 0.10 && < 1,
+                     containers >= 0.5 && < 1,
+                     text >= 1.0 && < 2,
+                     transformers >= 0.4 && < 1
diff --git a/stack.yaml b/stack.yaml
new file mode 100644
--- /dev/null
+++ b/stack.yaml
@@ -0,0 +1,7 @@
+packages:
+- '.'
+extra-deps:
+- 'haskell-gi-0.17.3'
+explicit-setup-deps:
+  ! '*': true
+resolver: nightly-2016-05-21
