diff --git a/cabal2nix.cabal b/cabal2nix.cabal
--- a/cabal2nix.cabal
+++ b/cabal2nix.cabal
@@ -1,5 +1,5 @@
 Name:                   cabal2nix
-Version:                1.51
+Version:                1.52
 Copyright:              Peter Simons, Andres Loeh
 License:                BSD3
 License-File:           LICENSE
@@ -10,7 +10,7 @@
 Synopsis:               Convert Cabal files into Nix build instructions
 Cabal-Version:          >= 1.8
 Build-Type:             Custom
-Tested-With:            GHC >= 6.12.3 && <= 7.6.2
+Tested-With:            GHC >= 6.12.3 && <= 7.6.3
 Data-files:             README.md
 Description:
   The @cabal2nix@ utility converts Cabal files into Nix build instructions. The
@@ -34,8 +34,8 @@
   .
   The only required argument is the path to the cabal file. For example:
   .
-  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.51/cabal2nix.cabal
-  > cabal2nix cabal://cabal2nix-1.51
+  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.52/cabal2nix.cabal
+  > cabal2nix cabal://cabal2nix-1.52
   .
   If the @--sha256@ option has not been specified, cabal2nix calls
   @nix-prefetch-url@ to determine the hash automatically. This causes
diff --git a/src/Cabal2Nix/Name.hs b/src/Cabal2Nix/Name.hs
--- a/src/Cabal2Nix/Name.hs
+++ b/src/Cabal2Nix/Name.hs
@@ -61,6 +61,7 @@
 libNixName "xml2"               = return "libxml2"
 libNixName "Xrandr"             = return "libXrandr"
 libNixName "Xss"                = return "libXScrnSaver"
+libNixName "Xtst"               = return "libXtst"
 libNixName "zmq"                = return "zeromq"
 libNixName "z"                  = return "zlib"
 libNixName x                    = return x
diff --git a/src/Cabal2Nix/PostProcess.hs b/src/Cabal2Nix/PostProcess.hs
--- a/src/Cabal2Nix/PostProcess.hs
+++ b/src/Cabal2Nix/PostProcess.hs
@@ -27,6 +27,7 @@
   | pname == "haskeline"        = deriv { buildDepends = "utf8String":buildDepends }
   | pname == "haskell-src"      = deriv { buildTools = "happy":buildTools }
   | pname == "haskell-src-meta" = deriv { buildDepends = "uniplate":buildDepends }
+  | pname == "hflags"           = deriv { metaSection = metaSection { license = Unknown (Just "Apache-2.0") } }
   | pname == "highlighting-kate"= highlightingKatePostProcessing deriv
   | pname == "hmatrix"          = deriv { extraLibs = "gsl":"liblapack":"blas":extraLibs }
   | pname == "hspec"            = deriv { doCheck = False }
diff --git a/src/Hackage4Nix.hs b/src/Hackage4Nix.hs
--- a/src/Hackage4Nix.hs
+++ b/src/Hackage4Nix.hs
@@ -5,7 +5,6 @@
 import Control.Exception ( bracket )
 import Control.Monad.RWS
 import Data.List
-import Data.Maybe
 import qualified Data.Set as Set
 import Data.Version
 import qualified Distribution.Hackage.DB as DB
@@ -71,7 +70,7 @@
     (False,_)    -> io (readDirectory dirOrFile) >>= mapM_ (discoverNixFiles yield . (dirOrFile </>))
 
 regenerateDerivation :: Derivation -> String -> Bool
-regenerateDerivation deriv buf = not (buf =~ "(pre|post)Configure|(pre|post)Install|patchPhase|patches")
+regenerateDerivation _ buf = not (buf =~ "(pre|post)Configure|(pre|post)Install|patchPhase|patches")
 
 parseNixFile :: FilePath -> String -> Hackage4Nix (Maybe Pkg)
 parseNixFile path buf
