diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@
 Policy (PVP)](https://pvp.haskell.org)
 
 
+## [0.4.0.1] - 2018-03-12
+### Fixed
+  * Build fix for Cabal-2.2 (ghc-8.4)
+
 ## [0.4.0.0] - 2017-11-15
 ### Added
   * `getMathMode`
@@ -20,5 +24,6 @@
 * First version; replaces [bmsherman/cublas](https://github.com/bmsherman/cublas). Released on an unsuspecting world.
 
 
+[0.4.0.1]:          https://github.com/tmcdonell/cublas/compare/release/0.4.0.0...0.4.0.1
 [0.4.0.0]:          https://github.com/tmcdonell/cublas/compare/release/0.3.0.0...0.4.0.0
 
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,7 +1,10 @@
 Haskell FFI Bindings to cuBLAS
 ==============================
 
-[![Build status](https://travis-ci.org/tmcdonell/cublas.svg?branch=master)](https://travis-ci.org/tmcdonell/cublas)
+[![Travis build status](https://img.shields.io/travis/tmcdonell/cublas/master.svg?label=linux)](https://travis-ci.org/tmcdonell/cublas)
+[![AppVeyor build status](https://img.shields.io/appveyor/ci/tmcdonell/cublas/master.svg?label=windows)](https://ci.appveyor.com/project/tmcdonell/cublas)
+[![Stackage LTS](https://stackage.org/package/cublas/badge/lts)](https://stackage.org/lts/package/cublas)
+[![Stackage Nightly](https://stackage.org/package/cublas/badge/nightly)](https://stackage.org/nightly/package/cublas)
 [![Hackage](https://img.shields.io/hackage/v/cublas.svg)](https://hackage.haskell.org/package/cublas)
 
 The cuBLAS library is an implementation of BLAS (Basic Linear Algebra
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -6,7 +6,6 @@
 #endif
 
 import Distribution.PackageDescription
-import Distribution.PackageDescription.Parse
 import Distribution.Simple
 import Distribution.Simple.Command
 import Distribution.Simple.LocalBuildInfo
@@ -21,6 +20,11 @@
 import Distribution.PackageDescription.PrettyPrint
 import Distribution.Version
 #endif
+#if MIN_VERSION_Cabal(2,2,0)
+import Distribution.PackageDescription.Parsec
+#else
+import Distribution.PackageDescription.Parse
+#endif
 
 import Foreign.CUDA.Path
 import System.Directory
@@ -183,7 +187,7 @@
           notice verbosity $ printf "Provide a '%s' file to override this behaviour.\n" customBuildInfoFilePath
           readHookedBuildInfo verbosity generatedBuildInfoFilePath
         else
-          die $ printf "Unexpected failure. Neither the default %s nor custom %s exist.\n" generatedBuildInfoFilePath customBuildInfoFilePath
+          die' verbosity $ printf "Unexpected failure. Neither the default %s nor custom %s exist.\n" generatedBuildInfoFilePath customBuildInfoFilePath
 
 
 -- Replicate the default C2HS preprocessor hook here, and inject a value for
@@ -204,7 +208,7 @@
       { platformIndependent = False
       , runPreProcessor     = \(inBaseDir, inRelativeFile)
                                (outBaseDir, outRelativeFile) verbosity ->
-          rawSystemProgramConf verbosity c2hsProgram (withPrograms lbi) . filter (not . null) $
+          runDbProgram verbosity c2hsProgram (withPrograms lbi) . filter (not . null) $
             maybe [] words (lookup "x-extra-c2hs-options" (customFieldsBI bi))
             ++ ["--include=" ++ outBaseDir]
             ++ ["--cppopts=" ++ opt | opt <- getCppOptions bi lbi]
@@ -242,5 +246,10 @@
 #if MIN_VERSION_Cabal(1,25,0)
 versionBranch :: Version -> [Int]
 versionBranch = versionNumbers
+#endif
+
+#if !MIN_VERSION_Cabal(2,0,0)
+die' :: Verbosity -> String -> IO a
+die' _ = die
 #endif
 
diff --git a/cublas.cabal b/cublas.cabal
--- a/cublas.cabal
+++ b/cublas.cabal
@@ -1,5 +1,5 @@
 name:                   cublas
-version:                0.4.0.0
+version:                0.4.0.1
 synopsis:               FFI bindings to the CUDA BLAS library
 description:
     The cuBLAS library is an implementation of BLAS (Basic Linear Algebra
@@ -18,7 +18,7 @@
 maintainer:             Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
 copyright:              Copyright (c) [2012..2017]. Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>, Ben Sherman <benmsherman@gmail.com>
 category:               Foreign
-cabal-version:          >=1.8
+cabal-version:          >=1.24
 
 build-type:             Custom
 extra-tmp-files:        cublas.buildinfo.generated
@@ -30,7 +30,7 @@
 custom-setup
   setup-depends:
       base              >= 4.6
-    , Cabal             >= 1.22
+    , Cabal             >= 1.24
     , cuda              >= 0.8
     , directory         >= 1.0
     , filepath          >= 1.0
@@ -52,6 +52,9 @@
       Foreign.CUDA.BLAS.Internal.C2HS
       Foreign.CUDA.BLAS.Internal.Types
 
+  default-language:
+      Haskell2010
+
   build-depends:
       base                              == 4.*
     , cuda                              >= 0.8
@@ -76,6 +79,6 @@
 source-repository this
     type:               git
     location:           https://github.com/tmcdonell/cublas
-    tag:                0.4.0.0
+    tag:                0.4.0.1
 
 -- vim: nospell
