diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -45,6 +45,8 @@
 -------
 
 ```
+0.5.12 Put dependency on alex >= 3.0.5 in the cabal file, thanks @peti
+
 0.5.11 Remove pre-generated Lexer.hs as it does not work will all
        versions of GHC. This means a current alex will have to be
        installed before this package can be installed.
diff --git a/language-javascript.cabal b/language-javascript.cabal
--- a/language-javascript.cabal
+++ b/language-javascript.cabal
@@ -1,5 +1,5 @@
 Name:                language-javascript
-Version:             0.5.11
+Version:             0.5.12
 Synopsis:            Parser for JavaScript
 Description:         Parses Javascript into an Abstract Syntax Tree (AST).  Initially intended as frontend to hjsmin.
                      .
@@ -37,7 +37,7 @@
                    , blaze-builder    >= 0.2     && < 1
                    , bytestring       >= 0.9.1   && < 1
                    , utf8-string      >= 0.3.7   && < 1
-  build-tools:       happy >= 1.18.5
+  build-tools:       happy >= 1.18.5, alex >= 3.0.5
   hs-source-dirs: src
   Exposed-modules:     Language.JavaScript.Parser
                        Language.JavaScript.Parser.Parser
@@ -76,4 +76,3 @@
 source-repository head
   type:     git
   location: git://github.com/alanz/language-javascript.git
-
