diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+0.5.2.0
+---
+* MacOS support
+
 0.5.0.0
 ---
 * Remove dependency on linear
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 # NanoVG Haskell bindings
 
+[![Build Status](https://travis-ci.org/cocreature/nanovg-hs.svg?branch=master)](https://travis-ci.org/cocreature/nanovg-hs)
+
 Currently only the GL3 backend is supported.
 
 A large part of the example bundled with
diff --git a/cbits/glew.c b/cbits/glew.c
--- a/cbits/glew.c
+++ b/cbits/glew.c
@@ -1,3 +1,4 @@
+#if !defined(darwin_HOST_OS)
 #include <GL/glew.h>
 #include <stdio.h>
 #include "nanovg.h"
@@ -10,3 +11,9 @@
         /* return -1; */
     }
 }
+
+#else
+void initGlew() {
+    // This space intentionally left blank.
+}
+#endif
diff --git a/cbits/nanovg_gl.c b/cbits/nanovg_gl.c
--- a/cbits/nanovg_gl.c
+++ b/cbits/nanovg_gl.c
@@ -1,5 +1,9 @@
 #define NANOVG_GL3_IMPLEMENTATION
 // This is used to link the implementation
+#if defined(darwin_HOST_OS)
+#include <OpenGL/gl3.h>
+#else
 #include "GL/glew.h"
+#endif
 #include "nanovg.h"
 #include "nanovg_gl.h"
diff --git a/example/Example.hs b/example/Example.hs
--- a/example/Example.hs
+++ b/example/Example.hs
@@ -2,6 +2,7 @@
 {-# LANGUAGE OverloadedStrings #-}
 module Main where
 
+import           Control.Applicative (pure)
 import           Control.Monad
 import           Control.Monad.Loops
 import           Control.Monad.Trans.Maybe
diff --git a/nanovg.cabal b/nanovg.cabal
--- a/nanovg.cabal
+++ b/nanovg.cabal
@@ -1,5 +1,5 @@
 name:                nanovg
-version:             0.5.1.0
+version:             0.5.2.0
 synopsis:            Haskell bindings for nanovg
 description:         Raw bindings to the OpenGL vector graphics library NanoVG
 homepage:            https://github.com/cocreature/nanovg-hs
@@ -62,8 +62,12 @@
                        cbits/nanovg_gl.c
   cc-options:          -DNDEBUG
   ghc-options:         -Wall
-  extra-libraries:     GLU, GL, m, GLEW
-  ghc-options:         -pgml gcc "-optl-Wl,--whole-archive" "-optl-Wl,-lGLEW" "-optl-Wl,--no-whole-archive"
+  if os(osx)
+    frameworks:          OpenGL
+    cc-options:          -Ddarwin_HOST_OS
+  else
+    extra-libraries:     GLU, GL, m, GLEW
+    ghc-options:         -pgml gcc "-optl-Wl,--whole-archive" "-optl-Wl,-lGLEW" "-optl-Wl,--no-whole-archive"
   build-tools:         c2hs
 
 executable example00
@@ -83,6 +87,8 @@
     buildable:        False
   default-language:   Haskell2010
   c-sources:          cbits/glew.c
+  if os(osx)
+    cc-options:          -Ddarwin_HOST_OS
 
 test-suite nanovg-test
   type:               exitcode-stdio-1.0
diff --git a/src/NanoVG.hs b/src/NanoVG.hs
--- a/src/NanoVG.hs
+++ b/src/NanoVG.hs
@@ -127,6 +127,7 @@
   , M23
   ) where
 
+import           Data.Functor ((<$>))
 import           Control.Monad
 import qualified Data.Text as T
 import           Data.Text.Foreign
diff --git a/src/NanoVG/Internal/Color.chs b/src/NanoVG/Internal/Color.chs
--- a/src/NanoVG/Internal/Color.chs
+++ b/src/NanoVG/Internal/Color.chs
@@ -1,5 +1,6 @@
 module NanoVG.Internal.Color where
 
+import Control.Applicative (pure)
 import Foreign.C.Types
 import Foreign.Marshal.Alloc
 import Foreign.Ptr
diff --git a/src/NanoVG/Internal/FixedVector.hs b/src/NanoVG/Internal/FixedVector.hs
--- a/src/NanoVG/Internal/FixedVector.hs
+++ b/src/NanoVG/Internal/FixedVector.hs
@@ -1,6 +1,9 @@
 {-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
 module NanoVG.Internal.FixedVector where
 
+import Data.Foldable (Foldable)
+import Data.Traversable (Traversable)
+
 -- | Vector of 2 strict elements
 data V2 a =
   V2 !a
diff --git a/src/NanoVG/Internal/GL3.chs b/src/NanoVG/Internal/GL3.chs
--- a/src/NanoVG/Internal/GL3.chs
+++ b/src/NanoVG/Internal/GL3.chs
@@ -11,7 +11,11 @@
 -- For now only the GL3 backend is supported
 #define NANOVG_GL3
 -- We need to include this to define GLuint
+#if defined(darwin_HOST_OS)
+#include <OpenGL/gl3.h>
+#else
 #include "GL/glew.h"
+#endif
 #include "nanovg.h"
 #include "nanovg_gl.h"
 
diff --git a/src/NanoVG/Internal/Paint.chs b/src/NanoVG/Internal/Paint.chs
--- a/src/NanoVG/Internal/Paint.chs
+++ b/src/NanoVG/Internal/Paint.chs
@@ -1,6 +1,7 @@
 {-# LANGUAGE RecordWildCards #-}
 module NanoVG.Internal.Paint where
 
+import Control.Applicative (pure)
 import Foreign.C.Types
 import Foreign.Marshal.Alloc
 import Foreign.Marshal.Utils
diff --git a/src/NanoVG/Internal/Text.chs b/src/NanoVG/Internal/Text.chs
--- a/src/NanoVG/Internal/Text.chs
+++ b/src/NanoVG/Internal/Text.chs
@@ -2,6 +2,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 module NanoVG.Internal.Text where
 
+import           Control.Applicative (pure)
 import           Data.ByteString hiding (null)
 import qualified Data.Set as S
 import qualified Data.Text as T
diff --git a/src/NanoVG/Internal/Transformation.chs b/src/NanoVG/Internal/Transformation.chs
--- a/src/NanoVG/Internal/Transformation.chs
+++ b/src/NanoVG/Internal/Transformation.chs
@@ -1,6 +1,7 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 module NanoVG.Internal.Transformation where
 
+import Control.Applicative (pure)
 import Foreign.C.Types
 import Foreign.Marshal.Alloc
 import Foreign.Marshal.Utils
diff --git a/test/Contexts.hs b/test/Contexts.hs
--- a/test/Contexts.hs
+++ b/test/Contexts.hs
@@ -3,11 +3,12 @@
 {-# LANGUAGE TemplateHaskell #-}
 module Contexts where
 
-import NanoVG
-import           Language.C.Inline.HaskellIdentifier
-import qualified Language.C.Inline.Context as C
 import qualified Data.Map as M
+import           Data.Monoid
+import qualified Language.C.Inline.Context as C
+import           Language.C.Inline.HaskellIdentifier
 import qualified Language.C.Types as C
+import           NanoVG
 
 nanoVGCtx :: C.Context
 nanoVGCtx = mempty { C.ctxTypesTable = M.fromList [(C.TypeName "NVGcolor",[t|Color|])
diff --git a/test/NanoVGSpec.hs b/test/NanoVGSpec.hs
--- a/test/NanoVGSpec.hs
+++ b/test/NanoVGSpec.hs
@@ -3,20 +3,21 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 module NanoVGSpec where
 
-import Control.Monad
+import           Contexts
+import           Control.Applicative
+import           Control.Monad
+import qualified Data.Map as M
+import           Data.Monoid
+import           Foreign.C.Types
+import           Foreign.Marshal.Alloc
+import           Foreign.Ptr
+import           Foreign.Storable
 import qualified Language.C.Inline as C
 import qualified Language.C.Inline.Context as C
-import Contexts
-import Data.Monoid
 import qualified Language.C.Types as C
-import qualified Data.Map as M
-import Foreign.Marshal.Alloc
-import Foreign.Ptr
-import Foreign.C.Types
-import Foreign.Storable
-import Test.Hspec
-import NanoVG
-import Test.QuickCheck
+import           NanoVG
+import           Test.Hspec
+import           Test.QuickCheck
 
 C.context (C.baseCtx <> nanoVGCtx)
 C.include "nanovg.h"
diff --git a/test/Spec.hs b/test/Spec.hs
--- a/test/Spec.hs
+++ b/test/Spec.hs
@@ -1,1 +1,7 @@
-{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
+module Main where
+
+import Test.Hspec
+import qualified NanoVGSpec as NanoVG
+
+main :: IO ()
+main = hspec NanoVG.spec
