diff --git a/cabal2nix.cabal b/cabal2nix.cabal
--- a/cabal2nix.cabal
+++ b/cabal2nix.cabal
@@ -1,5 +1,5 @@
 name:           cabal2nix
-version:        2.8.1
+version:        2.8.2
 synopsis:       Convert Cabal files into Nix build instructions.
 category:       Distribution, Nix
 stability:      stable
@@ -83,7 +83,9 @@
   > nix-env -i cabal2nix
 
 extra-source-files:
-    README.md
+  README.md
+  test/golden-test-cases/*.cabal
+  test/golden-test-cases/*.nix.golden
 
 source-repository head
   type: git
@@ -107,7 +109,7 @@
     , filepath
     , hackage-db >2
     , hopenssl >=2
-    , hpack == 0.22.*
+    , hpack >= 0.26
     , language-nix
     , lens
     , optparse-applicative
@@ -173,3 +175,19 @@
       Paths_cabal2nix
       HackageGit
   default-language: Haskell2010
+
+test-suite regression-test
+  type:                 exitcode-stdio-1.0
+  main-is:              Main.hs
+  hs-source-dirs:       test
+  build-depends:        base
+                      , Cabal > 2
+                      , cabal2nix
+                      , filepath
+                      , language-nix
+                      , lens
+                      , pretty
+                      , tasty
+                      , tasty-golden
+  ghc-options:          -Wall
+  default-language:     Haskell2010
diff --git a/hackage2nix/HackageGit.hs b/hackage2nix/HackageGit.hs
--- a/hackage2nix/HackageGit.hs
+++ b/hackage2nix/HackageGit.hs
@@ -1,7 +1,11 @@
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE TemplateHaskell #-}
 
-module HackageGit where
+module HackageGit
+  ( Hackage, readHackage, readPackage, readPackageMeta
+  , SHA256Hash, hashes
+  )
+  where
 
 import Control.Lens hiding ( (<.>) )
 import Control.Monad
@@ -54,8 +58,6 @@
 
 declareLenses [d|
   data Meta = Meta { hashes :: Map String String
-                   , locations :: [String]
-                   , pkgsize :: Int
                    }
     deriving (Show)
   |]
@@ -63,8 +65,6 @@
 instance FromJSON Meta where
   parseJSON (Object v) = Meta
                          <$> v .: "package-hashes"
-                         <*> v .: "package-locations"
-                         <*> v .: "package-size"
   parseJSON o          = fail ("invalid Cabal metadata: " ++ show o)
 
 readPackageMeta :: FilePath -> PackageIdentifier -> IO Meta
diff --git a/src/Distribution/Nixpkgs/Haskell/BuildInfo.hs b/src/Distribution/Nixpkgs/Haskell/BuildInfo.hs
--- a/src/Distribution/Nixpkgs/Haskell/BuildInfo.hs
+++ b/src/Distribution/Nixpkgs/Haskell/BuildInfo.hs
@@ -11,11 +11,12 @@
 
 import Control.DeepSeq
 import Control.Lens
+import Data.Semigroup
 import Data.Set ( Set )
 import Data.Set.Lens
 import GHC.Generics ( Generic )
 import Language.Nix
-import Language.Nix.PrettyPrinting
+import Language.Nix.PrettyPrinting hiding ( (<>) )
 
 data BuildInfo = BuildInfo
   { _haskell   :: Set Binding
@@ -30,9 +31,13 @@
 instance Each BuildInfo BuildInfo (Set Binding) (Set Binding) where
   each f (BuildInfo a b c d) = BuildInfo <$> f a <*> f b <*> f c <*> f d
 
+instance Semigroup BuildInfo where
+  BuildInfo w1 x1 y1 z1 <> BuildInfo w2 x2 y2 z2 =
+    BuildInfo (w1 <> w2) (x1 <> x2) (y1 <> y2) (z1 <> z2)
+
 instance Monoid BuildInfo where
   mempty = BuildInfo mempty mempty mempty mempty
-  BuildInfo w1 x1 y1 z1 `mappend` BuildInfo w2 x2 y2 z2 = BuildInfo (w1 `mappend` w2) (x1 `mappend` x2) (y1 `mappend` y2) (z1 `mappend` z2)
+  mappend = (<>)
 
 instance NFData BuildInfo
 
diff --git a/src/Distribution/Nixpkgs/Haskell/FromCabal.hs b/src/Distribution/Nixpkgs/Haskell/FromCabal.hs
--- a/src/Distribution/Nixpkgs/Haskell/FromCabal.hs
+++ b/src/Distribution/Nixpkgs/Haskell/FromCabal.hs
@@ -18,6 +18,7 @@
 import Distribution.Nixpkgs.Haskell.FromCabal.Name
 import Distribution.Nixpkgs.Haskell.FromCabal.Normalize
 import Distribution.Nixpkgs.Haskell.FromCabal.PostProcess (postProcess)
+import qualified Distribution.Nixpkgs.License as Nix
 import qualified Distribution.Nixpkgs.Meta as Nix
 import Distribution.Package
 import Distribution.PackageDescription
@@ -104,14 +105,17 @@
     & metaSection .~ ( Nix.nullMeta
                      & Nix.homepage .~ homepage
                      & Nix.description .~ synopsis
-                     & Nix.license .~ fromCabalLicense license
+                     & Nix.license .~ nixLicense
                      & Nix.platforms .~ Nix.allKnownPlatforms
-                     & Nix.hydraPlatforms .~ Nix.allKnownPlatforms
+                     & Nix.hydraPlatforms .~ (if nixLicense == Nix.Known "stdenv.lib.licenses.unfree" then Set.empty else Nix.allKnownPlatforms)
                      & Nix.maintainers .~ mempty
                      & Nix.broken .~ not (null missingDeps)
                      )
   where
     xrev = maybe 0 read (lookup "x-revision" customFieldsPD)
+
+    nixLicense :: Nix.License
+    nixLicense = fromCabalLicense license
 
     resolveInHackage :: Identifier -> Binding
     resolveInHackage i | (i^.ident) `elem` [ unPackageName n | (Dependency n _) <- missingDeps ] = bindNull i
diff --git a/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs b/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs
--- a/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs
+++ b/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs
@@ -66,7 +66,6 @@
   , ("git", set doCheck False)          -- https://github.com/vincenthz/hit/issues/33
   , ("gi-webkit", webkitgtk24xHook)   -- https://github.com/haskell-gi/haskell-gi/issues/36
   , ("GlomeVec", set (libraryDepends . pkgconfig . contains (bind "self.llvmPackages.llvm")) True)
-  , ("goatee-gtk", over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os /= OSX)))
   , ("gtk3", gtk3Hook)
   , ("haddock", haddockHook) -- https://github.com/haskell/haddock/issues/511
   , ("hakyll", set (testDepends . tool . contains (pkg "utillinux")) True) -- test suite depends on "rev"
@@ -89,6 +88,7 @@
   , ("include-file <= 0.1.0.2", set (libraryDepends . haskell . contains (bind "self.random")) True) -- https://github.com/Daniel-Diaz/include-file/issues/1
   , ("js-jquery", set doCheck False)            -- attempts to access the network
   , ("libconfig", over (libraryDepends . system) (replace "config = null" (pkg "libconfig")))
+  , ("libxml", set (configureFlags . contains "--extra-include-dir=${libxml2.dev}/include/libxml2") True)
   , ("liquid-fixpoint", set (executableDepends . system . contains (pkg "ocaml")) True . set (testDepends . system . contains (pkg "z3")) True . set (testDepends . system . contains (pkg "nettools")) True . set (testDepends . system . contains (pkg "git")) True . set doCheck False)
   , ("liquidhaskell", set (testDepends . system . contains (pkg "z3")) True)
   , ("lzma-clib", over (metaSection . platforms) (Set.filter (\(Platform _  os) -> os == Windows)) . set (libraryDepends . haskell . contains (bind "self.only-buildable-on-windows")) False)
@@ -129,7 +129,7 @@
   , ("X11", over (libraryDepends . system) (Set.union (Set.fromList $ map bind ["pkgs.xorg.libXinerama","pkgs.xorg.libXext","pkgs.xorg.libXrender","pkgs.xorg.libXScrnSaver"])))
   , ("xmonad", set phaseOverrides xmonadPostInstall)
   , ("zip-archive < 0.3.1", over (testDepends . tool) (replace (bind "self.zip") (pkg "zip")))
-  , ("zip-archive >= 0.3.1", set (testDepends . tool . contains (pkg "zip")) True)  -- https://github.com/jgm/zip-archive/issues/35
+  , ("zip-archive >= 0.3.1 && < 0.3.2.3", over (testDepends . tool) (Set.union (Set.fromList [pkg "zip", pkg "unzip"])))   -- https://github.com/jgm/zip-archive/issues/35
   ]
 
 pkg :: Identifier -> Binding
@@ -161,7 +161,6 @@
 gitAnnexHook :: Derivation -> Derivation
 gitAnnexHook = set phaseOverrides gitAnnexOverrides
              . over (executableDepends . system) (Set.union buildInputs)
-             . over (metaSection . platforms) (Set.filter (\(Platform _ os) -> os /= OSX))
   where
     gitAnnexOverrides = unlines
       [ "preConfigure = \"export HOME=$TEMPDIR; patchShebangs .\";"
diff --git a/src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hs b/src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hs
--- a/src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hs
+++ b/src/Distribution/Nixpkgs/Haskell/PackageSourceSpec.hs
@@ -19,7 +19,7 @@
 import Distribution.PackageDescription.Parse as Cabal
 import Distribution.Text ( simpleParse, display )
 import Distribution.Version
-import qualified Hpack.Run as Hpack
+import qualified Hpack.Render as Hpack
 import qualified Hpack.Config as Hpack
 import OpenSSL.Digest ( digestString, digestByName )
 import System.Directory ( doesDirectoryExist, doesFileExist, createDirectoryIfMissing, getHomeDirectory, getDirectoryContents )
@@ -191,11 +191,11 @@
 
 hpackDirectory :: FilePath -> MaybeT IO (Bool, Cabal.GenericPackageDescription)
 hpackDirectory dir = do
-  mPackage <- liftIO $ Hpack.readPackageConfig "" $ dir </> "package.yaml"
+  mPackage <- liftIO $ Hpack.readPackageConfig Hpack.defaultDecodeOptions {Hpack.decodeOptionsTarget = dir </> Hpack.packageConfig}
   case mPackage of
     Left err -> liftIO $ hPutStrLn stderr ("*** hpack error: " ++ show err ++ ". Exiting.") >> exitFailure
-    Right (pkg', _) -> do
-      let hpackOutput = Hpack.renderPackage Hpack.defaultRenderSettings 2 [] [] pkg'
+    Right (Hpack.DecodeResult pkg' _ _) -> do
+      let hpackOutput = Hpack.renderPackage [] pkg'
           hash = printSHA256 $ digestString (digestByName "sha256") hpackOutput
       case parseGenericPackageDescription hpackOutput of
         ParseFailed perr -> liftIO $ do
diff --git a/test/Main.hs b/test/Main.hs
new file mode 100644
--- /dev/null
+++ b/test/Main.hs
@@ -0,0 +1,50 @@
+module Main ( main ) where
+
+import Distribution.Nixpkgs.Haskell.FromCabal
+import Distribution.Nixpkgs.Haskell.Derivation
+import Distribution.Nixpkgs.Fetch
+
+import Control.Lens
+import Distribution.Compiler
+import Distribution.PackageDescription
+import Distribution.PackageDescription.Parse
+import Distribution.System
+import Distribution.Verbosity
+import Distribution.Version
+import Language.Nix
+import System.FilePath
+import Test.Tasty
+import Test.Tasty.Golden
+import Text.PrettyPrint.HughesPJClass
+
+main :: IO ()
+main = do
+  testCases <- findByExtension [".cabal"] "test/golden-test-cases"
+  defaultMain $ testGroup "regression-tests" (map regressionTest testCases)
+
+regressionTest :: String -> TestTree
+regressionTest cabalFile = do
+  let nixFile = cabalFile `replaceExtension` "nix"
+      goldenFile = nixFile `addExtension` "golden"
+
+      cabal2nix :: GenericPackageDescription -> Derivation
+      cabal2nix gpd = fromGenericPackageDescription
+                        (const True)
+                        (\i -> Just (binding # (i, path # [i])))
+                        (Platform X86_64 Linux)
+                        (unknownCompilerInfo (CompilerId GHC (mkVersion [8,2])) NoAbiTag)
+                        []
+                        []
+                        gpd
+                      & src .~ DerivationSource
+                                 { derivKind     = "url"
+                                 , derivUrl      = "http://example.org/"
+                                 , derivRevision = ""
+                                 , derivHash     = "abc"
+                                 }
+  goldenVsFileDiff
+    nixFile
+    (\ref new -> ["diff", "-u", ref, new])
+    goldenFile
+    nixFile
+    (readGenericPackageDescription silent cabalFile >>= writeFile nixFile . prettyShow . cabal2nix)
diff --git a/test/golden-test-cases/ChasingBottoms.cabal b/test/golden-test-cases/ChasingBottoms.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ChasingBottoms.cabal
@@ -0,0 +1,185 @@
+name:               ChasingBottoms
+version:            1.3.1.3
+license:            MIT
+license-file:       LICENCE
+copyright:          Copyright (c) Nils Anders Danielsson 2004-2017.
+author:             Nils Anders Danielsson
+maintainer:         http://www.cse.chalmers.se/~nad/
+synopsis:           For testing partial and infinite values.
+description:
+  Do you ever feel the need to test code involving bottoms (e.g. calls to
+  the @error@ function), or code involving infinite values? Then this
+  library could be useful for you.
+  .
+  It is usually easy to get a grip on bottoms by showing a value and
+  waiting to see how much gets printed before the first exception is
+  encountered. However, that quickly gets tiresome and is hard to automate
+  using e.g. QuickCheck
+  (<http://www.cse.chalmers.se/~rjmh/QuickCheck/>). With this library you
+  can do the tests as simply as the following examples show.
+  .
+  Testing explicitly for bottoms:
+  .
+  > > isBottom (head [])
+  > True
+  .
+  > > isBottom bottom
+  > True
+  .
+  > > isBottom (\_ -> bottom)
+  > False
+  .
+  > > isBottom (bottom, bottom)
+  > False
+  .
+  Comparing finite, partial values:
+  .
+  > > ((bottom, 3) :: (Bool, Int)) ==! (bottom, 2+5-4)
+  > True
+  .
+  > > ((bottom, bottom) :: (Bool, Int)) <! (bottom, 8)
+  > True
+  .
+  Showing partial and infinite values (@\\\/!@ is join and @\/\\!@ is meet):
+  .
+  > > approxShow 4 $ (True, bottom) \/! (bottom, 'b')
+  > "Just (True, 'b')"
+  .
+  > > approxShow 4 $ (True, bottom) /\! (bottom, 'b')
+  > "(_|_, _|_)"
+  .
+  > > approxShow 4 $ ([1..] :: [Int])
+  > "[1, 2, 3, _"
+  .
+  > > approxShow 4 $ (cycle [bottom] :: [Bool])
+  > "[_|_, _|_, _|_, _"
+  .
+  Approximately comparing infinite, partial values:
+  .
+  > > approx 100 [2,4..] ==! approx 100 (filter even [1..] :: [Int])
+  > True
+  .
+  > > approx 100 [2,4..] /=! approx 100 (filter even [bottom..] :: [Int])
+  > True
+  .
+  The code above relies on the fact that @bottom@, just as @error
+  \"...\"@, @undefined@ and pattern match failures, yield
+  exceptions. Sometimes we are dealing with properly non-terminating
+  computations, such as the following example, and then it can be nice to
+  be able to apply a time-out:
+  .
+  > > timeOut' 1 (reverse [1..5])
+  > Value [5,4,3,2,1]
+  .
+  > > timeOut' 1 (reverse [1..])
+  > NonTermination
+  .
+  The time-out functionality can be used to treat \"slow\" computations as
+  bottoms:
+  .
+  @
+  \> let tweak = Tweak &#x7b; approxDepth = Just 5, timeOutLimit = Just 2 &#x7d;
+  \> semanticEq tweak (reverse [1..], [1..]) (bottom :: [Int], [1..] :: [Int])
+  True
+  @
+  .
+  @
+  \> let tweak = noTweak &#x7b; timeOutLimit = Just 2 &#x7d;
+  \> semanticJoin tweak (reverse [1..], True) ([] :: [Int], bottom)
+  Just ([],True)
+  @
+  .
+  This can of course be dangerous:
+  .
+  @
+  \> let tweak = noTweak &#x7b; timeOutLimit = Just 0 &#x7d;
+  \> semanticEq tweak (reverse [1..100000000]) (bottom :: [Integer])
+  True
+  @
+  .
+  Timeouts can also be applied to @IO@ computations:
+  .
+  > > let primes () = unfoldr (\(x:xs) -> Just (x, filter ((/= 0) . (`mod` x)) xs)) [2..]
+  > > timeOutMicro 100 (print $ primes ())
+  > [2,NonTermination
+  > > timeOutMicro 10000 (print $ take 10 $ primes ())
+  > [2,3,5,7,11,13,17,19,23,29]
+  > Value ()
+  .
+  For the underlying theory and a larger example involving use of
+  QuickCheck, see the article \"Chasing Bottoms, A Case Study in Program
+  Verification in the Presence of Partial and Infinite Values\"
+  (<http://www.cse.chalmers.se/~nad/publications/danielsson-jansson-mpc2004.html>).
+  .
+  The code has been tested using GHC. Most parts can probably be
+  ported to other Haskell compilers, but this would require some work.
+  The @TimeOut@ functions require preemptive scheduling, and most of
+  the rest requires @Data.Generics@; @isBottom@ only requires
+  exceptions, though.
+category:           Testing
+tested-with:        GHC == 6.12.3,
+                    GHC == 7.0.4,
+                    GHC == 7.4.2,
+                    GHC == 7.6.3,
+                    GHC == 7.8.4,
+                    GHC == 7.10.3,
+                    GHC == 8.0.2,
+                    GHC == 8.2.1
+cabal-version:      >= 1.9.2
+build-type:         Simple
+
+source-repository head
+  type:     darcs
+  location: http://www.cse.chalmers.se/~nad/repos/ChasingBottoms/
+
+library
+    exposed-modules:
+        Test.ChasingBottoms,
+        Test.ChasingBottoms.Approx,
+        Test.ChasingBottoms.ApproxShow,
+        Test.ChasingBottoms.ContinuousFunctions,
+        Test.ChasingBottoms.IsBottom,
+        Test.ChasingBottoms.Nat,
+        Test.ChasingBottoms.SemanticOrd,
+        Test.ChasingBottoms.TimeOut
+
+    other-modules: Test.ChasingBottoms.IsType
+
+    build-depends: QuickCheck >= 2.3 && < 2.11,
+                   mtl >= 2 && < 2.3,
+                   base >= 4.2 && < 4.11,
+                   containers >= 0.3 && < 0.6,
+                   random >= 1.0 && < 1.2,
+                   syb >= 0.1.0.2 && < 0.8
+
+test-suite ChasingBottomsTestSuite
+    type:          exitcode-stdio-1.0
+
+    main-is:       Test/ChasingBottoms/Tests.hs
+
+    other-modules: Test.ChasingBottoms.Approx,
+                   Test.ChasingBottoms.Approx.Tests,
+                   Test.ChasingBottoms.ApproxShow,
+                   Test.ChasingBottoms.ApproxShow.Tests,
+                   Test.ChasingBottoms.ContinuousFunctions,
+                   Test.ChasingBottoms.ContinuousFunctions.Tests,
+                   Test.ChasingBottoms.IsBottom,
+                   Test.ChasingBottoms.IsBottom.Tests,
+                   Test.ChasingBottoms.IsType,
+                   Test.ChasingBottoms.IsType.Tests,
+                   Test.ChasingBottoms.Nat,
+                   Test.ChasingBottoms.Nat.Tests,
+                   Test.ChasingBottoms.SemanticOrd,
+                   Test.ChasingBottoms.SemanticOrd.Tests,
+                   Test.ChasingBottoms.TestUtilities,
+                   Test.ChasingBottoms.TestUtilities.Generators,
+                   Test.ChasingBottoms.TimeOut
+                   Test.ChasingBottoms.TimeOut.Tests
+
+    build-depends: QuickCheck >= 2.3 && < 2.11,
+                   mtl >= 2 && < 2.3,
+                   base >= 4.2 && < 4.11,
+                   containers >= 0.3 && < 0.6,
+                   random >= 1.0 && < 1.2,
+                   syb >= 0.1.0.2 && < 0.8,
+                   array >= 0.3 && < 0.6
diff --git a/test/golden-test-cases/ChasingBottoms.nix.golden b/test/golden-test-cases/ChasingBottoms.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ChasingBottoms.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, array, base, containers, fetchurl, mtl, QuickCheck
+, random, syb
+}:
+mkDerivation {
+  pname = "ChasingBottoms";
+  version = "1.3.1.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers mtl QuickCheck random syb
+  ];
+  testHaskellDepends = [
+    array base containers mtl QuickCheck random syb
+  ];
+  description = "For testing partial and infinite values";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/Clipboard.cabal b/test/golden-test-cases/Clipboard.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Clipboard.cabal
@@ -0,0 +1,55 @@
+Name:         Clipboard
+Version:      2.3.2.0
+Author:       Sævar Berg (Windows), Matthew Bekkema (X11), Daniel Díaz (Maintainer)
+Homepage:     http://haskell.org/haskellwiki/Clipboard
+License:      BSD3
+License-file: license
+Maintainer:   dhelta.diaz `at` gmail.com
+Category:     System
+Stability:    Stable
+Synopsis:     System clipboard interface.
+Bug-reports:  https://github.com/Daniel-Diaz/Clipboard/issues
+Description:    
+  /Clipboard/ is a library for easily interfacing with the system clipboard with additional unicode support.
+  Currently, only in a Windows or GNU/Linux (X11) system.
+  .
+  For example, if you type:
+  .
+  > $ setClipboardString "Hello, World!"
+  .
+  Then you have @\"Hello, World!\"@ available to be pasted wherever you want.
+  .
+  Now, if you type:
+  .
+  > $ modifyClipboardString reverse
+  .
+  You will have @\"!dlroW ,olleH\"@ in your clipboard. So:
+  .
+  > $ getClipboardString
+  > "!dlroW ,olleH"
+  .
+  The X11 version depends on the @X11@ package, so you will need the X11 development library
+  available on your system at compile time. You can install it by @sudo apt-get install libxrandr-dev@
+  (or the equivalent on your system).
+Build-type: Simple
+Cabal-version:  >= 1.6
+Extra-source-files: README.md
+
+Source-repository head
+ type: git
+ location: git://github.com/Daniel-Diaz/Clipboard.git
+
+Library
+  Exposed-modules: System.Clipboard
+  Extensions: CPP
+  if os(windows)
+    Build-depends:  base == 4.*
+                  , Win32 >= 2.2.0.0 && < 2.4
+    Other-modules:  System.Clipboard.Windows
+  else
+    Build-depends:  base == 4.*
+                  , X11 >= 1.6
+                  , utf8-string
+                  , unix
+                  , directory
+    Other-modules:  System.Clipboard.X11
diff --git a/test/golden-test-cases/Clipboard.nix.golden b/test/golden-test-cases/Clipboard.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Clipboard.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, directory, fetchurl, unix, utf8-string, X11
+}:
+mkDerivation {
+  pname = "Clipboard";
+  version = "2.3.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base directory unix utf8-string X11 ];
+  homepage = "http://haskell.org/haskellwiki/Clipboard";
+  description = "System clipboard interface";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/FenwickTree.cabal b/test/golden-test-cases/FenwickTree.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/FenwickTree.cabal
@@ -0,0 +1,41 @@
+name:           FenwickTree
+version:        0.1.2.1
+stability:      alpha
+homepage:       https://github.com/mgajda/FenwickTree
+package-url:    http://hackage.haskell.org/package/FenwickTree
+synopsis:       Data structure for fast query and update of cumulative sums
+description:    Fenwick trees are a O(log N) data structure for updating cumulative sums.
+                This implementation comes with an operation to find a least element for
+                which real-valued cumulative sum reaches certain value, and allows for
+                storage of arbitrary information in the nodes.
+category:       Data Structures
+license:        BSD3
+license-file:   LICENSE
+
+author:         Michal J. Gajda
+copyright:      Copyright by Michal J. Gajda '2013
+maintainer:     mjgajda@googlemail.com
+bug-reports:    mailto:mjgajda@googlemail.com
+
+build-type:     Simple
+cabal-version:  >=1.8
+tested-with:    GHC==7.8.4
+data-files:     README.md changelog
+
+source-repository head
+  type:     git
+  location: git://github.com:mgajda/FenwickTree.git
+
+Library
+  ghc-options:      -fspec-constr-count=4 -O3 
+  build-depends:    base>=4.0, base <5, template-haskell, QuickCheck >= 2.5.0.0
+  other-extensions: ScopedTypeVariables
+  exposed-modules:  Data.Tree.Fenwick
+  exposed:          True
+
+Test-suite test_FenwickTree
+  Type:             exitcode-stdio-1.0
+  main-is:          tests/test_Fenwick.hs
+  ghc-options:      -fspec-constr-count=4 -O3 
+  Build-depends:    base>=4.0, base <5, template-haskell, QuickCheck >= 2.5.0.0
+
diff --git a/test/golden-test-cases/FenwickTree.nix.golden b/test/golden-test-cases/FenwickTree.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/FenwickTree.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, fetchurl, QuickCheck, template-haskell }:
+mkDerivation {
+  pname = "FenwickTree";
+  version = "0.1.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [ base QuickCheck template-haskell ];
+  testHaskellDepends = [ base QuickCheck template-haskell ];
+  homepage = "https://github.com/mgajda/FenwickTree";
+  description = "Data structure for fast query and update of cumulative sums";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/GPipe-GLFW.cabal b/test/golden-test-cases/GPipe-GLFW.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/GPipe-GLFW.cabal
@@ -0,0 +1,51 @@
+name:           GPipe-GLFW
+version:        1.4.1.1
+cabal-version:  >=1.10
+build-type:     Simple
+author:         Patrick Redmond
+license:        MIT
+license-file:   LICENSE
+copyright:      Patrick Redmond
+category:       Graphics
+stability:      Experimental
+homepage:       https://github.com/plredmond/GPipe-GLFW
+synopsis:       GLFW OpenGL context creation for GPipe
+description:
+                GPipe-GLFW is a utility library to enable the use of GLFW as
+                the OpenGL window and context handler for GPipe. GPipe is a
+                typesafe functional API based on the conceptual model of
+                OpenGL.
+maintainer:     Patrick Redmond
+data-files:     CHANGELOG.md
+
+library
+  hs-source-dirs:      src
+  build-depends:       base                   >= 4.7 && <4.11
+                     , stm                    >= 2.4 && <2.5
+                     , containers             >= 0.5 && <0.6
+                     , async                  >= 2.1 && <2.3
+                     , GLFW-b                 >= 1.4 && <1.5
+                     , GPipe                  >= 2.2 && <2.3
+  ghc-options:         -Wall -Wno-orphans
+  default-language:    Haskell2010
+  exposed-modules:     Graphics.GPipe.Context.GLFW
+                       Graphics.GPipe.Context.GLFW.Input
+                       Graphics.GPipe.Context.GLFW.Window
+                       Graphics.GPipe.Context.GLFW.Misc
+  other-modules:       Graphics.GPipe.Context.GLFW.Calls
+                       Graphics.GPipe.Context.GLFW.Resource
+                       Graphics.GPipe.Context.GLFW.Wrappers
+                       Graphics.GPipe.Context.GLFW.Format
+                       Graphics.GPipe.Context.GLFW.Handler
+                       Graphics.GPipe.Context.GLFW.RPC
+
+source-repository head
+  type:     git
+  location: https://github.com/plredmond/GPipe-GLFW.git
+  subdir:   GPipe-GLFW
+
+source-repository this
+  type:     git
+  location: https://github.com/plredmond/GPipe-GLFW.git
+  subdir:   GPipe-GLFW
+  tag:      v1.4.1.1
diff --git a/test/golden-test-cases/GPipe-GLFW.nix.golden b/test/golden-test-cases/GPipe-GLFW.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/GPipe-GLFW.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, async, base, containers, fetchurl, GLFW-b, GPipe
+, stm
+}:
+mkDerivation {
+  pname = "GPipe-GLFW";
+  version = "1.4.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [ async base containers GLFW-b GPipe stm ];
+  homepage = "https://github.com/plredmond/GPipe-GLFW";
+  description = "GLFW OpenGL context creation for GPipe";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/GenericPretty.cabal b/test/golden-test-cases/GenericPretty.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/GenericPretty.cabal
@@ -0,0 +1,99 @@
+-- GenericPretty.cabal auto-generated by cabal init. For additional
+-- options, see
+-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.
+-- The name of the package.
+Name:                GenericPretty
+
+-- The package version. See the Haskell package versioning policy
+-- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
+-- standards guiding when and how versions should be incremented.
+Version:             1.2.1
+
+-- A short (one-line) description of the package.
+Synopsis:            A generic, derivable, haskell pretty printer.
+
+-- A longer description of the package.
+Description: 
+  GenericPretty is a Haskell library that supports automatic
+  derivation of pretty printing functions on user defined data
+  types.
+  .
+  The form of generics used is based on that introduced in the paper:
+  Magalhaes, Dijkstra, Jeuring, and Loh,
+  A Generic Deriving Mechanism for Haskell,
+  3'rd ACM Symposium on Haskell, pp. 37-48, September 2010,
+  <http://dx.doi.org/10.1145/1863523.1863529>.
+  Changes from the original paper in the GHC implementation
+  are described here:
+  <http://www.haskell.org/haskellwiki/GHC.Generics#Changes_from_the_paper>.
+  .
+  This package requires the use of the new GHC.Generics features
+  <http://www.haskell.org/haskellwiki/GHC.Generics>, present from GHC 7.2.
+  Use of these features is indicated by the DeriveGeneric pragma
+  or the flag -XDeriveGeneric.
+  .
+  Pretty printing produces values of type Text.PrettyPrint.Doc, using
+  the Text.PrettyPrint library
+  <http://www.haskell.org/ghc/docs/latest/html/libraries/pretty-1.1.1.0/Text-PrettyPrint.html>.
+  .
+  The output provided is a pretty printed version of that provided by
+  Prelude.show.  That is, rendering the document provided by this pretty
+  printer yields an output identical to that of Prelude.show, except
+  for extra whitespace.
+  .
+  For information about the functions exported by the package please see
+  the API linked further down this page.
+  
+  For examples of usage, both basic and more complex see the README file and
+  the haskell source code files in the TestSuite folder, both included in the package.
+  
+  Finally for installation instructions also see the README file or this page:
+  <http://www.haskell.org/haskellwiki/Cabal/How_to_install_a_Cabal_package>
+  
+-- URL for the project homepage or repository.
+Homepage:            https://github.com/RazvanRanca/GenericPretty
+
+-- The license under which the package is released.
+License:             BSD3
+
+-- The file containing the license text.
+License-file:        LICENSE	
+
+-- The package author(s).
+Author:              Razvan Ranca
+
+-- An email address to which users can send suggestions, bug reports,
+-- and patches.
+Maintainer:          ranca.razvan@gmail.com
+
+-- A copyright notice.
+-- Copyright:           
+
+Category:            Text, Generics, Pretty Printer
+
+Build-type:          Simple
+
+-- Extra files to be distributed with the package, such as examples or
+-- a README.
+Extra-source-files: README TestSuite/SimpleTest.hs TestSuite/Tests.hs TestSuite/CustomTest.hs TestSuite/ZigZagTest.hs
+
+-- Constraint on the version of Cabal needed to build this package.
+Cabal-version:       >=1.6
+
+
+Library
+  -- Modules exported by the library.
+  Exposed-modules:     Text.PrettyPrint.GenericPretty
+  
+  -- Packages needed in order to build this package.
+  Build-depends: 	   base >= 3 && < 5, ghc-prim, pretty
+  
+  -- Modules not exported by this package.
+  -- Other-modules:       
+  
+  -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
+  -- Build-tools: 
+  
+source-repository head
+    type:      git
+    location:  git@github.com:RazvanRanca/GenericPretty.git
diff --git a/test/golden-test-cases/GenericPretty.nix.golden b/test/golden-test-cases/GenericPretty.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/GenericPretty.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, ghc-prim, pretty }:
+mkDerivation {
+  pname = "GenericPretty";
+  version = "1.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ghc-prim pretty ];
+  homepage = "https://github.com/RazvanRanca/GenericPretty";
+  description = "A generic, derivable, haskell pretty printer";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/HPDF.cabal b/test/golden-test-cases/HPDF.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/HPDF.cabal
@@ -0,0 +1,97 @@
+Name: HPDF
+Version: 1.4.10
+cabal-version: >=1.10
+License: BSD3
+License-file:LICENSE
+Copyright: Copyright (c) 2007-2016, alpheccar.org
+category: Graphics
+synopsis: Generation of PDF documents
+maintainer: misc@NOSPAMalpheccar.org
+build-type: Simple
+tested-with: GHC==7.8.4,GHC==7.10.2
+homepage: http://www.alpheccar.org
+description: A PDF library with support for several pages, page transitions, outlines, annotations, compression, colors, shapes, patterns, jpegs, fonts, typesetting ... Have a look at the "Graphics.PDF.Documentation" module to see how to use it. Or, download the package and look at the test.hs file in the Test folder. That file is giving an example of each feature.
+extra-source-files:
+  c/ctext.h
+  c/metrics.h
+  c/conversion.h
+  Test/AFMParser.hs
+  Test/logo.jpg
+  Test/Makefile
+  Test/Penrose.hs
+  Test/test.hs
+  README.txt
+  NEWS.txt
+  TODO.txt
+  changelog.md
+
+source-repository head
+  type:     git
+  location: https://github.com/alpheccar/HPDF.git
+
+Test-Suite HPDF-Tests
+  Type:              exitcode-stdio-1.0
+  Main-is:           HPDF-tests.hs
+  hs-source-dirs:    Test
+  Build-depends:     base >= 4, 
+                     HTF >= 0.10,
+                     HPDF
+  Default-language:  Haskell2010
+  
+library
+  build-depends: 
+      base >= 4 && < 5, 
+      containers, 
+      random >= 1.0, 
+      bytestring >= 0.9, 
+      array >= 0.1, 
+      zlib >= 0.5, 
+      binary >= 0.4, 
+      mtl,
+      vector >=0.10,
+      errors,
+      base64-bytestring >= 0.1
+  Default-language:  Haskell2010
+
+  ghc-options: -Wall -fno-warn-tabs -funbox-strict-fields  -O2
+
+  C-Sources:  
+     c/metrics.c
+     c/conversion.c
+  Include-Dirs: c
+  Install-Includes: 
+     ctext.h
+     conversion.h
+  exposed-Modules: 
+     Graphics.PDF
+     Graphics.PDF.Colors
+     Graphics.PDF.Coordinates
+     Graphics.PDF.Document
+     Graphics.PDF.Shapes
+     Graphics.PDF.Text
+     Graphics.PDF.Navigation
+     Graphics.PDF.Image
+     Graphics.PDF.Action
+     Graphics.PDF.Annotation
+     Graphics.PDF.Pattern
+     Graphics.PDF.Shading
+     Graphics.PDF.Typesetting
+     Graphics.PDF.Hyphenate
+     Graphics.PDF.Documentation
+  Other-Modules:
+     Graphics.PDF.LowLevel.Types
+     Graphics.PDF.Data.PDFTree
+     Graphics.PDF.Data.Trie
+     Graphics.PDF.Pages
+     Graphics.PDF.Resources
+     Graphics.PDF.Draw
+     Graphics.PDF.Hyphenate.English
+     Graphics.PDF.Hyphenate.LowLevel
+     Graphics.PDF.LowLevel.Kern
+     Graphics.PDF.Typesetting.Breaking
+     Graphics.PDF.Typesetting.Horizontal
+     Graphics.PDF.Typesetting.Vertical
+     Graphics.PDF.Typesetting.Box
+     Graphics.PDF.Typesetting.Layout
+     Graphics.PDF.LowLevel.Serializer
+     Graphics.PDF.Typesetting.StandardStyle
diff --git a/test/golden-test-cases/HPDF.nix.golden b/test/golden-test-cases/HPDF.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/HPDF.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, array, base, base64-bytestring, binary, bytestring
+, containers, errors, fetchurl, HTF, mtl, random, vector, zlib
+}:
+mkDerivation {
+  pname = "HPDF";
+  version = "1.4.10";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base base64-bytestring binary bytestring containers errors
+    mtl random vector zlib
+  ];
+  testHaskellDepends = [ base HTF ];
+  homepage = "http://www.alpheccar.org";
+  description = "Generation of PDF documents";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/HTF.cabal b/test/golden-test-cases/HTF.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/HTF.cabal
@@ -0,0 +1,197 @@
+Name:             HTF
+Version:          0.13.2.2
+License:          LGPL
+License-File:     LICENSE
+Copyright:        (c) 2005-2015 Stefan Wehr
+Author:           Stefan Wehr <wehr@factisresearch.com>
+Maintainer:       Stefan Wehr <wehr@factisresearch.com>
+Stability:        Beta
+Category:         Testing
+Synopsis:         The Haskell Test Framework
+Homepage:         https://github.com/skogsbaer/HTF/
+Bug-Reports:      https://github.com/skogsbaer/HTF/issues
+Description:
+
+    The Haskell Test Framework (/HTF/ for short) lets you define unit
+    tests (<http://hunit.sourceforge.net>), QuickCheck properties
+    (<http://www.cs.chalmers.se/~rjmh/QuickCheck/>), and black box
+    tests in an easy and convenient way. HTF uses a custom
+    preprocessor that collects test definitions automatically.
+    Furthermore, the preprocessor allows HTF to report failing
+    test cases with exact file name and line number information.
+    Additionally, HTF tries to produce highly readable output
+    for failing tests: for example, it colors and pretty prints expected and
+    actual results and provides a diff between the two values.
+
+    .
+
+    The documentation of the "Test.Framework.Tutorial" module
+    provides a tutorial for HTF. There is also a slightly out-dated
+    blog article (<http://factisresearch.blogspot.de/2011/10/new-version-of-htf-with-diffs-colors.html>)
+    demonstrating HTF's coloring, pretty-printing and diff functionality.
+
+Build-Type:       Simple
+Cabal-Version:    >= 1.10
+Extra-Source-Files:
+  README.md
+  TODO.org
+  ChangeLog
+  tests/bbt/should_fail/BBTArgs
+  tests/bbt/should_fail/*.err
+  tests/bbt/should_fail/*.out
+  tests/bbt/should_fail/*.x
+  tests/bbt/should_pass/*.in
+  tests/bbt/should_pass/*.err
+  tests/bbt/should_pass/*.out
+  tests/bbt/should_pass/*.x
+  tests/bbt/Skip/BBTArgs
+  tests/bbt/Skip/some_unknown_but_skipped_file.x
+  tests/bbt/Verbose/BBTArgs
+  tests/bbt/Verbose/not_ok_because_stdout1.out
+  tests/bbt/Verbose/not_ok_because_stdout1.x
+  tests/Foo/test.h
+  tests/Tutorial.hs
+  tests/run-bbt.sh
+  tests/compile-errors/Foo.h
+  tests/compile-errors/run-tests.sh
+  tests/compile-errors/Test1.hs
+  tests/compile-errors/Test2.hs
+  tests/compile-errors/Test3.hs
+  tests/compile-errors/Test4.hs
+  sample/LICENSE
+  sample/Main.hs
+  sample/MyPkg/A.hs
+  sample/MyPkg/B.hs
+  sample/README
+  sample/sample-HTF.cabal
+  sample/Setup.hs
+  sample/TestMain.hs
+  sample/bbt-dir/should-fail/BBTArgs
+  sample/bbt-dir/should-fail/z.err
+  sample/bbt-dir/should-fail/z.num
+  sample/bbt-dir/should-pass/x.num
+  sample/bbt-dir/should-pass/x.out
+  scripts/local-htfpp
+  scripts/run-sample
+
+Source-Repository head
+  Type:           git
+  Location:       http://github.com/skogsbaer/HTF.git
+
+Executable htfpp
+  Main-Is:          HTFPP.hs
+  Build-Depends:    HUnit,
+                    array,
+                    base == 4.*,
+                    cpphs >= 1.19,
+                    directory >= 1.0,
+                    mtl >= 1.1,
+                    old-time >= 1.0,
+                    random >= 1.0,
+                    text,
+                    HTF
+  Other-Modules:
+    Paths_HTF
+    Test.Framework.Location
+    Test.Framework.Preprocessor
+  Default-language:  Haskell2010
+
+Library
+  Build-Depends:    Diff >= 0.3,
+                    HUnit >= 1.2.5,
+                    QuickCheck >= 2.3,
+                    aeson < 0.10 || >= 0.11,
+                    array,
+                    base == 4.*,
+                    base64-bytestring,
+                    bytestring >= 0.9,
+                    containers >= 0.5,
+                    cpphs >= 1.19,
+                    haskell-src,
+                    directory >= 1.0,
+                    lifted-base >= 0.1,
+                    monad-control >= 0.3,
+                    mtl >= 1.1,
+                    old-time >= 1.0,
+                    pretty >= 1.0,
+                    process >= 1.0,
+                    random >= 1.0,
+                    regex-compat >= 0.92,
+                    text >= 0.11,
+                    time,
+                    vector,
+                    xmlgen >= 0.6
+  if !os(windows)
+    Build-Depends:   unix >= 2.4
+  Exposed-Modules:
+    Test.Framework
+    Test.Framework.HUnitWrapper
+    Test.Framework.TestManager
+    Test.Framework.TestInterface
+    Test.Framework.TestTypes
+    Test.Framework.TestReporter
+    Test.Framework.History
+    Test.Framework.CmdlineOptions
+    Test.Framework.QuickCheckWrapper
+    Test.Framework.BlackBoxTest
+    Test.Framework.Location
+    Test.Framework.Tutorial
+    Test.Framework.Pretty
+    Test.Framework.JsonOutput
+    Test.Framework.XmlOutput
+    Test.Framework.ThreadPool
+    Test.Framework.AssertM
+    Test.Framework.Colors
+    Test.Framework.PrettyHaskell
+    Test.Framework.Preprocessor
+  Other-Modules:
+    Test.Framework.Utils
+    Test.Framework.Diff
+    Test.Framework.Process
+  Default-language:  Haskell2010
+  Ghc-Options: -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind
+
+Test-Suite MiscTests
+  Main-is:           MiscTest.hs
+  Type:              exitcode-stdio-1.0
+  Hs-Source-Dirs:    tests
+  Build-depends:     HTF,
+                     HUnit,
+                     base == 4.*,
+                     mtl,
+                     random
+  Default-language:  Haskell2010
+
+Test-Suite TestHTF
+  Main-is:           TestHTF.hs
+  Hs-Source-Dirs:    tests, tests/real-bbt
+  Type:              exitcode-stdio-1.0
+  Build-depends:     HTF,
+                     aeson >= 0.6,
+                     aeson-pretty,
+                     base == 4.*,
+                     bytestring >= 0.9,
+                     directory >= 1.0,
+                     filepath >= 1.1,
+                     process >= 1.0,
+                     random,
+                     regex-compat >= 0.92,
+                     template-haskell,
+                     temporary >= 1.1,
+                     text >= 0.11,
+                     unordered-containers >= 0.2
+  Default-language:  Haskell2010
+  Other-Modules:
+    Foo.A, Foo.B, TestHTFHunitBackwardsCompatible, FailFast, MaxCurTime,
+    MaxPrevTime, PrevFactor, SortByPrevTime, UniqTests1, UniqTests2, Quasi,
+    Tutorial, Repeat
+
+Test-Suite TestThreadPools
+  Main-is:           ThreadPoolTest.hs
+  Type:              exitcode-stdio-1.0
+  Hs-Source-Dirs:    tests
+  Build-depends:     HTF,
+                     base == 4.*,
+                     mtl,
+                     random
+  Default-language:  Haskell2010
diff --git a/test/golden-test-cases/HTF.nix.golden b/test/golden-test-cases/HTF.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/HTF.nix.golden
@@ -0,0 +1,34 @@
+{ mkDerivation, aeson, aeson-pretty, array, base, base64-bytestring
+, bytestring, containers, cpphs, Diff, directory, fetchurl
+, filepath, haskell-src, HUnit, lifted-base, monad-control, mtl
+, old-time, pretty, process, QuickCheck, random, regex-compat
+, template-haskell, temporary, text, time, unix
+, unordered-containers, vector, xmlgen
+}:
+mkDerivation {
+  pname = "HTF";
+  version = "0.13.2.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson array base base64-bytestring bytestring containers cpphs Diff
+    directory haskell-src HUnit lifted-base monad-control mtl old-time
+    pretty process QuickCheck random regex-compat text time unix vector
+    xmlgen
+  ];
+  executableHaskellDepends = [
+    array base cpphs directory HUnit mtl old-time random text
+  ];
+  testHaskellDepends = [
+    aeson aeson-pretty base bytestring directory filepath HUnit mtl
+    process random regex-compat template-haskell temporary text
+    unordered-containers
+  ];
+  homepage = "https://github.com/skogsbaer/HTF/";
+  description = "The Haskell Test Framework";
+  license = "LGPL";
+}
diff --git a/test/golden-test-cases/HTTP.cabal b/test/golden-test-cases/HTTP.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/HTTP.cabal
@@ -0,0 +1,182 @@
+Name: HTTP
+Version: 4000.3.9
+Cabal-Version: >= 1.8
+Build-type: Simple
+License: BSD3
+License-file: LICENSE
+Author: Warrick Gray <warrick.gray@hotmail.com>
+Maintainer: Ganesh Sittampalam <ganesh@earth.li>
+Homepage: https://github.com/haskell/HTTP
+Category: Network
+Synopsis: A library for client-side HTTP
+Description:
+
+ The HTTP package supports client-side web programming in Haskell. It lets you set up
+ HTTP connections, transmitting requests and processing the responses coming back, all
+ from within the comforts of Haskell. It's dependent on the network package to operate,
+ but other than that, the implementation is all written in Haskell.
+ .
+ A basic API for issuing single HTTP requests + receiving responses is provided. On top
+ of that, a session-level abstraction is also on offer  (the @BrowserAction@ monad);
+ it taking care of handling the management of persistent connections, proxies,
+ state (cookies) and authentication credentials required to handle multi-step
+ interactions with a web server.
+ .
+ The representation of the bytes flowing across is extensible via the use of a type class,
+ letting you pick the representation of requests and responses that best fits your use.
+ Some pre-packaged, common instances are provided for you (@ByteString@, @String@).
+ .
+ Here's an example use:
+ .
+ >
+ >    do
+ >      rsp <- Network.HTTP.simpleHTTP (getRequest "http://www.haskell.org/")
+ >              -- fetch document and return it (as a 'String'.)
+ >      fmap (take 100) (getResponseBody rsp)
+ >
+ >    do
+ >      (_, rsp)
+ >         <- Network.Browser.browse $ do
+ >               setAllowRedirects True -- handle HTTP redirects
+ >               request $ getRequest "http://www.haskell.org/"
+ >      return (take 100 (rspBody rsp))
+ .
+ __Note:__ This package does not support HTTPS connections.
+ If you need HTTPS, take a look at the following packages:
+ .
+ * <http://hackage.haskell.org/package/http-streams http-streams>
+ .
+ * <http://hackage.haskell.org/package/http-client http-client> (in combination with
+ <http://hackage.haskell.org/package/http-client-tls http-client-tls>)
+ .
+ * <http://hackage.haskell.org/package/req req>
+ .
+ * <http://hackage.haskell.org/package/wreq wreq>
+ .
+
+Extra-Source-Files: CHANGES
+
+Source-Repository head
+  type: git
+  location: https://github.com/haskell/HTTP.git
+
+Flag mtl1
+  description: Use the old mtl version 1.
+  default: False
+
+Flag warn-as-error
+  default:     False
+  description: Build with warnings-as-errors
+  manual:      True
+
+Flag network23
+  description: Use version 2.3.x or below of the network package
+  default: False
+
+Flag conduit10
+  description: Use version 1.0.x or below of the conduit package (for the test suite)
+  default: False
+
+Flag warp-tests
+  description: Test against warp
+  default:     True
+  manual:      True
+
+flag network-uri
+  description: Get Network.URI from the network-uri package
+  default: True
+
+Library
+  Exposed-modules:
+                 Network.BufferType,
+                 Network.Stream,
+                 Network.StreamDebugger,
+                 Network.StreamSocket,
+                 Network.TCP,
+                 Network.HTTP,
+                 Network.HTTP.Headers,
+                 Network.HTTP.Base,
+                 Network.HTTP.Stream,
+                 Network.HTTP.Auth,
+                 Network.HTTP.Cookie,
+                 Network.HTTP.Proxy,
+                 Network.HTTP.HandleStream,
+                 Network.Browser
+  Other-modules:
+                 Network.HTTP.Base64,
+                 Network.HTTP.MD5Aux,
+                 Network.HTTP.Utils
+                 Paths_HTTP
+  GHC-options: -fwarn-missing-signatures -Wall
+
+  -- note the test harness constraints should be kept in sync with these
+  -- where dependencies are shared
+  Build-depends: base >= 4.3.0.0 && < 4.11, parsec >= 2.0 && < 3.2
+  Build-depends: array >= 0.3.0.2 && < 0.6, bytestring >= 0.9.1.5 && < 0.11
+  Build-depends: time >= 1.1.2.3 && < 1.9
+
+  Extensions: FlexibleInstances
+
+  if flag(mtl1)
+    Build-depends: mtl >= 1.1.1.0 && < 1.2
+    CPP-Options: -DMTL1
+  else
+    Build-depends: mtl >= 2.0 && < 2.3
+
+  if flag(network-uri)
+    Build-depends: network-uri == 2.6.*, network == 2.6.*
+  else
+    Build-depends: network >= 2.2.1.8 && < 2.6
+
+  if flag(warn-as-error)
+    ghc-options:      -Werror
+
+  if os(windows)
+    Build-depends: Win32 >= 2.2.0.0 && < 2.6
+
+Test-Suite test
+  type: exitcode-stdio-1.0
+
+  hs-source-dirs: test
+  main-is: httpTests.hs
+
+  other-modules:
+    Httpd
+    UnitTests
+
+  -- note: version constraints for dependencies shared with the library
+  -- should be the same
+  build-depends:     HTTP,
+                     HUnit >= 1.2.0.1 && < 1.7,
+                     httpd-shed >= 0.4 && < 0.5,
+                     mtl >= 1.1.1.0 && < 2.3,
+                     bytestring >= 0.9.1.5 && < 0.11,
+                     deepseq >= 1.3.0.0 && < 1.5,
+                     pureMD5 >= 0.2.4 && < 2.2,
+                     base >= 4.3.0.0 && < 4.11,
+                     split >= 0.1.3 && < 0.3,
+                     test-framework >= 0.2.0 && < 0.9,
+                     test-framework-hunit >= 0.3.0 && <0.4
+
+  if flag(network-uri)
+    Build-depends: network-uri == 2.6.*, network == 2.6.*
+  else
+    Build-depends: network >= 2.2.1.5 && < 2.6
+
+  if flag(warp-tests)
+    CPP-Options: -DWARP_TESTS
+    build-depends:
+                       case-insensitive >= 0.4.0.1 && < 1.3,
+                       http-types >= 0.8.0 && < 1.0,
+                       wai >= 2.1.0 && < 3.3,
+                       warp >= 2.1.0 && < 3.3
+
+    if flag(conduit10)
+      build-depends:
+                         conduit >= 1.0.8 && < 1.1
+    else
+      build-depends:
+                         conduit >= 1.1 && < 1.3,
+                         conduit-extra >= 1.1 && < 1.3
+
+
diff --git a/test/golden-test-cases/HTTP.nix.golden b/test/golden-test-cases/HTTP.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/HTTP.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, array, base, bytestring, case-insensitive, conduit
+, conduit-extra, deepseq, fetchurl, http-types, httpd-shed, HUnit
+, mtl, network, network-uri, parsec, pureMD5, split, test-framework
+, test-framework-hunit, time, wai, warp
+}:
+mkDerivation {
+  pname = "HTTP";
+  version = "4000.3.9";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bytestring mtl network network-uri parsec time
+  ];
+  testHaskellDepends = [
+    base bytestring case-insensitive conduit conduit-extra deepseq
+    http-types httpd-shed HUnit mtl network network-uri pureMD5 split
+    test-framework test-framework-hunit wai warp
+  ];
+  homepage = "https://github.com/haskell/HTTP";
+  description = "A library for client-side HTTP";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/Hclip.cabal b/test/golden-test-cases/Hclip.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Hclip.cabal
@@ -0,0 +1,55 @@
+
+name:                Hclip
+
+-- The package version.  See the Haskell package versioning policy (PVP) 
+-- for standards guiding when and how versions should be incremented.
+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
+-- PVP summary:      +-+------- breaking API changes
+--                   | | +----- non-breaking API additions
+--                   | | | +--- code changes with no API change
+version:             3.0.0.4
+
+synopsis:            A small cross-platform library for reading and modifying the system clipboard.
+
+homepage:            https://github.com/jetho/Hclip
+
+license:             BSD3
+
+license-file:        LICENSE
+
+author:              Jens Thomas
+
+maintainer:          jetho@gmx.de
+
+category:            System
+
+description:
+        A small cross-platform library for reading and modifying the system clipboard.
+        .
+        Hclip works on Windows, Mac OS X and Linux (but see the requirements below!).
+        .
+        Requirements:
+        .
+        * Windows: No additional requirements.
+        .
+        * Mac OS X: Requires the pbcopy and pbpaste commands, which ship with Mac OS X.
+        .
+        * Linux: Requires xclip or xsel installed.
+		
+build-type:          Simple
+
+cabal-version:       >=1.10
+
+
+library
+  exposed-modules:   System.Hclip
+  other-extensions:  CPP, DeriveDataTypeable, GADTs
+  default-language:  Haskell2010
+  build-depends:     base >= 3 && < 5, process, mtl, strict
+  if os(windows)
+    build-depends:   Win32
+
+source-repository head
+  type:              git
+  location:          git://github.com/jetho/Hclip.git
+
diff --git a/test/golden-test-cases/Hclip.nix.golden b/test/golden-test-cases/Hclip.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Hclip.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, mtl, process, strict }:
+mkDerivation {
+  pname = "Hclip";
+  version = "3.0.0.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base mtl process strict ];
+  homepage = "https://github.com/jetho/Hclip";
+  description = "A small cross-platform library for reading and modifying the system clipboard";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/MissingH.cabal b/test/golden-test-cases/MissingH.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/MissingH.cabal
@@ -0,0 +1,131 @@
+Name: MissingH
+Version: 1.4.0.1
+License: BSD3
+Maintainer: John Goerzen <jgoerzen@complete.org>
+Author: John Goerzen
+Copyright: Copyright (c) 2004-2016 John Goerzen
+license-file: LICENSE
+extra-source-files: LICENSE,
+                    announcements/0.10.0.txt,
+                    announcements/0.8.0.txt,
+                    announcements/0.9.0.txt,
+                    testsrc/gzfiles/empty.gz,
+                    testsrc/gzfiles/t1.gz,
+                    testsrc/gzfiles/t1bad.gz,
+                    testsrc/gzfiles/t2.gz,
+                    testsrc/gzfiles/zeros.gz,
+                    testsrc/mime.types.test,
+                    3rd-party-licenses/BSD,
+                    3rd-party-licenses/LGPL-2.1,
+                    Makefile,
+                    TODO,
+                    examples/simplegrep.hs,
+                    examples/test2.hs,
+                    examples/test3.hs,
+                    pending/Gopher.hs,
+                    pending/Maildir.disabled,
+                    pending/Tar.newhs,
+                    pending/Tar/HeaderParser.newhs,
+                    tolgpl,
+                    winbuild.bat,
+                    wintest.bat
+homepage: http://software.complete.org/missingh
+Category: Unclassified
+synopsis: Large utility library
+Description:  MissingH is a library of all sorts of utility functions for
+ Haskell programmers.  It is written in pure Haskell and thus should
+ be extremely portable and easy to use.
+Stability: Beta
+Build-Type: Simple
+Cabal-Version: >=1.8
+
+Library
+ Hs-Source-Dirs: src
+ Exposed-Modules:
+  Data.String.Utils, System.IO.Utils, System.IO.Binary, Data.List.Utils,
+  System.Daemon,
+  Text.ParserCombinators.Parsec.Utils,
+  Network.Email.Mailbox,
+  Control.Concurrent.Thread.Utils,
+  Network.Email.Sendmail,
+    Data.CSV,
+  System.Cmd.Utils,
+  Data.BinPacking,
+  Data.Progress.Tracker,
+  Data.Progress.Meter,
+  Data.Quantity,
+  Data.Map.Utils, System.Path, System.Path.NameManip,
+    System.Path.WildMatch, System.Path.Glob,
+  System.Time.Utils,
+  Network.Utils,
+  Network.SocketServer,
+  Data.Either.Utils,
+  Data.Maybe.Utils,
+  Data.Tuple.Utils,
+  Data.Bits.Utils,
+  Data.Hash.CRC32.GZip,
+   Data.Hash.MD5, Data.Hash.MD5.Zord64_HARD,
+  Data.Compression.Inflate,
+  System.FileArchive.GZip,
+  System.IO.HVFS,
+    System.IO.HVFS.Combinators,
+    System.IO.HVFS.InstanceHelpers,
+    System.IO.HVFS.Utils,
+  System.IO.HVIO, System.IO.StatCompat, System.IO.WindowsCompat,
+    System.IO.PlafCompat, System.Posix.Consts,
+  System.Debian, System.Debian.ControlParser,
+  Data.MIME.Types,
+  System.Console.GetOpt.Utils
+
+ Extensions: ExistentialQuantification, OverlappingInstances,
+   UndecidableInstances, CPP, Rank2Types,
+   MultiParamTypeClasses, FlexibleInstances, FlexibleContexts,
+   ScopedTypeVariables
+
+ Build-Depends: network, parsec, base,
+               mtl, HUnit, regex-compat,
+               filepath,
+               hslogger,
+               base >= 4.5, base < 5, directory, random, process, old-time,
+                           containers, old-locale, array, time
+ If ! os(windows)
+   Build-Depends: unix
+
+test-suite runtests
+  type:           exitcode-stdio-1.0
+
+  Build-Depends: network, parsec, base,
+               mtl, HUnit, regex-compat,
+               errorcall-eq-instance,
+               filepath,
+               hslogger,
+               base >= 4.5, base < 5, directory, random, process, old-time,
+                         containers, old-locale, array, time
+  If ! os(windows)
+   Build-Depends: unix
+  Build-Depends: testpack, QuickCheck, HUnit
+
+  Main-Is: runtests.hs
+  HS-Source-Dirs: testsrc, ., src
+  Other-Modules: Bitstest,
+    CRC32GZIPtest,
+    Eithertest,
+    GZiptest,
+    Globtest,
+    HVFStest,
+    HVIOtest,
+    IOtest,
+    Listtest,
+    MIMETypestest,
+    Maptest,
+    Pathtest,
+    ProgressTrackertest,
+    Str.CSVtest,
+    Strtest,
+    Tests,
+    Timetest,
+    WildMatchtest
+  Extensions: ExistentialQuantification, OverlappingInstances,
+    UndecidableInstances, CPP, Rank2Types,
+    MultiParamTypeClasses, FlexibleInstances, FlexibleContexts,
+    ScopedTypeVariables
diff --git a/test/golden-test-cases/MissingH.nix.golden b/test/golden-test-cases/MissingH.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/MissingH.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, array, base, containers, directory
+, errorcall-eq-instance, fetchurl, filepath, hslogger, HUnit, mtl
+, network, old-locale, old-time, parsec, process, QuickCheck
+, random, regex-compat, testpack, time, unix
+}:
+mkDerivation {
+  pname = "MissingH";
+  version = "1.4.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base containers directory filepath hslogger HUnit mtl network
+    old-locale old-time parsec process random regex-compat time unix
+  ];
+  testHaskellDepends = [
+    array base containers directory errorcall-eq-instance filepath
+    hslogger HUnit mtl network old-locale old-time parsec process
+    QuickCheck random regex-compat testpack time unix
+  ];
+  homepage = "http://software.complete.org/missingh";
+  description = "Large utility library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/ObjectName.cabal b/test/golden-test-cases/ObjectName.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ObjectName.cabal
@@ -0,0 +1,34 @@
+name: ObjectName
+version: 1.1.0.1
+synopsis: Explicitly handled object names
+description:
+  This tiny package contains the class ObjectName, which corresponds to the
+  general notion of explicitly handled identifiers for API objects, e.g. a
+  texture object name in OpenGL or a buffer object name in OpenAL.
+homepage: https://github.com/svenpanne/ObjectName
+bug-reports: https://github.com/svenpanne/ObjectName/issues
+copyright: Copyright (C) 2014-2015 Sven Panne
+license: BSD3
+license-file: LICENSE
+author: Sven Panne
+maintainer: Sven Panne <svenpanne@gmail.com>
+category: Data
+build-type: Simple
+cabal-version: >=1.10
+extra-source-files:
+  README.md
+
+library
+  exposed-modules:
+   Data.ObjectName
+  build-depends:
+    base         >= 4   && < 5,
+    transformers >= 0.2 && < 0.6
+  default-language: Haskell2010
+  other-extensions: CPP
+  hs-Source-Dirs: src
+  ghc-options: -Wall
+
+source-repository head
+  type: git
+  location: https://github.com/haskell-opengl/ObjectName.git
diff --git a/test/golden-test-cases/ObjectName.nix.golden b/test/golden-test-cases/ObjectName.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ObjectName.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, transformers }:
+mkDerivation {
+  pname = "ObjectName";
+  version = "1.1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base transformers ];
+  homepage = "https://github.com/svenpanne/ObjectName";
+  description = "Explicitly handled object names";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/Only.cabal b/test/golden-test-cases/Only.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Only.cabal
@@ -0,0 +1,32 @@
+name:                Only
+version:             0.1
+synopsis:            The 1-tuple type or single-value "collection"
+license:             BSD3
+license-file:        LICENSE
+author:              Herbert Valerio Riedel
+maintainer:          hvr@gnu.org
+bug-reports:         https://github.com/hvr/Only/issues
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+description:         This package provides the canonical anonymous 1-tuple type missing from Haskell for attaching typeclass instances.
+
+Source-Repository head
+  Type:              git
+  Location:          https://github.com/hvr/Only.git
+
+library
+  hs-source-dirs:    src
+  exposed-modules:   Data.Tuple.Only
+
+  default-language:  Haskell2010
+  other-extensions:  DeriveGeneric
+                   , DeriveDataTypeable
+                   , DeriveFunctor
+                   , Safe
+
+  build-depends:     base    >= 4.5 && <5
+                   , deepseq >= 1.1 && <1.5
+
+  if impl(ghc == 7.4.*)
+     build-depends: ghc-prim
diff --git a/test/golden-test-cases/Only.nix.golden b/test/golden-test-cases/Only.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Only.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, deepseq, fetchurl }:
+mkDerivation {
+  pname = "Only";
+  version = "0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base deepseq ];
+  description = "The 1-tuple type or single-value \"collection\"";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/QuasiText.cabal b/test/golden-test-cases/QuasiText.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/QuasiText.cabal
@@ -0,0 +1,20 @@
+-- Initial QuasiText.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                QuasiText
+version:             0.1.2.6
+synopsis:            A QuasiQuoter for Text.
+description:         A QuasiQuoter for interpolating values into Text strings.
+homepage:            https://github.com/mikeplus64/QuasiText
+license:             BSD3
+license-file:        LICENSE
+author:              Mike Ledger
+maintainer:          eleventynine@gmail.com
+category:            Text
+build-type:          Simple
+cabal-version:       >=1.8
+
+library
+  exposed-modules:     Text.QuasiText
+  build-depends:       base >= 4.5.0.0 && < 5.0.0.0, template-haskell, haskell-src-meta, attoparsec, text, th-lift-instances
+  hs-source-dirs:      src
diff --git a/test/golden-test-cases/QuasiText.nix.golden b/test/golden-test-cases/QuasiText.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/QuasiText.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, attoparsec, base, fetchurl, haskell-src-meta
+, template-haskell, text, th-lift-instances
+}:
+mkDerivation {
+  pname = "QuasiText";
+  version = "0.1.2.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base haskell-src-meta template-haskell text
+    th-lift-instances
+  ];
+  homepage = "https://github.com/mikeplus64/QuasiText";
+  description = "A QuasiQuoter for Text";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/QuickCheck.cabal b/test/golden-test-cases/QuickCheck.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/QuickCheck.cabal
@@ -0,0 +1,171 @@
+Name: QuickCheck
+Version: 2.10.1
+Cabal-Version: >= 1.8
+Build-type: Simple
+License: BSD3
+License-file: LICENSE
+Copyright: 2000-2017 Koen Claessen, 2006-2008 Björn Bringert, 2009-2017 Nick Smallbone
+Author: Koen Claessen <koen@chalmers.se>
+Maintainer: Nick Smallbone <nick@smallbone.se>; see also QuickCheck mailing list (https://groups.google.com/forum/#!forum/haskell-quickcheck)
+Bug-reports: https://github.com/nick8325/quickcheck/issues
+Tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC >= 7.4
+Homepage: https://github.com/nick8325/quickcheck
+Category:       Testing
+Synopsis:       Automatic testing of Haskell programs
+Description:
+  QuickCheck is a library for random testing of program properties.
+  .
+  The programmer provides a specification of the program, in the form of
+  properties which functions should satisfy, and QuickCheck then tests that the
+  properties hold in a large number of randomly generated cases.
+  .
+  Specifications are expressed in Haskell, using combinators defined in the
+  QuickCheck library. QuickCheck provides combinators to define properties,
+  observe the distribution of test data, and define test data generators.
+  .
+  The <http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html official QuickCheck manual>
+  explains how to write generators and properties;
+  it is out-of-date in some details but still full of useful advice.
+  .
+  A user of QuickCheck has written an unofficial, but detailed, tutorial which
+  you can find at
+  <https://begriffs.com/posts/2017-01-14-design-use-quickcheck.html>.
+
+extra-source-files:
+  README
+  changelog
+  examples/Heap.hs
+  examples/Heap_Program.hs
+  examples/Heap_ProgramAlgebraic.hs
+  examples/Lambda.hs
+  examples/Merge.hs
+  examples/Set.hs
+  examples/Simple.hs
+
+source-repository head
+  type:     git
+  location: https://github.com/nick8325/quickcheck
+
+source-repository this
+  type:     git
+  location: https://github.com/nick8325/quickcheck
+  tag:      2.10.1
+
+flag templateHaskell
+  Description: Build Test.QuickCheck.All, which uses Template Haskell.
+  Default: True
+
+library
+  Build-depends: base >=4.3 && <5, random, containers
+
+  -- Modules that are always built.
+  Exposed-Modules:
+    Test.QuickCheck,
+    Test.QuickCheck.Arbitrary,
+    Test.QuickCheck.Gen,
+    Test.QuickCheck.Gen.Unsafe,
+    Test.QuickCheck.Monadic,
+    Test.QuickCheck.Modifiers,
+    Test.QuickCheck.Property,
+    Test.QuickCheck.Test,
+    Test.QuickCheck.Text,
+    Test.QuickCheck.Poly,
+    Test.QuickCheck.State,
+    Test.QuickCheck.Random,
+    Test.QuickCheck.Exception
+
+  -- GHC-specific modules.
+  if impl(ghc)
+    Exposed-Modules: Test.QuickCheck.Function
+    Build-depends: transformers >= 0.3, deepseq
+  else
+    cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ
+
+  if impl(ghc) && flag(templateHaskell)
+    Build-depends: template-haskell >= 2.4
+    Other-Extensions: TemplateHaskell
+    Exposed-Modules: Test.QuickCheck.All
+  else
+    cpp-options: -DNO_TEMPLATE_HASKELL
+
+  if !impl(ghc >= 7.2)
+    cpp-options: -DNO_FOREIGN_C_USECONDS
+
+  -- The new generics appeared in GHC 7.2...
+  if impl(ghc < 7.2)
+    cpp-options: -DNO_GENERICS
+  -- ...but in 7.2-7.4 it lives in the ghc-prim package.
+  if impl(ghc >= 7.2) && impl(ghc < 7.6)
+    Build-depends: ghc-prim
+
+  -- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.
+  if impl (ghc < 7.4)
+    cpp-options: -DNO_SAFE_HASKELL
+
+  -- Use tf-random on newer GHCs.
+  if impl(ghc)
+    Build-depends: tf-random >= 0.4
+  else
+    cpp-options: -DNO_TF_RANDOM
+
+  if !impl(ghc >= 7.6)
+      cpp-options: -DNO_POLYKINDS
+
+  if !impl(ghc >= 8.0)
+    cpp-options: -DNO_MONADFAIL
+
+  -- Switch off most optional features on non-GHC systems.
+  if !impl(ghc)
+    -- If your Haskell compiler can cope without some of these, please
+    -- send a message to the QuickCheck mailing list!
+    cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL
+    if !impl(hugs) && !impl(uhc)
+      cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES
+
+  -- LANGUAGE pragmas don't have any effect in Hugs.
+  if impl(hugs)
+    Extensions: CPP
+
+  if impl(uhc)
+    -- Cabal under UHC needs pointing out all the dependencies of the
+    -- random package.
+    Build-depends: old-time, old-locale
+    -- Plus some bits of the standard library are missing.
+    cpp-options: -DNO_FIXED -DNO_EXCEPTIONS
+
+Test-Suite test-quickcheck
+    type: exitcode-stdio-1.0
+    hs-source-dirs:
+        examples
+    main-is: Heap.hs
+    build-depends: base, QuickCheck
+    if !flag(templateHaskell)
+        Buildable: False
+
+Test-Suite test-quickcheck-gcoarbitrary
+    type: exitcode-stdio-1.0
+    hs-source-dirs: tests
+    main-is: GCoArbitraryExample.hs
+    build-depends: base, QuickCheck
+    if !impl(ghc >= 7.2)
+        buildable: False
+    if impl(ghc >= 7.2) && impl(ghc < 7.6)
+        build-depends: ghc-prim
+
+Test-Suite test-quickcheck-generators
+    type: exitcode-stdio-1.0
+    hs-source-dirs: tests
+    main-is: Generators.hs
+    build-depends: base, QuickCheck
+    if !flag(templateHaskell)
+        Buildable: False
+
+Test-Suite test-quickcheck-gshrink
+    type: exitcode-stdio-1.0
+    hs-source-dirs: tests
+    main-is: GShrinkExample.hs
+    build-depends: base, QuickCheck
+    if !impl(ghc >= 7.2)
+        buildable: False
+    if impl(ghc >= 7.2) && impl(ghc < 7.6)
+        build-depends: ghc-prim
diff --git a/test/golden-test-cases/QuickCheck.nix.golden b/test/golden-test-cases/QuickCheck.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/QuickCheck.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, containers, deepseq, fetchurl, random
+, template-haskell, tf-random, transformers
+}:
+mkDerivation {
+  pname = "QuickCheck";
+  version = "2.10.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers deepseq random template-haskell tf-random
+    transformers
+  ];
+  testHaskellDepends = [ base ];
+  homepage = "https://github.com/nick8325/quickcheck";
+  description = "Automatic testing of Haskell programs";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/ReadArgs.cabal b/test/golden-test-cases/ReadArgs.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ReadArgs.cabal
@@ -0,0 +1,110 @@
+Name:                ReadArgs
+Version:             1.2.3
+Synopsis:            Simple command line argument parsing
+
+Description:         
+
+  ReadArgs provides the @readArgs@ IO action, which lets you tell the compiler 
+  to parse the command line arguments to fit the type signature you give.
+  .
+  For example @(a :: Int, b :: String, c :: Float) <- readArgs@ would
+  parse the first runtime argument as an @Int@, the second as a @String@ (no
+  quotes required) and the third as a @Float@.
+  .
+  If the runtime arguments are incompatible with the type signature,
+  then a simple usage statement is given of the types needed.
+  .
+  Continuing the previous example, if it was used in a
+  program named @Example@, the error message for the above
+  action would be: 
+  .
+  @
+    usage: Example Int String Float
+  @
+  .
+  Any type that has both @Typeable@ and @Read@ instances
+  can be used. @Char@, @String@, and @Text@ are handled specially so that
+  command line arguments for both do not require quotes (as their 
+  @Read@ instances do). A special instance is provided for @FilePath@ so 
+  that no constructor or quotes are required.
+  .
+  @readArgs@ also supports optional arguments and variadic arguments.
+  Optional arguments are specified using @Maybe@, and variadic arguments 
+  using a list.  @(a :: Int, b :: Maybe String, c :: [Float]) <- readArgs@ 
+  would successfully parse any of the following sets of command line arguments:
+  .
+  @
+    Example 1
+    Example 1 2 3 4
+    Example 1 foo
+    Example 1 foo 2 3 4
+  @
+  .
+  But not
+  .
+  @
+    Example
+    Example foo
+    Example 1.0
+  @
+  .
+  Usage statements for optional and variadic arguments use command-line
+  parlance:
+  .
+  @
+    usage: Example Int [String] [Float..]
+  @
+  .
+  Note that both optional and variadic parsers are greedy by default 
+  (so @Example 1 2 3 4@ was parsed as @(1, "2", [3.0,4.0])@.  They
+  may both be made non-greedy through use of the @NonGreedy@ constructor:
+  .
+  @
+    ( a :: Int
+    , NonGreedy b :: NonGreedy Maybe String
+    , NonGreedy c :: NonGreedy [] Float
+    ) <- readArgs
+  @
+
+Homepage:            http://github.com/rampion/ReadArgs
+License:             BSD3
+License-file:        LICENSE
+Author:              Noah Luck Easterly
+Maintainer:          noah.easterly@gmail.com
+Category:            Command Line
+Build-type:          Simple
+Cabal-version:       >=1.8
+
+Source-repository head
+  type: git 
+  location: git://github.com/rampion/ReadArgs.git
+
+Library
+  Exposed-modules:     ReadArgs
+
+  Build-depends: 
+    base >= 4.3.1.0 && < 5,
+    system-filepath >= 0.4.7 && < 0.5,
+    text >= 0.11.1.13 && < 12
+  
+Test-Suite ReadArgsSpec
+  type:
+    exitcode-stdio-1.0
+
+  Main-Is:
+    ReadArgsSpec.hs
+
+  Build-depends:       
+    hspec >= 1.3 && < 3,
+    base >= 4.3.1.0 && < 5,
+    system-filepath >= 0.4.7 && < 0.5,
+    text >= 0.11.1.13 && < 12
+  
+Executable ReadArgsEx
+  Main-Is:
+    ReadArgsEx.hs
+
+  Build-depends: 
+    base >= 4.3.1.0 && < 5,
+    system-filepath >= 0.4.7 && < 0.5,
+    text >= 0.11.1.13 && < 12
diff --git a/test/golden-test-cases/ReadArgs.nix.golden b/test/golden-test-cases/ReadArgs.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ReadArgs.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, hspec, system-filepath, text }:
+mkDerivation {
+  pname = "ReadArgs";
+  version = "1.2.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base system-filepath text ];
+  executableHaskellDepends = [ base system-filepath text ];
+  testHaskellDepends = [ base hspec system-filepath text ];
+  homepage = "http://github.com/rampion/ReadArgs";
+  description = "Simple command line argument parsing";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/SHA.cabal b/test/golden-test-cases/SHA.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/SHA.cabal
@@ -0,0 +1,130 @@
+name:       SHA
+category:   Cryptography, Codec
+version:    1.6.4.2
+license:    BSD3
+license-file: LICENSE
+author:     Adam Wick <awick@galois.com>, Brian Lewis <brian@lorf.org>
+maintainer: Adam Wick <awick@galois.com>,
+            Raphael Javaux <raphaeljavaux@gmail.com>
+stability:  stable
+build-type: Simple
+cabal-version: >= 1.8
+tested-with: GHC == 7.6.1
+synopsis: Implementations of the SHA suite of message digest functions
+description: This library implements the SHA suite of message digest functions,
+             according to NIST FIPS 180-2 (with the SHA-224 addendum), as well
+             as the SHA-based HMAC routines. The functions have been tested 
+             against most of the NIST and RFC test vectors for the various
+             functions. While some attention has been paid to performance, 
+             these do not presently reach the speed of well-tuned libraries, 
+             like OpenSSL.
+
+Flag exe
+  Description: Build a sha executables similar to 'md5sum'.
+  Default: False
+
+Library
+  hs-source-dirs: src
+  build-depends: array > 0 && < 10000,
+                 base >= 4 && < 6,
+                 binary >= 0.7 && < 10000,
+                 bytestring > 0.8 && < 10000
+  exposed-modules: Data.Digest.Pure.SHA
+  GHC-Options: -Wall -fno-ignore-asserts -fno-warn-orphans
+               -funbox-strict-fields -fwarn-tabs
+  extensions: BangPatterns
+  if impl(ghc >= 6.12) && impl(ghc < 7.7)
+    Ghc-Options: -fregs-graph
+
+test-suite test-sha
+  type:            exitcode-stdio-1.0
+  hs-source-dirs:  src
+  main-is:         Test.hs
+  ghc-options:     -Wall -fhpc
+  build-depends: array > 0 && < 10000,
+                 base > 4.3 && < 7,
+                 binary >= 0.7 && < 10000,
+                 bytestring > 0.8 && < 10000,
+                 QuickCheck >= 2.5 && < 3,
+                 test-framework >= 0.8.0.3 && < 10000,
+                 test-framework-quickcheck2 >= 0.3.0.2 && < 10000
+  extensions: BangPatterns, MultiParamTypeClasses, DeriveDataTypeable
+  GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
+               -funbox-strict-fields -fwarn-tabs
+  cpp-options: -DSHA_TEST
+  if impl(ghc >= 6.12)
+    Ghc-Options: -fregs-graph
+
+Executable sha1
+  if !flag(exe)
+    buildable: False
+  hs-source-dirs: src-bin
+  build-depends: base >= 4 && < 6,
+                 bytestring > 0.8 && < 10000,
+                 directory > 0.0 && < 10000,
+                 SHA > 1.6 && < 10000
+  Main-Is: Main.hs
+  extensions: CPP
+  GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
+               -funbox-strict-fields -fwarn-tabs
+  cpp-options: -DALGORITHM=sha1
+
+Executable sha224
+  if !flag(exe)
+    buildable: False
+  hs-source-dirs: src-bin
+  build-depends: base >= 4 && < 6,
+                 bytestring > 0.8 && < 10000,
+                 directory > 0.0 && < 10000,
+                 SHA > 1.6 && < 10000
+  Main-Is: Main.hs
+  extensions: CPP
+  GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
+               -funbox-strict-fields -fwarn-tabs
+  cpp-options: -DALGORITHM=sha224
+
+Executable sha256
+  if !flag(exe)
+    buildable: False
+  hs-source-dirs: src-bin
+  build-depends: base >= 4 && < 6,
+                 bytestring > 0.8 && < 10000,
+                 directory > 0.0 && < 10000,
+                 SHA > 1.6 && < 10000
+  Main-Is: Main.hs
+  extensions: CPP
+  GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
+               -funbox-strict-fields -fwarn-tabs
+  cpp-options: -DALGORITHM=sha256
+
+Executable sha384
+  if !flag(exe)
+    buildable: False
+  hs-source-dirs: src-bin
+  build-depends: base >= 4 && < 6,
+                 bytestring > 0.8 && < 10000,
+                 directory > 0.0 && < 10000,
+                 SHA > 1.6 && < 10000
+  Main-Is: Main.hs
+  extensions: CPP
+  GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
+               -funbox-strict-fields -fwarn-tabs
+  cpp-options: -DALGORITHM=sha384
+
+Executable sha512
+  if !flag(exe)
+    buildable: False
+  hs-source-dirs: src-bin
+  build-depends: base >= 4 && < 6,
+                 bytestring > 0.8 && < 10000,
+                 directory > 0.0 && < 10000,
+                 SHA > 1.6 && < 10000
+  Main-Is: Main.hs
+  extensions: CPP
+  GHC-Options: -O2 -Wall -fno-ignore-asserts -fno-warn-orphans
+               -funbox-strict-fields -fwarn-tabs
+  cpp-options: -DALGORITHM=sha512
+
+source-repository head
+  type:     git
+  location: git://github.com/GaloisInc/SHA.git
diff --git a/test/golden-test-cases/SHA.nix.golden b/test/golden-test-cases/SHA.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/SHA.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, array, base, binary, bytestring, directory
+, fetchurl, QuickCheck, test-framework, test-framework-quickcheck2
+}:
+mkDerivation {
+  pname = "SHA";
+  version = "1.6.4.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ array base binary bytestring ];
+  executableHaskellDepends = [ base bytestring directory ];
+  testHaskellDepends = [
+    array base binary bytestring QuickCheck test-framework
+    test-framework-quickcheck2
+  ];
+  description = "Implementations of the SHA suite of message digest functions";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/Strafunski-StrategyLib.cabal b/test/golden-test-cases/Strafunski-StrategyLib.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Strafunski-StrategyLib.cabal
@@ -0,0 +1,59 @@
+name:                Strafunski-StrategyLib
+version:             5.0.0.10
+synopsis:            Library for strategic programming
+description:         This is a version of the StrategyLib library originally shipped with Strafunski, Cabalized and updated to newer versions of GHC. A description of much of StrategyLib can be found in the paper "Design Patterns for Functional Strategic Programming."
+license:             BSD3
+license-file:        LICENSE
+author:              Ralf Laemmel, Joost Visser
+maintainer:          darmanithird@gmail.com,alan.zimm@gmail.com
+category:            Generics
+build-type:          Simple
+cabal-version:       >=1.8
+
+source-repository head
+  type:              git
+  location:          https://github.com/jkoppel/Strafunski-StrategyLib
+
+
+library
+
+  Extensions:
+        OverlappingInstances,
+        FlexibleInstances,
+        FlexibleContexts,
+        UndecidableInstances,
+        MultiParamTypeClasses,
+        FunctionalDependencies,
+        Rank2Types
+
+  exposed-modules:
+        Control.Monad.Run,
+        Data.Generics.Strafunski.StrategyLib.ChaseImports,
+        Data.Generics.Strafunski.StrategyLib.ContainerTheme,
+        Data.Generics.Strafunski.StrategyLib.EffectTheme,
+        Data.Generics.Strafunski.StrategyLib.FixpointTheme,
+        Data.Generics.Strafunski.StrategyLib.FlowTheme,
+        Data.Generics.Strafunski.StrategyLib.KeyholeTheme,
+        Data.Generics.Strafunski.StrategyLib.MetricsTheme,
+        Data.Generics.Strafunski.StrategyLib.MonadicFunctions,
+        Data.Generics.Strafunski.StrategyLib.MoreMonoids,
+        Data.Generics.Strafunski.StrategyLib.NameTheme,
+        Data.Generics.Strafunski.StrategyLib.OverloadingTheme,
+        Data.Generics.Strafunski.StrategyLib.PathTheme,
+        Data.Generics.Strafunski.StrategyLib.RefactoringTheme,
+        Data.Generics.Strafunski.StrategyLib.StrategyInfix,
+        Data.Generics.Strafunski.StrategyLib.StrategyLib,
+        Data.Generics.Strafunski.StrategyLib.StrategyPrelude,
+        Data.Generics.Strafunski.StrategyLib.TraversalTheme,
+        Data.Generics.Strafunski.StrategyLib.Models.Deriving.StrategyPrimitives,
+        Data.Generics.Strafunski.StrategyLib.Models.Deriving.TermRep
+  
+--   other-modules:       
+
+  build-depends:
+        base > 4.4 && < 4.10,
+        mtl > 2.2,
+        syb > 0.3 && < 4.1,
+        directory > 1.1 && < 1.4,
+        transformers >= 0.2
+  
diff --git a/test/golden-test-cases/Strafunski-StrategyLib.nix.golden b/test/golden-test-cases/Strafunski-StrategyLib.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/Strafunski-StrategyLib.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, directory, fetchurl, mtl, syb, transformers
+}:
+mkDerivation {
+  pname = "Strafunski-StrategyLib";
+  version = "5.0.0.10";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base directory mtl syb transformers ];
+  description = "Library for strategic programming";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/accelerate-fftw.cabal b/test/golden-test-cases/accelerate-fftw.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/accelerate-fftw.cabal
@@ -0,0 +1,41 @@
+Name:             accelerate-fftw
+Version:          1.0
+License:          BSD3
+License-File:     LICENSE
+Author:           Henning Thielemann <haskell@henning-thielemann.de>
+Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
+Homepage:         http://hub.darcs.net/thielema/accelerate-fftw/
+Category:         Math
+Synopsis:         Accelerate frontend to the FFTW library (Fourier transform)
+Description:
+  An interface to the Fastest Fourier Transform in the West (FFTW)
+  for the @accelerate@ framework.
+Tested-With:      GHC==7.8.3
+Cabal-Version:    >=1.14
+Build-Type:       Simple
+
+Source-Repository this
+  Tag:         1.0
+  Type:        darcs
+  Location:    http://hub.darcs.net/thielema/accelerate-fftw/
+
+Source-Repository head
+  Type:        darcs
+  Location:    http://hub.darcs.net/thielema/accelerate-fftw/
+
+Library
+  Build-Depends:
+    fft >=0.1.7 && <0.2,
+    carray >=0.1.5 && <0.2,
+    storable-complex >=0.2.1 && <0.3,
+    accelerate-io >=1.0 && <1.1,
+    accelerate >=1.0 && <1.2,
+    base >=4.5 && <4.11
+
+  GHC-Options:      -Wall -fwarn-missing-import-lists
+  Hs-Source-Dirs:   src
+  Default-Language: Haskell98
+  Exposed-Modules:
+    Data.Array.Accelerate.FFTW.Manifest
+  Other-Modules:
+    Data.Array.Accelerate.CArray.Conversion
diff --git a/test/golden-test-cases/accelerate-fftw.nix.golden b/test/golden-test-cases/accelerate-fftw.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/accelerate-fftw.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, accelerate, accelerate-io, base, carray, fetchurl
+, fft, storable-complex
+}:
+mkDerivation {
+  pname = "accelerate-fftw";
+  version = "1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    accelerate accelerate-io base carray fft storable-complex
+  ];
+  homepage = "http://hub.darcs.net/thielema/accelerate-fftw/";
+  description = "Accelerate frontend to the FFTW library (Fourier transform)";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/accelerate.cabal b/test/golden-test-cases/accelerate.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/accelerate.cabal
@@ -0,0 +1,412 @@
+Name:                   accelerate
+Version:                1.1.1.0
+Cabal-version:          >= 1.8
+Tested-with:            GHC >= 7.8
+Build-type:             Simple
+
+Synopsis:               An embedded language for accelerated array processing
+
+Description:
+  @Data.Array.Accelerate@ defines an embedded array language for computations
+  for high-performance computing in Haskell. Computations on multi-dimensional,
+  regular arrays are expressed in the form of parameterised collective
+  operations, such as maps, reductions, and permutations. These computations may
+  then be online compiled and executed on a range of architectures.
+  .
+  [/A simple example/]
+  .
+  As a simple example, consider the computation of a dot product of two vectors
+  of floating point numbers:
+  .
+  > dotp :: Acc (Vector Float) -> Acc (Vector Float) -> Acc (Scalar Float)
+  > dotp xs ys = fold (+) 0 (zipWith (*) xs ys)
+  .
+  Except for the type, this code is almost the same as the corresponding Haskell
+  code on lists of floats. The types indicate that the computation may be
+  online-compiled for performance - for example, using
+  @Data.Array.Accelerate.LLVM.PTX@ it may be on-the-fly off-loaded to the GPU.
+  .
+  [/Additional components/]
+  .
+  The following supported add-ons are available as separate packages. Install
+  them from Hackage with @cabal install \<package\>@
+  .
+    * @accelerate-llvm-native@: Backend supporting parallel execution on
+      multicore CPUs.
+  .
+    * @accelerate-llvm-ptx@: Backend supporting parallel execution on
+      CUDA-capable NVIDIA GPUs. Requires a GPU with compute capability 2.0 or
+      greater. See the following table for supported GPUs:
+      <http://en.wikipedia.org/wiki/CUDA#Supported_GPUs>
+  .
+    * @accelerate-examples@: Computational kernels and applications showcasing
+      the use of Accelerate as well as a regression test suite, supporting
+      function and performance testing.
+  .
+    * @accelerate-io@: Fast conversions between Accelerate arrays and other
+      array formats (including vector and repa).
+  .
+    * @accelerate-fft@: Discrete Fourier transforms, with FFI bindings to
+      optimised implementations.
+  .
+    * @accelerate-bignum@: Fixed-width large integer arithmetic.
+  .
+    * @colour-accelerate@: Colour representations in Accelerate (RGB, sRGB, HSV,
+      and HSL).
+  .
+    * @gloss-accelerate@: Generate gloss pictures from Accelerate.
+  .
+    * @gloss-raster-accelerate@: Parallel rendering of raster images and
+      animations.
+  .
+    * @lens-accelerate@: Lens operators for Accelerate types.
+  .
+    * @linear-accelerate@: Linear vector spaces in Accelerate.
+  .
+    * @mwc-random-accelerate@: Generate Accelerate arrays filled with high
+      quality pseudorandom numbers.
+  .
+  [/Examples and documentation/]
+  .
+  Haddock documentation is included in the package
+  .
+  The @accelerate-examples@ package demonstrates a range of computational
+  kernels and several complete applications, including:
+  .
+    * An implementation of the Canny edge detection algorithm
+  .
+    * An interactive Mandelbrot set generator
+  .
+    * A particle-based simulation of stable fluid flows
+  .
+    * An /n/-body simulation of gravitational attraction between solid particles
+  .
+    * An implementation of the PageRank algorithm
+  .
+    * A simple interactive ray tracer
+  .
+    * A particle based simulation of stable fluid flows
+  .
+    * A cellular automata simulation
+  .
+    * A \"password recovery\" tool, for dictionary lookup of MD5 hashes
+  .
+  @lulesh-accelerate@ is an implementation of the Livermore Unstructured
+  Lagrangian Explicit Shock Hydrodynamics (LULESH) mini-app. LULESH represents a
+  typical hydrodynamics code such as ALE3D, but is highly simplified and
+  hard-coded to solve the Sedov blast problem on an unstructured hexahedron
+  mesh.
+  .
+  [/Mailing list and contacts/]
+  .
+    * Mailing list: <accelerate-haskell@googlegroups.com> (discussion of both
+      use and development welcome).
+  .
+    * Sign up for the mailing list here:
+      <http://groups.google.com/group/accelerate-haskell>
+  .
+    * Bug reports and issue tracking:
+      <https://github.com/AccelerateHS/accelerate/issues>
+  .
+
+License:                BSD3
+License-file:           LICENSE
+Author:                 Manuel M T Chakravarty,
+                        Robert Clifton-Everest,
+                        Gabriele Keller,
+                        Ben Lever,
+                        Trevor L. McDonell,
+                        Ryan Newtown,
+                        Sean Seefried
+Maintainer:             Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
+Homepage:               https://github.com/AccelerateHS/accelerate/
+Bug-reports:            https://github.com/AccelerateHS/accelerate/issues
+
+Category:               Compilers/Interpreters, Concurrency, Data, Parallelism
+Stability:              Experimental
+
+Extra-source-files:
+    README.md
+    CHANGELOG.md
+
+Flag debug
+  Default:              False
+  Description:
+    Enable debug tracing messages. The following options are read from the
+    environment variable @ACCELERATE_FLAGS@, and via the command-line as:
+    .
+      > ./program +ACC ... -ACC
+    .
+    Note that a backend may not implement (or be applicable to) all options.
+    .
+    The following flags control phases of the compiler. The are enabled with
+    @-f\<flag\>@ and can be reveresed with @-fno-\<flag\>@:
+    .
+      * @acc-sharing@: Enable sharing recovery of array expressions (True).
+    .
+      * @exp-sharing@: Enable sharing recovery of scalar expressions (True).
+    .
+      * @fusion@: Enable array fusion (True).
+    .
+      * @simplify@: Enable program simplification phase (True).
+    .
+      * @flush-cache@: Clear any persistent caches on program startup (False).
+    .
+      * @force-recomp@: Force recompilation of array programs (False).
+    .
+      * @fast-math@: Allow algebraically equivalent transformations which may
+        change floating point results (e.g., reassociate) (True).
+    .
+    The following options control debug message output, and are enabled with
+    @-d\<flag\>@.
+    .
+      * @verbose@: Be extra chatty.
+    .
+      * @dump-phases@: Print timing information about each phase of the compiler.
+        Enable GC stats (@+RTS -t@ or otherwise) for memory usage information.
+    .
+      * @dump-sharing@: Print information related to sharing recovery.
+    .
+      * @dump-simpl-stats@: Print statistics related to fusion & simplification.
+    .
+      * @dump-simpl-iterations@: Print a summary after each simplifier iteration.
+    .
+      * @dump-vectorisation@: Print information related to the vectoriser.
+    .
+      * @dump-dot@: Generate a representation of the program graph in Graphviz
+        DOT format.
+    .
+      * @dump-simpl-dot@: Generate a more compact representation of the program
+        graph in Graphviz DOT format. In particular, scalar expressions are
+        elided.
+    .
+      * @dump-gc@: Print information related to the Accelerate garbage
+        collector.
+    .
+      * @dump-gc-stats@: Print aggregate garbage collection information at the
+        end of program execution.
+    .
+      * @dubug-cc@: Include debug symbols in the generated and compiled kernels.
+    .
+      * @dump-cc@: Print information related to kernel code
+        generation/compilation. Print the generated code if @verbose@.
+    .
+      * @dump-ld@: Print information related to runtime linking.
+    .
+      * @dump-asm@: Print information related to kernel assembly. Print the
+        assembled code if @verbose@.
+    .
+      * @dump-exec@: Print information related to program execution.
+    .
+      * @dump-sched@: Print information related to execution scheduling.
+    .
+
+Flag ekg
+  Default:              False
+  Description:
+    Enable hooks for monitoring the running application using EKG. Implies
+    @debug@ mode. In order to view the metrics, your application will need to
+    call @Data.Array.Accelerate.Debug.beginMonitoring@ before running any
+    Accelerate computations. This will launch the server on the local machine at
+    port 8000.
+    .
+    Alternatively, if you wish to configure the EKG monitoring server you can
+    initialise it like so:
+    .
+    > import Data.Array.Accelerate.Debug
+    >
+    > import System.Metrics
+    > import System.Remote.Monitoring
+    >
+    > main :: IO ()
+    > main = do
+    >   store  <- initAccMetrics
+    >   registerGcMetrics store      -- optional
+    >
+    >   server <- forkServerWith store "localhost" 8000
+    >
+    >   ...
+    .
+    Note that, as with any program utilising EKG, in order to collect Haskell GC
+    statistics, you must either run the program with:
+    .
+    > +RTS -T -RTS
+    .
+    or compile it with:
+    .
+    > -with-rtsopts=-T
+    .
+
+Flag bounds-checks
+  Description:          Enable bounds checking
+  Default:              True
+
+Flag unsafe-checks
+  Description:          Enable bounds checking in unsafe operations
+  Default:              False
+
+Flag internal-checks
+  Description:          Enable internal consistency checks
+  Default:              False
+
+Library
+  Build-depends:
+          base                          >= 4.7 && < 4.11
+        , base-orphans                  >= 0.3
+        , containers                    >= 0.3
+        , deepseq                       >= 1.3
+        , directory                     >= 1.0
+        , exceptions                    >= 0.6
+        , fclabels                      >= 2.0
+        , filepath                      >= 1.0
+        , ghc-prim
+        , hashable                      >= 1.1
+        , hashtables                    >= 1.0
+        , mtl                           >= 2.0
+        , ansi-wl-pprint                >= 0.6
+        , template-haskell
+        , time                          >= 1.4
+        , transformers                  >= 0.3
+        , unique
+        , unordered-containers          >= 0.2
+
+  Exposed-modules:
+        -- The core language and reference implementation
+        Data.Array.Accelerate
+        Data.Array.Accelerate.Interpreter
+
+        -- Prelude-like
+        Data.Array.Accelerate.Data.Bits
+        Data.Array.Accelerate.Data.Complex
+        Data.Array.Accelerate.Data.Fold
+        Data.Array.Accelerate.Data.Monoid
+
+        -- For backend development
+        Data.Array.Accelerate.AST
+        Data.Array.Accelerate.Analysis.Hash
+        Data.Array.Accelerate.Analysis.Match
+        Data.Array.Accelerate.Analysis.Shape
+        Data.Array.Accelerate.Analysis.Stencil
+        Data.Array.Accelerate.Analysis.Type
+        Data.Array.Accelerate.Array.Data
+        Data.Array.Accelerate.Array.Remote
+        Data.Array.Accelerate.Array.Remote.Class
+        Data.Array.Accelerate.Array.Remote.LRU
+        Data.Array.Accelerate.Array.Remote.Table
+        Data.Array.Accelerate.Array.Representation
+        Data.Array.Accelerate.Array.Sugar
+        Data.Array.Accelerate.Array.Unique
+        Data.Array.Accelerate.Async
+        Data.Array.Accelerate.Debug
+        Data.Array.Accelerate.Error
+        Data.Array.Accelerate.FullList
+        Data.Array.Accelerate.Lifetime
+        Data.Array.Accelerate.Pretty
+        Data.Array.Accelerate.Product
+        Data.Array.Accelerate.Smart
+        Data.Array.Accelerate.Trafo
+        Data.Array.Accelerate.Type
+
+  Other-modules:
+        Data.Atomic
+        Data.Array.Accelerate.Analysis.Hash.TH
+        Data.Array.Accelerate.Array.Lifted
+        Data.Array.Accelerate.Array.Remote.Nursery
+        Data.Array.Accelerate.Classes
+        Data.Array.Accelerate.Classes.Bounded
+        Data.Array.Accelerate.Classes.Enum
+        Data.Array.Accelerate.Classes.Eq
+        Data.Array.Accelerate.Classes.Floating
+        Data.Array.Accelerate.Classes.Fractional
+        Data.Array.Accelerate.Classes.FromIntegral
+        Data.Array.Accelerate.Classes.Integral
+        Data.Array.Accelerate.Classes.Num
+        Data.Array.Accelerate.Classes.Ord
+        Data.Array.Accelerate.Classes.Real
+        Data.Array.Accelerate.Classes.RealFloat
+        Data.Array.Accelerate.Classes.RealFrac
+        Data.Array.Accelerate.Classes.ToFloating
+        Data.Array.Accelerate.Debug.Flags
+        Data.Array.Accelerate.Debug.Monitoring
+        Data.Array.Accelerate.Debug.Stats
+        Data.Array.Accelerate.Debug.Timed
+        Data.Array.Accelerate.Debug.Trace
+        Data.Array.Accelerate.Language
+        Data.Array.Accelerate.Lift
+        Data.Array.Accelerate.Prelude
+        Data.Array.Accelerate.Pretty.Graphviz
+        Data.Array.Accelerate.Pretty.Graphviz.Monad
+        Data.Array.Accelerate.Pretty.Graphviz.Type
+        Data.Array.Accelerate.Pretty.Print
+        Data.Array.Accelerate.Trafo.Algebra
+        Data.Array.Accelerate.Trafo.Base
+        Data.Array.Accelerate.Trafo.Fusion
+        Data.Array.Accelerate.Trafo.Rewrite
+        Data.Array.Accelerate.Trafo.Sharing
+        Data.Array.Accelerate.Trafo.Shrink
+        Data.Array.Accelerate.Trafo.Simplify
+        Data.Array.Accelerate.Trafo.Substitution
+        -- Data.Array.Accelerate.Trafo.Vectorise
+
+  c-sources:            cbits/atomic.c
+
+  if flag(debug) || flag(ekg)
+    cpp-options:        -DACCELERATE_DEBUG
+
+  if flag(ekg)
+    cpp-options:        -DACCELERATE_MONITORING
+    build-depends:
+          async                         >= 2.0
+        , ekg                           >= 0.1
+        , ekg-core                      >= 0.1
+        , text                          >= 1.0
+        , time                          >= 1.4
+
+  if flag(bounds-checks)
+    cpp-options:        -DACCELERATE_BOUNDS_CHECKS
+
+  if flag(unsafe-checks)
+    cpp-options:        -DACCELERATE_UNSAFE_CHECKS
+
+  if flag(internal-checks)
+    cpp-options:        -DACCELERATE_INTERNAL_CHECKS
+
+  if os(windows)
+    cpp-options:        -DWIN32
+    build-depends:      Win32
+  else
+    cpp-options:        -DUNIX
+    build-depends:      unix
+
+  ghc-options:          -O2 -Wall -funbox-strict-fields -fno-warn-name-shadowing
+  ghc-prof-options:     -caf-all -auto-all
+
+  if impl(ghc >= 7.0)
+    ghc-options:        -fspec-constr-count=25
+
+  if impl(ghc == 7.*)
+    ghc-options:        -fcontext-stack=35
+
+  if impl(ghc >= 8.0)
+    ghc-options:        -freduction-depth=35
+
+  if impl(ghc < 7.10)
+    build-depends:
+          th-lift-instances             >= 0.1
+
+  -- Don't add the extensions list here. Instead, place individual LANGUAGE
+  -- pragmas in the files that require a specific extension. This means the
+  -- project loads in GHCi, and avoids extension clashes.
+  --
+  -- Extensions:
+
+source-repository head
+  Type:                 git
+  Location:             git://github.com/AccelerateHS/accelerate.git
+
+source-repository this
+  Type:                 git
+  Tag:                  1.1.1.0
+  Location:             git://github.com/AccelerateHS/accelerate.git
+
+-- vim: nospell
diff --git a/test/golden-test-cases/accelerate.nix.golden b/test/golden-test-cases/accelerate.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/accelerate.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, ansi-wl-pprint, base, base-orphans, containers
+, deepseq, directory, exceptions, fclabels, fetchurl, filepath
+, ghc-prim, hashable, hashtables, mtl, template-haskell, time
+, transformers, unique, unix, unordered-containers
+}:
+mkDerivation {
+  pname = "accelerate";
+  version = "1.1.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    ansi-wl-pprint base base-orphans containers deepseq directory
+    exceptions fclabels filepath ghc-prim hashable hashtables mtl
+    template-haskell time transformers unique unix unordered-containers
+  ];
+  homepage = "https://github.com/AccelerateHS/accelerate/";
+  description = "An embedded language for accelerated array processing";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/active.cabal b/test/golden-test-cases/active.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/active.cabal
@@ -0,0 +1,44 @@
+name:                active
+version:             0.2.0.13
+synopsis:            Abstractions for animation
+description:         "Active" abstraction for animated things with finite start and end times.
+license:             BSD3
+license-file:        LICENSE
+author:              Brent Yorgey
+maintainer:          byorgey@gmail.com
+copyright:           (c) 2011-2015 Brent Yorgey
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:  CHANGES, README.markdown, diagrams/*.svg
+extra-doc-files:     diagrams/*.svg
+tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1
+bug-reports:         https://github.com/diagrams/active/issues
+source-repository head
+  type:     git
+  location: https://github.com/diagrams/active.git
+
+library
+  exposed-modules:     Data.Active
+  build-depends:       base >= 4.0 && < 4.11,
+                       vector >= 0.10,
+                       semigroups >= 0.1 && < 0.19,
+                       semigroupoids >= 1.2 && < 5.3,
+                       lens >= 4.0 && < 4.16,
+                       linear >= 1.14 && < 1.21
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+test-suite active-tests
+    type:              exitcode-stdio-1.0
+    main-is:           active-tests.hs
+    build-depends:     base >= 4.0 && < 4.10,
+                       vector >= 0.10,
+                       semigroups >= 0.1 && < 0.19,
+                       semigroupoids >= 1.2 && < 5.3,
+                       lens >= 4.0 && < 4.16,
+                       linear >= 1.14 && < 1.21,
+                       QuickCheck >= 2.9 && < 2.10
+    other-modules:     Data.Active
+    hs-source-dirs:    src, test
+    default-language:  Haskell2010
diff --git a/test/golden-test-cases/active.nix.golden b/test/golden-test-cases/active.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/active.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, fetchurl, lens, linear, QuickCheck
+, semigroupoids, semigroups, vector
+}:
+mkDerivation {
+  pname = "active";
+  version = "0.2.0.13";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base lens linear semigroupoids semigroups vector
+  ];
+  testHaskellDepends = [
+    base lens linear QuickCheck semigroupoids semigroups vector
+  ];
+  description = "Abstractions for animation";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/adjunctions.cabal b/test/golden-test-cases/adjunctions.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/adjunctions.cabal
@@ -0,0 +1,72 @@
+name:          adjunctions
+category:      Data Structures, Adjunctions
+version:       4.3
+license:       BSD3
+cabal-version: >= 1.6
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     provisional
+homepage:      http://github.com/ekmett/adjunctions/
+bug-reports:   http://github.com/ekmett/adjunctions/issues
+copyright:     Copyright (C) 2011-2014 Edward A. Kmett
+synopsis:      Adjunctions and representable functors
+description:   Adjunctions and representable functors
+build-type:    Simple
+extra-source-files:
+  .ghci
+  .gitignore
+  .travis.yml
+  .vim.custom
+  travis/cabal-apt-install
+  travis/config
+  HLint.hs
+  CHANGELOG.markdown
+  README.markdown
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/adjunctions.git
+
+library
+  hs-source-dirs: src
+
+  other-extensions:
+    CPP
+    FunctionalDependencies
+    FlexibleContexts
+    MultiParamTypeClasses
+    Rank2Types
+    UndecidableInstances
+
+  build-depends:
+    array               >= 0.3.0.2 && < 0.7,
+    base                >= 4       && < 5,
+    comonad             >= 4       && < 6,
+    containers          >= 0.3     && < 0.6,
+    contravariant       >= 1       && < 2,
+    distributive        >= 0.4     && < 1,
+    free                >= 4       && < 5,
+    mtl                 >= 2.0.1   && < 2.3,
+    profunctors         >= 4       && < 6,
+    tagged              >= 0.7     && < 1,
+    semigroupoids       >= 4       && < 6,
+    semigroups          >= 0.11    && < 1,
+    transformers        >= 0.2     && < 0.6,
+    transformers-compat >= 0.3     && < 1,
+    void                >= 0.5.5.1 && < 1
+
+  exposed-modules:
+    Control.Comonad.Representable.Store
+    Control.Comonad.Trans.Adjoint
+    Control.Monad.Representable.Reader
+    Control.Monad.Representable.State
+    Control.Monad.Trans.Adjoint
+    Control.Monad.Trans.Contravariant.Adjoint
+    Control.Monad.Trans.Conts
+    Data.Functor.Adjunction
+    Data.Functor.Contravariant.Adjunction
+    Data.Functor.Contravariant.Rep
+    Data.Functor.Rep
+
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/adjunctions.nix.golden b/test/golden-test-cases/adjunctions.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/adjunctions.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, array, base, comonad, containers, contravariant
+, distributive, fetchurl, free, mtl, profunctors, semigroupoids
+, semigroups, tagged, transformers, transformers-compat, void
+}:
+mkDerivation {
+  pname = "adjunctions";
+  version = "4.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base comonad containers contravariant distributive free mtl
+    profunctors semigroupoids semigroups tagged transformers
+    transformers-compat void
+  ];
+  homepage = "http://github.com/ekmett/adjunctions/";
+  description = "Adjunctions and representable functors";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/aeson-diff.cabal b/test/golden-test-cases/aeson-diff.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/aeson-diff.cabal
@@ -0,0 +1,118 @@
+name:                aeson-diff
+version:             1.1.0.4
+synopsis:            Extract and apply patches to JSON documents.
+description:
+  .
+  This is a small library for working with changes to JSON documents. It
+  includes a library and two command-line executables in the style of the
+  diff(1) and patch(1) commands available on many systems.
+  .
+homepage:            https://github.com/thsutton/aeson-diff
+license:             BSD3
+license-file:        LICENSE
+author:              Thomas Sutton
+maintainer:          me@thomas-sutton.id.au
+copyright:           (c) 2015 Thomas Sutton and others.
+category:            JSON, Web, Algorithms
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:  README.md
+                   , CHANGELOG.md
+                   , stack.yaml
+                   , test/data/rfc6902/*.json
+                   , test/data/rfc6902/*.txt
+                   , test/data/cases/*.json
+                   , test/data/cases/*.txt
+
+source-repository     HEAD
+  type: git
+  location: https://github.com/thsutton/aeson-diff
+
+library
+  default-language:    Haskell2010
+  hs-source-dirs:      lib
+  exposed-modules:     Data.Aeson.Diff
+                     , Data.Aeson.Patch
+                     , Data.Aeson.Pointer
+  build-depends:       base >=4.5 && <4.11
+                     , aeson
+                     , bytestring >= 0.10
+                     , edit-distance-vector
+                     , hashable
+                     , mtl
+                     , scientific
+                     , text
+                     , unordered-containers
+                     , vector
+
+executable             json-diff
+  default-language:    Haskell2010
+  hs-source-dirs:      src
+  main-is:             diff.hs
+  build-depends:       base
+                     , aeson
+                     , aeson-diff
+                     , bytestring
+                     , optparse-applicative
+                     , text
+
+executable             json-patch
+  default-language:    Haskell2010
+  hs-source-dirs:      src
+  main-is:             patch.hs
+  build-depends:       base
+                     , aeson
+                     , aeson-diff
+                     , bytestring
+                     , optparse-applicative
+
+test-suite             properties
+  default-language:    Haskell2010
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             properties.hs
+  build-depends:       base
+                     , QuickCheck
+                     , aeson
+                     , aeson-diff
+                     , bytestring
+                     , quickcheck-instances
+                     , text
+                     , unordered-containers
+                     , vector
+
+test-suite             examples
+  default-language:    Haskell2010
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             examples.hs
+  build-depends:       base
+                     , Glob
+                     , QuickCheck
+                     , aeson
+                     , aeson-diff
+                     , bytestring
+                     , directory
+                     , filepath
+                     , quickcheck-instances
+                     , text
+                     , unordered-containers
+                     , vector
+
+test-suite doctests
+  default-language:    Haskell2010
+  hs-source-dirs:      test
+  type:                exitcode-stdio-1.0
+  ghc-options:         -threaded
+  main-is:             doctests.hs
+  build-depends:       base
+                     , QuickCheck
+                     , doctest >= 0.9
+
+test-suite             hlint-check
+  default-language:    Haskell2010
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             hlint-check.hs
+  build-depends:       base
+                     , hlint
diff --git a/test/golden-test-cases/aeson-diff.nix.golden b/test/golden-test-cases/aeson-diff.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/aeson-diff.nix.golden
@@ -0,0 +1,29 @@
+{ mkDerivation, aeson, base, bytestring, directory, doctest
+, edit-distance-vector, fetchurl, filepath, Glob, hashable, hlint
+, mtl, optparse-applicative, QuickCheck, quickcheck-instances
+, scientific, text, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "aeson-diff";
+  version = "1.1.0.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base bytestring edit-distance-vector hashable mtl scientific
+    text unordered-containers vector
+  ];
+  executableHaskellDepends = [
+    aeson base bytestring optparse-applicative text
+  ];
+  testHaskellDepends = [
+    aeson base bytestring directory doctest filepath Glob hlint
+    QuickCheck quickcheck-instances text unordered-containers vector
+  ];
+  homepage = "https://github.com/thsutton/aeson-diff";
+  description = "Extract and apply patches to JSON documents";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/aeson-pretty.cabal b/test/golden-test-cases/aeson-pretty.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/aeson-pretty.cabal
@@ -0,0 +1,74 @@
+name:           aeson-pretty
+version:        0.8.5
+license:        BSD3
+license-file:   LICENSE
+category:       Text, Web, JSON, Pretty Printer
+copyright:      Copyright 2011 Falko Peters
+author:         Falko Peters <falko.peters@gmail.com>
+maintainer:     Falko Peters <falko.peters@gmail.com>
+stability:      experimental
+cabal-version:  >= 1.8
+homepage:       http://github.com/informatikr/aeson-pretty
+bug-reports:    http://github.com/informatikr/aeson-pretty/issues
+build-type:     Simple
+synopsis:       JSON pretty-printing library and command-line tool.
+description:
+    A JSON pretty-printing library compatible with aeson as well as
+    a command-line tool to improve readabilty of streams of JSON data.
+    .
+    The /library/ provides the function "encodePretty". It is a drop-in
+    replacement for aeson's "encode" function, producing JSON-ByteStrings for
+    human readers.
+    .
+    The /command-line tool/ reads JSON from stdin and writes prettified JSON
+    to stdout. It also offers a complementary "compact"-mode, essentially the
+    opposite of pretty-printing. If you specify @-flib-only@ like this
+    .
+        > cabal install -flib-only aeson-pretty
+    .
+    the command-line tool will NOT be installed.
+
+extra-source-files:
+    README.markdown
+
+flag lib-only
+    description: Only build/install the library, NOT the command-line tool.
+    default: False
+
+library
+    exposed-modules:
+        Data.Aeson.Encode.Pretty
+
+    build-depends:
+        aeson >= 0.7,
+        base >= 4.5,
+        base-compat >= 0.9 && < 0.10,
+        bytestring >= 0.9,
+        scientific >= 0.3,
+        vector >= 0.9,
+        text >= 0.11,
+        unordered-containers >= 0.1.3.0
+
+    ghc-options: -Wall
+
+executable aeson-pretty
+    hs-source-dirs: cli-tool
+    main-is: Main.hs
+
+    if flag(lib-only)
+        buildable: False
+    else
+        build-depends:
+            aeson >= 0.6,
+            aeson-pretty,
+            attoparsec >= 0.10,
+            base == 4.*,
+            bytestring >= 0.9,
+            cmdargs >= 0.7
+
+    ghc-options: -Wall
+    ghc-prof-options: -auto-all
+
+source-repository head
+    type:     git
+    location: http://github.com/informatikr/aeson-pretty
diff --git a/test/golden-test-cases/aeson-pretty.nix.golden b/test/golden-test-cases/aeson-pretty.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/aeson-pretty.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, aeson, attoparsec, base, base-compat, bytestring
+, cmdargs, fetchurl, scientific, text, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "aeson-pretty";
+  version = "0.8.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base base-compat bytestring scientific text
+    unordered-containers vector
+  ];
+  executableHaskellDepends = [
+    aeson attoparsec base bytestring cmdargs
+  ];
+  homepage = "http://github.com/informatikr/aeson-pretty";
+  description = "JSON pretty-printing library and command-line tool";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/algebraic-graphs.cabal b/test/golden-test-cases/algebraic-graphs.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/algebraic-graphs.cabal
@@ -0,0 +1,142 @@
+name:          algebraic-graphs
+version:       0.0.5
+synopsis:      A library for algebraic graph construction and transformation
+license:       MIT
+license-file:  LICENSE
+author:        Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
+maintainer:    Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
+copyright:     Andrey Mokhov, 2016-2017
+homepage:      https://github.com/snowleopard/alga
+category:      Algebra, Algorithms, Data Structures, Graphs
+build-type:    Simple
+cabal-version: >=1.18
+tested-with:   GHC==8.0.2
+stability:     experimental
+description:
+    <https://github.com/snowleopard/alga Alga> is a library for algebraic construction and
+    manipulation of graphs in Haskell. See <https://github.com/snowleopard/alga-paper this paper>
+    for the motivation behind the library, the underlying theory and implementation details.
+    .
+    The top-level module
+    <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph.html Algebra.Graph>
+    defines the core data type
+    <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph.html#t:Graph Graph>,
+    which is a deep embedding of four graph construction primitives /empty/,
+    /vertex/, /overlay/ and /connect/. More conventional graph representations can be found in
+    <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-AdjacencyMap.html Algebra.Graph.AdjacencyMap>
+    and
+    <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Relation.html Algebra.Graph.Relation>.
+    .
+    The type classes defined in
+    <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Class.html Algebra.Graph.Class>
+    and
+    <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-HigherKinded-Class.html Algebra.Graph.HigherKinded.Class>
+    can be used for polymorphic graph construction and manipulation. Also see
+    <http://hackage.haskell.org/package/algebraic-graphs/docs/Algebra-Graph-Fold.html Algebra.Graph.Fold>
+    that defines the Boehm-Berarducci encoding of algebraic graphs and provides additional
+    flexibility for polymorphic graph manipulation.
+    .
+    This is an experimental library and the API will be unstable until version 1.0.0. Please
+    consider contributing to the on-going
+    <https://github.com/snowleopard/alga/issues discussions on the library API>.
+
+extra-doc-files:
+    CHANGES.md
+    README.md
+
+source-repository head
+    type:     git
+    location: https://github.com/snowleopard/alga.git
+
+library
+    hs-source-dirs:     src
+    exposed-modules:    Algebra.Graph,
+                        Algebra.Graph.AdjacencyMap,
+                        Algebra.Graph.AdjacencyMap.Internal,
+                        Algebra.Graph.Class,
+                        Algebra.Graph.Export,
+                        Algebra.Graph.Export.Dot,
+                        Algebra.Graph.Fold,
+                        Algebra.Graph.HigherKinded.Class,
+                        Algebra.Graph.IntAdjacencyMap,
+                        Algebra.Graph.IntAdjacencyMap.Internal,
+                        Algebra.Graph.Relation,
+                        Algebra.Graph.Relation.Internal,
+                        Algebra.Graph.Relation.InternalDerived,
+                        Algebra.Graph.Relation.Preorder,
+                        Algebra.Graph.Relation.Reflexive,
+                        Algebra.Graph.Relation.Symmetric,
+                        Algebra.Graph.Relation.Transitive
+    build-depends:      array      >= 0.5 && < 0.8,
+                        base       >= 4.9 && < 5,
+                        containers >= 0.5 && < 0.8
+    default-language:   Haskell2010
+    default-extensions: FlexibleContexts
+                        GeneralizedNewtypeDeriving
+                        ScopedTypeVariables
+                        TupleSections
+                        TypeFamilies
+    other-extensions:   DeriveFoldable
+                        DeriveFunctor
+                        DeriveTraversable
+                        OverloadedStrings
+                        RecordWildCards
+    GHC-options:        -Wall
+                        -Wcompat
+                        -Wincomplete-record-updates
+                        -Wincomplete-uni-patterns
+                        -Wredundant-constraints
+
+test-suite test-alga
+    hs-source-dirs:     test
+    type:               exitcode-stdio-1.0
+    main-is:            Main.hs
+    other-modules:      Algebra.Graph.Test,
+                        Algebra.Graph.Test.API,
+                        Algebra.Graph.Test.AdjacencyMap,
+                        Algebra.Graph.Test.Arbitrary,
+                        Algebra.Graph.Test.Export,
+                        Algebra.Graph.Test.Fold,
+                        Algebra.Graph.Test.Generic,
+                        Algebra.Graph.Test.Graph,
+                        Algebra.Graph.Test.IntAdjacencyMap,
+                        Algebra.Graph.Test.Relation
+    build-depends:      algebraic-graphs,
+                        base       >= 4.9,
+                        containers >= 0.5,
+                        extra      >= 1.5,
+                        QuickCheck >= 2.9
+    default-language:   Haskell2010
+    GHC-options:        -O2
+                        -Wall
+                        -Wcompat
+                        -Wincomplete-record-updates
+                        -Wincomplete-uni-patterns
+                        -Wredundant-constraints
+    default-extensions: FlexibleContexts
+                        GeneralizedNewtypeDeriving
+                        TypeFamilies
+                        ScopedTypeVariables
+    other-extensions:   ConstrainedClassMethods
+                        ConstraintKinds
+                        RankNTypes
+                        ViewPatterns
+
+benchmark benchmark-alga
+    hs-source-dirs:     bench
+    type:               exitcode-stdio-1.0
+    main-is:            Bench.hs
+    build-depends:      algebraic-graphs,
+                        base       >= 4.9,
+                        containers >= 0.5,
+                        criterion  >= 1.1
+    default-language:   Haskell2010
+    GHC-options:        -O2
+                        -Wall
+                        -Wcompat
+                        -Wincomplete-record-updates
+                        -Wincomplete-uni-patterns
+                        -Wredundant-constraints
+    default-extensions: FlexibleContexts
+                        TypeFamilies
+                        ScopedTypeVariables
diff --git a/test/golden-test-cases/algebraic-graphs.nix.golden b/test/golden-test-cases/algebraic-graphs.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/algebraic-graphs.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, array, base, containers, criterion, extra, fetchurl
+, QuickCheck
+}:
+mkDerivation {
+  pname = "algebraic-graphs";
+  version = "0.0.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ array base containers ];
+  testHaskellDepends = [ base containers extra QuickCheck ];
+  benchmarkHaskellDepends = [ base containers criterion ];
+  homepage = "https://github.com/snowleopard/alga";
+  description = "A library for algebraic graph construction and transformation";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/amazonka-cloudtrail.cabal b/test/golden-test-cases/amazonka-cloudtrail.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-cloudtrail.cabal
@@ -0,0 +1,99 @@
+name:                  amazonka-cloudtrail
+version:               1.5.0
+synopsis:              Amazon CloudTrail SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.CloudTrail" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-cloudtrail
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.CloudTrail
+        , Network.AWS.CloudTrail.AddTags
+        , Network.AWS.CloudTrail.CreateTrail
+        , Network.AWS.CloudTrail.DeleteTrail
+        , Network.AWS.CloudTrail.DescribeTrails
+        , Network.AWS.CloudTrail.GetEventSelectors
+        , Network.AWS.CloudTrail.GetTrailStatus
+        , Network.AWS.CloudTrail.ListPublicKeys
+        , Network.AWS.CloudTrail.ListTags
+        , Network.AWS.CloudTrail.LookupEvents
+        , Network.AWS.CloudTrail.PutEventSelectors
+        , Network.AWS.CloudTrail.RemoveTags
+        , Network.AWS.CloudTrail.StartLogging
+        , Network.AWS.CloudTrail.StopLogging
+        , Network.AWS.CloudTrail.Types
+        , Network.AWS.CloudTrail.UpdateTrail
+        , Network.AWS.CloudTrail.Waiters
+
+    other-modules:
+          Network.AWS.CloudTrail.Types.Product
+        , Network.AWS.CloudTrail.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-cloudtrail-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.CloudTrail
+        , Test.AWS.Gen.CloudTrail
+        , Test.AWS.CloudTrail.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-cloudtrail
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-cloudtrail.nix.golden b/test/golden-test-cases/amazonka-cloudtrail.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-cloudtrail.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-cloudtrail";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon CloudTrail SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-cloudwatch-logs.cabal b/test/golden-test-cases/amazonka-cloudwatch-logs.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-cloudwatch-logs.cabal
@@ -0,0 +1,118 @@
+name:                  amazonka-cloudwatch-logs
+version:               1.5.0
+synopsis:              Amazon CloudWatch Logs SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.CloudWatchLogs" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-cloudwatch-logs
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.CloudWatchLogs
+        , Network.AWS.CloudWatchLogs.AssociateKMSKey
+        , Network.AWS.CloudWatchLogs.CancelExportTask
+        , Network.AWS.CloudWatchLogs.CreateExportTask
+        , Network.AWS.CloudWatchLogs.CreateLogGroup
+        , Network.AWS.CloudWatchLogs.CreateLogStream
+        , Network.AWS.CloudWatchLogs.DeleteDestination
+        , Network.AWS.CloudWatchLogs.DeleteLogGroup
+        , Network.AWS.CloudWatchLogs.DeleteLogStream
+        , Network.AWS.CloudWatchLogs.DeleteMetricFilter
+        , Network.AWS.CloudWatchLogs.DeleteResourcePolicy
+        , Network.AWS.CloudWatchLogs.DeleteRetentionPolicy
+        , Network.AWS.CloudWatchLogs.DeleteSubscriptionFilter
+        , Network.AWS.CloudWatchLogs.DescribeDestinations
+        , Network.AWS.CloudWatchLogs.DescribeExportTasks
+        , Network.AWS.CloudWatchLogs.DescribeLogGroups
+        , Network.AWS.CloudWatchLogs.DescribeLogStreams
+        , Network.AWS.CloudWatchLogs.DescribeMetricFilters
+        , Network.AWS.CloudWatchLogs.DescribeResourcePolicies
+        , Network.AWS.CloudWatchLogs.DescribeSubscriptionFilters
+        , Network.AWS.CloudWatchLogs.DisassociateKMSKey
+        , Network.AWS.CloudWatchLogs.FilterLogEvents
+        , Network.AWS.CloudWatchLogs.GetLogEvents
+        , Network.AWS.CloudWatchLogs.ListTagsLogGroup
+        , Network.AWS.CloudWatchLogs.PutDestination
+        , Network.AWS.CloudWatchLogs.PutDestinationPolicy
+        , Network.AWS.CloudWatchLogs.PutLogEvents
+        , Network.AWS.CloudWatchLogs.PutMetricFilter
+        , Network.AWS.CloudWatchLogs.PutResourcePolicy
+        , Network.AWS.CloudWatchLogs.PutRetentionPolicy
+        , Network.AWS.CloudWatchLogs.PutSubscriptionFilter
+        , Network.AWS.CloudWatchLogs.TagLogGroup
+        , Network.AWS.CloudWatchLogs.TestMetricFilter
+        , Network.AWS.CloudWatchLogs.Types
+        , Network.AWS.CloudWatchLogs.UntagLogGroup
+        , Network.AWS.CloudWatchLogs.Waiters
+
+    other-modules:
+          Network.AWS.CloudWatchLogs.Types.Product
+        , Network.AWS.CloudWatchLogs.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-cloudwatch-logs-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.CloudWatchLogs
+        , Test.AWS.Gen.CloudWatchLogs
+        , Test.AWS.CloudWatchLogs.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-cloudwatch-logs
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-cloudwatch-logs.nix.golden b/test/golden-test-cases/amazonka-cloudwatch-logs.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-cloudwatch-logs.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-cloudwatch-logs";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon CloudWatch Logs SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-codedeploy.cabal b/test/golden-test-cases/amazonka-codedeploy.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-codedeploy.cabal
@@ -0,0 +1,123 @@
+name:                  amazonka-codedeploy
+version:               1.5.0
+synopsis:              Amazon CodeDeploy SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.CodeDeploy" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-codedeploy
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.CodeDeploy
+        , Network.AWS.CodeDeploy.AddTagsToOnPremisesInstances
+        , Network.AWS.CodeDeploy.BatchGetApplicationRevisions
+        , Network.AWS.CodeDeploy.BatchGetApplications
+        , Network.AWS.CodeDeploy.BatchGetDeploymentGroups
+        , Network.AWS.CodeDeploy.BatchGetDeploymentInstances
+        , Network.AWS.CodeDeploy.BatchGetDeployments
+        , Network.AWS.CodeDeploy.BatchGetOnPremisesInstances
+        , Network.AWS.CodeDeploy.ContinueDeployment
+        , Network.AWS.CodeDeploy.CreateApplication
+        , Network.AWS.CodeDeploy.CreateDeployment
+        , Network.AWS.CodeDeploy.CreateDeploymentConfig
+        , Network.AWS.CodeDeploy.CreateDeploymentGroup
+        , Network.AWS.CodeDeploy.DeleteApplication
+        , Network.AWS.CodeDeploy.DeleteDeploymentConfig
+        , Network.AWS.CodeDeploy.DeleteDeploymentGroup
+        , Network.AWS.CodeDeploy.DeregisterOnPremisesInstance
+        , Network.AWS.CodeDeploy.GetApplication
+        , Network.AWS.CodeDeploy.GetApplicationRevision
+        , Network.AWS.CodeDeploy.GetDeployment
+        , Network.AWS.CodeDeploy.GetDeploymentConfig
+        , Network.AWS.CodeDeploy.GetDeploymentGroup
+        , Network.AWS.CodeDeploy.GetDeploymentInstance
+        , Network.AWS.CodeDeploy.GetOnPremisesInstance
+        , Network.AWS.CodeDeploy.ListApplicationRevisions
+        , Network.AWS.CodeDeploy.ListApplications
+        , Network.AWS.CodeDeploy.ListDeploymentConfigs
+        , Network.AWS.CodeDeploy.ListDeploymentGroups
+        , Network.AWS.CodeDeploy.ListDeploymentInstances
+        , Network.AWS.CodeDeploy.ListDeployments
+        , Network.AWS.CodeDeploy.ListGitHubAccountTokenNames
+        , Network.AWS.CodeDeploy.ListOnPremisesInstances
+        , Network.AWS.CodeDeploy.RegisterApplicationRevision
+        , Network.AWS.CodeDeploy.RegisterOnPremisesInstance
+        , Network.AWS.CodeDeploy.RemoveTagsFromOnPremisesInstances
+        , Network.AWS.CodeDeploy.SkipWaitTimeForInstanceTermination
+        , Network.AWS.CodeDeploy.StopDeployment
+        , Network.AWS.CodeDeploy.Types
+        , Network.AWS.CodeDeploy.UpdateApplication
+        , Network.AWS.CodeDeploy.UpdateDeploymentGroup
+        , Network.AWS.CodeDeploy.Waiters
+
+    other-modules:
+          Network.AWS.CodeDeploy.Types.Product
+        , Network.AWS.CodeDeploy.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-codedeploy-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.CodeDeploy
+        , Test.AWS.Gen.CodeDeploy
+        , Test.AWS.CodeDeploy.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-codedeploy
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-codedeploy.nix.golden b/test/golden-test-cases/amazonka-codedeploy.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-codedeploy.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-codedeploy";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon CodeDeploy SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-cognito-idp.cabal b/test/golden-test-cases/amazonka-cognito-idp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-cognito-idp.cabal
@@ -0,0 +1,168 @@
+name:                  amazonka-cognito-idp
+version:               1.5.0
+synopsis:              Amazon Cognito Identity Provider SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.CognitoIdentityProvider" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-cognito-idp
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.CognitoIdentityProvider
+        , Network.AWS.CognitoIdentityProvider.AddCustomAttributes
+        , Network.AWS.CognitoIdentityProvider.AdminAddUserToGroup
+        , Network.AWS.CognitoIdentityProvider.AdminConfirmSignUp
+        , Network.AWS.CognitoIdentityProvider.AdminCreateUser
+        , Network.AWS.CognitoIdentityProvider.AdminDeleteUser
+        , Network.AWS.CognitoIdentityProvider.AdminDeleteUserAttributes
+        , Network.AWS.CognitoIdentityProvider.AdminDisableProviderForUser
+        , Network.AWS.CognitoIdentityProvider.AdminDisableUser
+        , Network.AWS.CognitoIdentityProvider.AdminEnableUser
+        , Network.AWS.CognitoIdentityProvider.AdminForgetDevice
+        , Network.AWS.CognitoIdentityProvider.AdminGetDevice
+        , Network.AWS.CognitoIdentityProvider.AdminGetUser
+        , Network.AWS.CognitoIdentityProvider.AdminInitiateAuth
+        , Network.AWS.CognitoIdentityProvider.AdminLinkProviderForUser
+        , Network.AWS.CognitoIdentityProvider.AdminListDevices
+        , Network.AWS.CognitoIdentityProvider.AdminListGroupsForUser
+        , Network.AWS.CognitoIdentityProvider.AdminRemoveUserFromGroup
+        , Network.AWS.CognitoIdentityProvider.AdminResetUserPassword
+        , Network.AWS.CognitoIdentityProvider.AdminRespondToAuthChallenge
+        , Network.AWS.CognitoIdentityProvider.AdminSetUserSettings
+        , Network.AWS.CognitoIdentityProvider.AdminUpdateDeviceStatus
+        , Network.AWS.CognitoIdentityProvider.AdminUpdateUserAttributes
+        , Network.AWS.CognitoIdentityProvider.AdminUserGlobalSignOut
+        , Network.AWS.CognitoIdentityProvider.ChangePassword
+        , Network.AWS.CognitoIdentityProvider.ConfirmDevice
+        , Network.AWS.CognitoIdentityProvider.ConfirmForgotPassword
+        , Network.AWS.CognitoIdentityProvider.ConfirmSignUp
+        , Network.AWS.CognitoIdentityProvider.CreateGroup
+        , Network.AWS.CognitoIdentityProvider.CreateIdentityProvider
+        , Network.AWS.CognitoIdentityProvider.CreateResourceServer
+        , Network.AWS.CognitoIdentityProvider.CreateUserImportJob
+        , Network.AWS.CognitoIdentityProvider.CreateUserPool
+        , Network.AWS.CognitoIdentityProvider.CreateUserPoolClient
+        , Network.AWS.CognitoIdentityProvider.CreateUserPoolDomain
+        , Network.AWS.CognitoIdentityProvider.DeleteGroup
+        , Network.AWS.CognitoIdentityProvider.DeleteIdentityProvider
+        , Network.AWS.CognitoIdentityProvider.DeleteResourceServer
+        , Network.AWS.CognitoIdentityProvider.DeleteUser
+        , Network.AWS.CognitoIdentityProvider.DeleteUserAttributes
+        , Network.AWS.CognitoIdentityProvider.DeleteUserPool
+        , Network.AWS.CognitoIdentityProvider.DeleteUserPoolClient
+        , Network.AWS.CognitoIdentityProvider.DeleteUserPoolDomain
+        , Network.AWS.CognitoIdentityProvider.DescribeIdentityProvider
+        , Network.AWS.CognitoIdentityProvider.DescribeResourceServer
+        , Network.AWS.CognitoIdentityProvider.DescribeUserImportJob
+        , Network.AWS.CognitoIdentityProvider.DescribeUserPool
+        , Network.AWS.CognitoIdentityProvider.DescribeUserPoolClient
+        , Network.AWS.CognitoIdentityProvider.DescribeUserPoolDomain
+        , Network.AWS.CognitoIdentityProvider.ForgetDevice
+        , Network.AWS.CognitoIdentityProvider.ForgotPassword
+        , Network.AWS.CognitoIdentityProvider.GetCSVHeader
+        , Network.AWS.CognitoIdentityProvider.GetDevice
+        , Network.AWS.CognitoIdentityProvider.GetGroup
+        , Network.AWS.CognitoIdentityProvider.GetIdentityProviderByIdentifier
+        , Network.AWS.CognitoIdentityProvider.GetUICustomization
+        , Network.AWS.CognitoIdentityProvider.GetUser
+        , Network.AWS.CognitoIdentityProvider.GetUserAttributeVerificationCode
+        , Network.AWS.CognitoIdentityProvider.GlobalSignOut
+        , Network.AWS.CognitoIdentityProvider.InitiateAuth
+        , Network.AWS.CognitoIdentityProvider.ListDevices
+        , Network.AWS.CognitoIdentityProvider.ListGroups
+        , Network.AWS.CognitoIdentityProvider.ListIdentityProviders
+        , Network.AWS.CognitoIdentityProvider.ListResourceServers
+        , Network.AWS.CognitoIdentityProvider.ListUserImportJobs
+        , Network.AWS.CognitoIdentityProvider.ListUserPoolClients
+        , Network.AWS.CognitoIdentityProvider.ListUserPools
+        , Network.AWS.CognitoIdentityProvider.ListUsers
+        , Network.AWS.CognitoIdentityProvider.ListUsersInGroup
+        , Network.AWS.CognitoIdentityProvider.ResendConfirmationCode
+        , Network.AWS.CognitoIdentityProvider.RespondToAuthChallenge
+        , Network.AWS.CognitoIdentityProvider.SetUICustomization
+        , Network.AWS.CognitoIdentityProvider.SetUserSettings
+        , Network.AWS.CognitoIdentityProvider.SignUp
+        , Network.AWS.CognitoIdentityProvider.StartUserImportJob
+        , Network.AWS.CognitoIdentityProvider.StopUserImportJob
+        , Network.AWS.CognitoIdentityProvider.Types
+        , Network.AWS.CognitoIdentityProvider.UpdateDeviceStatus
+        , Network.AWS.CognitoIdentityProvider.UpdateGroup
+        , Network.AWS.CognitoIdentityProvider.UpdateIdentityProvider
+        , Network.AWS.CognitoIdentityProvider.UpdateResourceServer
+        , Network.AWS.CognitoIdentityProvider.UpdateUserAttributes
+        , Network.AWS.CognitoIdentityProvider.UpdateUserPool
+        , Network.AWS.CognitoIdentityProvider.UpdateUserPoolClient
+        , Network.AWS.CognitoIdentityProvider.VerifyUserAttribute
+        , Network.AWS.CognitoIdentityProvider.Waiters
+
+    other-modules:
+          Network.AWS.CognitoIdentityProvider.Types.Product
+        , Network.AWS.CognitoIdentityProvider.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-cognito-idp-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.CognitoIdentityProvider
+        , Test.AWS.Gen.CognitoIdentityProvider
+        , Test.AWS.CognitoIdentityProvider.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-cognito-idp
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-cognito-idp.nix.golden b/test/golden-test-cases/amazonka-cognito-idp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-cognito-idp.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-cognito-idp";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon Cognito Identity Provider SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-ecs.cabal b/test/golden-test-cases/amazonka-ecs.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-ecs.cabal
@@ -0,0 +1,116 @@
+name:                  amazonka-ecs
+version:               1.5.0
+synopsis:              Amazon EC2 Container Service SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.ECS" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-ecs
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.ECS
+        , Network.AWS.ECS.CreateCluster
+        , Network.AWS.ECS.CreateService
+        , Network.AWS.ECS.DeleteAttributes
+        , Network.AWS.ECS.DeleteCluster
+        , Network.AWS.ECS.DeleteService
+        , Network.AWS.ECS.DeregisterContainerInstance
+        , Network.AWS.ECS.DeregisterTaskDefinition
+        , Network.AWS.ECS.DescribeClusters
+        , Network.AWS.ECS.DescribeContainerInstances
+        , Network.AWS.ECS.DescribeServices
+        , Network.AWS.ECS.DescribeTaskDefinition
+        , Network.AWS.ECS.DescribeTasks
+        , Network.AWS.ECS.DiscoverPollEndpoint
+        , Network.AWS.ECS.ListAttributes
+        , Network.AWS.ECS.ListClusters
+        , Network.AWS.ECS.ListContainerInstances
+        , Network.AWS.ECS.ListServices
+        , Network.AWS.ECS.ListTaskDefinitionFamilies
+        , Network.AWS.ECS.ListTaskDefinitions
+        , Network.AWS.ECS.ListTasks
+        , Network.AWS.ECS.PutAttributes
+        , Network.AWS.ECS.RegisterContainerInstance
+        , Network.AWS.ECS.RegisterTaskDefinition
+        , Network.AWS.ECS.RunTask
+        , Network.AWS.ECS.StartTask
+        , Network.AWS.ECS.StopTask
+        , Network.AWS.ECS.SubmitContainerStateChange
+        , Network.AWS.ECS.SubmitTaskStateChange
+        , Network.AWS.ECS.Types
+        , Network.AWS.ECS.UpdateContainerAgent
+        , Network.AWS.ECS.UpdateContainerInstancesState
+        , Network.AWS.ECS.UpdateService
+        , Network.AWS.ECS.Waiters
+
+    other-modules:
+          Network.AWS.ECS.Types.Product
+        , Network.AWS.ECS.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-ecs-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.ECS
+        , Test.AWS.Gen.ECS
+        , Test.AWS.ECS.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-ecs
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-ecs.nix.golden b/test/golden-test-cases/amazonka-ecs.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-ecs.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-ecs";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon EC2 Container Service SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-kms.cabal b/test/golden-test-cases/amazonka-kms.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-kms.cabal
@@ -0,0 +1,120 @@
+name:                  amazonka-kms
+version:               1.5.0
+synopsis:              Amazon Key Management Service SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.KMS" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-kms
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.KMS
+        , Network.AWS.KMS.CancelKeyDeletion
+        , Network.AWS.KMS.CreateAlias
+        , Network.AWS.KMS.CreateGrant
+        , Network.AWS.KMS.CreateKey
+        , Network.AWS.KMS.Decrypt
+        , Network.AWS.KMS.DeleteAlias
+        , Network.AWS.KMS.DeleteImportedKeyMaterial
+        , Network.AWS.KMS.DescribeKey
+        , Network.AWS.KMS.DisableKey
+        , Network.AWS.KMS.DisableKeyRotation
+        , Network.AWS.KMS.EnableKey
+        , Network.AWS.KMS.EnableKeyRotation
+        , Network.AWS.KMS.Encrypt
+        , Network.AWS.KMS.GenerateDataKey
+        , Network.AWS.KMS.GenerateDataKeyWithoutPlaintext
+        , Network.AWS.KMS.GenerateRandom
+        , Network.AWS.KMS.GetKeyPolicy
+        , Network.AWS.KMS.GetKeyRotationStatus
+        , Network.AWS.KMS.GetParametersForImport
+        , Network.AWS.KMS.ImportKeyMaterial
+        , Network.AWS.KMS.ListAliases
+        , Network.AWS.KMS.ListGrants
+        , Network.AWS.KMS.ListKeyPolicies
+        , Network.AWS.KMS.ListKeys
+        , Network.AWS.KMS.ListResourceTags
+        , Network.AWS.KMS.ListRetirableGrants
+        , Network.AWS.KMS.PutKeyPolicy
+        , Network.AWS.KMS.ReEncrypt
+        , Network.AWS.KMS.RetireGrant
+        , Network.AWS.KMS.RevokeGrant
+        , Network.AWS.KMS.ScheduleKeyDeletion
+        , Network.AWS.KMS.TagResource
+        , Network.AWS.KMS.Types
+        , Network.AWS.KMS.UntagResource
+        , Network.AWS.KMS.UpdateAlias
+        , Network.AWS.KMS.UpdateKeyDescription
+        , Network.AWS.KMS.Waiters
+
+    other-modules:
+          Network.AWS.KMS.Types.Product
+        , Network.AWS.KMS.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-kms-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.KMS
+        , Test.AWS.Gen.KMS
+        , Test.AWS.KMS.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-kms
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-kms.nix.golden b/test/golden-test-cases/amazonka-kms.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-kms.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-kms";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon Key Management Service SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-lightsail.cabal b/test/golden-test-cases/amazonka-lightsail.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-lightsail.cabal
@@ -0,0 +1,133 @@
+name:                  amazonka-lightsail
+version:               1.5.0
+synopsis:              Amazon Lightsail SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.Lightsail" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-lightsail
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.Lightsail
+        , Network.AWS.Lightsail.AllocateStaticIP
+        , Network.AWS.Lightsail.AttachStaticIP
+        , Network.AWS.Lightsail.CloseInstancePublicPorts
+        , Network.AWS.Lightsail.CreateDomain
+        , Network.AWS.Lightsail.CreateDomainEntry
+        , Network.AWS.Lightsail.CreateInstanceSnapshot
+        , Network.AWS.Lightsail.CreateInstances
+        , Network.AWS.Lightsail.CreateInstancesFromSnapshot
+        , Network.AWS.Lightsail.CreateKeyPair
+        , Network.AWS.Lightsail.DeleteDomain
+        , Network.AWS.Lightsail.DeleteDomainEntry
+        , Network.AWS.Lightsail.DeleteInstance
+        , Network.AWS.Lightsail.DeleteInstanceSnapshot
+        , Network.AWS.Lightsail.DeleteKeyPair
+        , Network.AWS.Lightsail.DetachStaticIP
+        , Network.AWS.Lightsail.DownloadDefaultKeyPair
+        , Network.AWS.Lightsail.GetActiveNames
+        , Network.AWS.Lightsail.GetBlueprints
+        , Network.AWS.Lightsail.GetBundles
+        , Network.AWS.Lightsail.GetDomain
+        , Network.AWS.Lightsail.GetDomains
+        , Network.AWS.Lightsail.GetInstance
+        , Network.AWS.Lightsail.GetInstanceAccessDetails
+        , Network.AWS.Lightsail.GetInstanceMetricData
+        , Network.AWS.Lightsail.GetInstancePortStates
+        , Network.AWS.Lightsail.GetInstanceSnapshot
+        , Network.AWS.Lightsail.GetInstanceSnapshots
+        , Network.AWS.Lightsail.GetInstanceState
+        , Network.AWS.Lightsail.GetInstances
+        , Network.AWS.Lightsail.GetKeyPair
+        , Network.AWS.Lightsail.GetKeyPairs
+        , Network.AWS.Lightsail.GetOperation
+        , Network.AWS.Lightsail.GetOperations
+        , Network.AWS.Lightsail.GetOperationsForResource
+        , Network.AWS.Lightsail.GetRegions
+        , Network.AWS.Lightsail.GetStaticIP
+        , Network.AWS.Lightsail.GetStaticIPs
+        , Network.AWS.Lightsail.ImportKeyPair
+        , Network.AWS.Lightsail.IsVPCPeered
+        , Network.AWS.Lightsail.OpenInstancePublicPorts
+        , Network.AWS.Lightsail.PeerVPC
+        , Network.AWS.Lightsail.PutInstancePublicPorts
+        , Network.AWS.Lightsail.RebootInstance
+        , Network.AWS.Lightsail.ReleaseStaticIP
+        , Network.AWS.Lightsail.StartInstance
+        , Network.AWS.Lightsail.StopInstance
+        , Network.AWS.Lightsail.Types
+        , Network.AWS.Lightsail.UnpeerVPC
+        , Network.AWS.Lightsail.UpdateDomainEntry
+        , Network.AWS.Lightsail.Waiters
+
+    other-modules:
+          Network.AWS.Lightsail.Types.Product
+        , Network.AWS.Lightsail.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-lightsail-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.Lightsail
+        , Test.AWS.Gen.Lightsail
+        , Test.AWS.Lightsail.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-lightsail
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-lightsail.nix.golden b/test/golden-test-cases/amazonka-lightsail.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-lightsail.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-lightsail";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon Lightsail SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-route53-domains.cabal b/test/golden-test-cases/amazonka-route53-domains.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-route53-domains.cabal
@@ -0,0 +1,109 @@
+name:                  amazonka-route53-domains
+version:               1.5.0
+synopsis:              Amazon Route 53 Domains SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.Route53Domains" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-route53-domains
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.Route53Domains
+        , Network.AWS.Route53Domains.CheckDomainAvailability
+        , Network.AWS.Route53Domains.CheckDomainTransferability
+        , Network.AWS.Route53Domains.DeleteTagsForDomain
+        , Network.AWS.Route53Domains.DisableDomainAutoRenew
+        , Network.AWS.Route53Domains.DisableDomainTransferLock
+        , Network.AWS.Route53Domains.EnableDomainAutoRenew
+        , Network.AWS.Route53Domains.EnableDomainTransferLock
+        , Network.AWS.Route53Domains.GetContactReachabilityStatus
+        , Network.AWS.Route53Domains.GetDomainDetail
+        , Network.AWS.Route53Domains.GetDomainSuggestions
+        , Network.AWS.Route53Domains.GetOperationDetail
+        , Network.AWS.Route53Domains.ListDomains
+        , Network.AWS.Route53Domains.ListOperations
+        , Network.AWS.Route53Domains.ListTagsForDomain
+        , Network.AWS.Route53Domains.RegisterDomain
+        , Network.AWS.Route53Domains.RenewDomain
+        , Network.AWS.Route53Domains.ResendContactReachabilityEmail
+        , Network.AWS.Route53Domains.RetrieveDomainAuthCode
+        , Network.AWS.Route53Domains.TransferDomain
+        , Network.AWS.Route53Domains.Types
+        , Network.AWS.Route53Domains.UpdateDomainContact
+        , Network.AWS.Route53Domains.UpdateDomainContactPrivacy
+        , Network.AWS.Route53Domains.UpdateDomainNameservers
+        , Network.AWS.Route53Domains.UpdateTagsForDomain
+        , Network.AWS.Route53Domains.ViewBilling
+        , Network.AWS.Route53Domains.Waiters
+
+    other-modules:
+          Network.AWS.Route53Domains.Types.Product
+        , Network.AWS.Route53Domains.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-route53-domains-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.Route53Domains
+        , Test.AWS.Gen.Route53Domains
+        , Test.AWS.Route53Domains.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-route53-domains
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-route53-domains.nix.golden b/test/golden-test-cases/amazonka-route53-domains.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-route53-domains.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-route53-domains";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon Route 53 Domains SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/amazonka-waf.cabal b/test/golden-test-cases/amazonka-waf.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-waf.cabal
@@ -0,0 +1,144 @@
+name:                  amazonka-waf
+version:               1.5.0
+synopsis:              Amazon WAF SDK.
+homepage:              https://github.com/brendanhay/amazonka
+bug-reports:           https://github.com/brendanhay/amazonka/issues
+license:               MPL-2.0
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>
+copyright:             Copyright (c) 2013-2017 Brendan Hay
+category:              Network, AWS, Cloud, Distributed Computing
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep
+description:
+    The types from this library are intended to be used with
+    <http://hackage.haskell.org/package/amazonka amazonka>, which provides
+    mechanisms for specifying AuthN/AuthZ information, sending requests,
+    and receiving responses.
+    .
+    Lenses are used for constructing and manipulating types,
+    due to the depth of nesting of AWS types and transparency regarding
+    de/serialisation into more palatable Haskell values.
+    The provided lenses should be compatible with any of the major lens libraries
+    such as <http://hackage.haskell.org/package/lens lens> or
+    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.
+    .
+    See "Network.AWS.WAF" or <https://aws.amazon.com/documentation/ the AWS documentation>
+    to get started.
+
+source-repository head
+    type:              git
+    location:          git://github.com/brendanhay/amazonka.git
+    subdir:            amazonka-waf
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:
+        -Wall
+        -fwarn-incomplete-uni-patterns
+        -fwarn-incomplete-record-updates
+        -funbox-strict-fields
+
+    exposed-modules:
+          Network.AWS.WAF
+        , Network.AWS.WAF.CreateByteMatchSet
+        , Network.AWS.WAF.CreateGeoMatchSet
+        , Network.AWS.WAF.CreateIPSet
+        , Network.AWS.WAF.CreateRateBasedRule
+        , Network.AWS.WAF.CreateRegexMatchSet
+        , Network.AWS.WAF.CreateRegexPatternSet
+        , Network.AWS.WAF.CreateRule
+        , Network.AWS.WAF.CreateSizeConstraintSet
+        , Network.AWS.WAF.CreateSqlInjectionMatchSet
+        , Network.AWS.WAF.CreateWebACL
+        , Network.AWS.WAF.CreateXSSMatchSet
+        , Network.AWS.WAF.DeleteByteMatchSet
+        , Network.AWS.WAF.DeleteGeoMatchSet
+        , Network.AWS.WAF.DeleteIPSet
+        , Network.AWS.WAF.DeleteRateBasedRule
+        , Network.AWS.WAF.DeleteRegexMatchSet
+        , Network.AWS.WAF.DeleteRegexPatternSet
+        , Network.AWS.WAF.DeleteRule
+        , Network.AWS.WAF.DeleteSizeConstraintSet
+        , Network.AWS.WAF.DeleteSqlInjectionMatchSet
+        , Network.AWS.WAF.DeleteWebACL
+        , Network.AWS.WAF.DeleteXSSMatchSet
+        , Network.AWS.WAF.GetByteMatchSet
+        , Network.AWS.WAF.GetChangeToken
+        , Network.AWS.WAF.GetChangeTokenStatus
+        , Network.AWS.WAF.GetGeoMatchSet
+        , Network.AWS.WAF.GetIPSet
+        , Network.AWS.WAF.GetRateBasedRule
+        , Network.AWS.WAF.GetRateBasedRuleManagedKeys
+        , Network.AWS.WAF.GetRegexMatchSet
+        , Network.AWS.WAF.GetRegexPatternSet
+        , Network.AWS.WAF.GetRule
+        , Network.AWS.WAF.GetSampledRequests
+        , Network.AWS.WAF.GetSizeConstraintSet
+        , Network.AWS.WAF.GetSqlInjectionMatchSet
+        , Network.AWS.WAF.GetWebACL
+        , Network.AWS.WAF.GetXSSMatchSet
+        , Network.AWS.WAF.ListByteMatchSets
+        , Network.AWS.WAF.ListGeoMatchSets
+        , Network.AWS.WAF.ListIPSets
+        , Network.AWS.WAF.ListRateBasedRules
+        , Network.AWS.WAF.ListRegexMatchSets
+        , Network.AWS.WAF.ListRegexPatternSets
+        , Network.AWS.WAF.ListRules
+        , Network.AWS.WAF.ListSizeConstraintSets
+        , Network.AWS.WAF.ListSqlInjectionMatchSets
+        , Network.AWS.WAF.ListWebACLs
+        , Network.AWS.WAF.ListXSSMatchSets
+        , Network.AWS.WAF.Types
+        , Network.AWS.WAF.UpdateByteMatchSet
+        , Network.AWS.WAF.UpdateGeoMatchSet
+        , Network.AWS.WAF.UpdateIPSet
+        , Network.AWS.WAF.UpdateRateBasedRule
+        , Network.AWS.WAF.UpdateRegexMatchSet
+        , Network.AWS.WAF.UpdateRegexPatternSet
+        , Network.AWS.WAF.UpdateRule
+        , Network.AWS.WAF.UpdateSizeConstraintSet
+        , Network.AWS.WAF.UpdateSqlInjectionMatchSet
+        , Network.AWS.WAF.UpdateWebACL
+        , Network.AWS.WAF.UpdateXSSMatchSet
+        , Network.AWS.WAF.Waiters
+
+    other-modules:
+          Network.AWS.WAF.Types.Product
+        , Network.AWS.WAF.Types.Sum
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , base          >= 4.7     && < 5
+
+test-suite amazonka-waf-test
+    type:              exitcode-stdio-1.0
+    default-language:  Haskell2010
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    -- This section is encoded by the template and any modules added by
+    -- hand outside these namespaces will not correctly be added to the
+    -- distribution package.
+    other-modules:
+          Test.AWS.WAF
+        , Test.AWS.Gen.WAF
+        , Test.AWS.WAF.Internal
+
+    build-depends:
+          amazonka-core == 1.5.0.*
+        , amazonka-test == 1.5.0.*
+        , amazonka-waf
+        , base
+        , bytestring
+        , tasty
+        , tasty-hunit
+        , text
+        , time
+        , unordered-containers
diff --git a/test/golden-test-cases/amazonka-waf.nix.golden b/test/golden-test-cases/amazonka-waf.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/amazonka-waf.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka-core, amazonka-test, base, bytestring
+, fetchurl, tasty, tasty-hunit, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "amazonka-waf";
+  version = "1.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ amazonka-core base ];
+  testHaskellDepends = [
+    amazonka-core amazonka-test base bytestring tasty tasty-hunit text
+    time unordered-containers
+  ];
+  homepage = "https://github.com/brendanhay/amazonka";
+  description = "Amazon WAF SDK";
+  license = stdenv.lib.licenses.mpl20;
+}
diff --git a/test/golden-test-cases/api-field-json-th.cabal b/test/golden-test-cases/api-field-json-th.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/api-field-json-th.cabal
@@ -0,0 +1,40 @@
+name:                api-field-json-th
+version:             0.1.0.2
+synopsis:            option of aeson's deriveJSON 
+description:         Utils for using aeson's deriveJSON with lens's makeFields
+homepage:            https://github.com/nakaji-dayo/api-field-json-th
+license:             BSD3
+license-file:        LICENSE
+author:              Daishi Nakajima
+maintainer:          nakaji.dayo@gmail.com
+copyright:           2016 Daishi Nakajima
+category:            Utils
+build-type:          Simple
+-- extra-source-files:
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Data.Aeson.APIFieldJsonTH
+  build-depends:       base >= 4.7 && < 5
+                     , text
+                     , aeson
+                     , lens
+                     , split
+                     , template-haskell
+  default-language:    Haskell2010
+
+test-suite api-field-json-th-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base
+                     , api-field-json-th
+                     , HUnit
+                     , aeson
+                     , lens
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/nakaji-dayo/api-field-json-th
diff --git a/test/golden-test-cases/api-field-json-th.nix.golden b/test/golden-test-cases/api-field-json-th.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/api-field-json-th.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, aeson, base, fetchurl, HUnit, lens, split
+, template-haskell, text
+}:
+mkDerivation {
+  pname = "api-field-json-th";
+  version = "0.1.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base lens split template-haskell text
+  ];
+  testHaskellDepends = [ aeson base HUnit lens ];
+  homepage = "https://github.com/nakaji-dayo/api-field-json-th";
+  description = "option of aeson's deriveJSON";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/app-settings.cabal b/test/golden-test-cases/app-settings.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/app-settings.cabal
@@ -0,0 +1,138 @@
+-- Initial app-settings.cabal generated by cabal init.  For further
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                app-settings
+version:             0.2.0.11
+synopsis:            A library to manage application settings (INI file-like)
+description:
+  A library to deal with application settings.
+  .
+  This library deals with read-write application settings.
+  You will have to specify the settings that your application
+  uses, their name, types and default values.
+  .
+  Setting types must implement the 'Read' and 'Show' typeclasses.
+  .
+  The settings are saved in a file in an INI-like key-value format
+  (without sections).
+  .
+  Reading and updating settings is done in pure code, the IO
+  monad is only used to load settings and save them to disk.
+  It is advised for the user to create a module in your project
+  holding settings handling.
+  .
+  You can then declare settings:
+  .
+  > fontSize :: Setting Double
+  > fontSize = Setting "fontSize" 14
+  >
+  > dateFormat :: Setting String
+  > dateFormat = Setting "dateFormat" "%x"
+  >
+  > backgroundColor :: Setting (Int, Int, Int)
+  > backgroundColor = Setting "backcolor" (255, 0, 0)
+  .
+  Optionally you can declare the list of all your settings,
+  in that case the application will also save the default
+  values in the configuration file, but commented out:
+  .
+  > fontSize=16
+  > # dateFormat="%x"
+  > # backcolor=(255,0,0)
+  .
+  If you do not specify the list of settings, only the
+  first line would be present in the configuration file.
+  .
+  With an ordinary setting, one row in the configuration file
+  means one setting. That setting may of course be a list
+  for instance. This setup works very well for shorter lists
+  like [1,2,3], however if you have a list of more complex
+  items, you will get very long lines and a configuration
+  file very difficult to edit by hand.
+  .
+  For these special cases there is also the 'ListSetting'
+  constructor:
+  .
+  > testList :: Setting [String]
+  > testList = ListSetting "testList" ["list1", "list2", "list3"]
+  .
+  Now the configuration file looks like that:
+  .
+  > testList_1="list1"
+  > testList_2="list2"
+  > testList_3="list3"
+  .
+  Which is much more handy for big lists. An empty list is represented
+  like so:
+  .
+  > testList=
+  .
+  There is also another technique that you can use if you have too long
+  lines: you can put line breaks in the setting values if you start the
+  following lines with a leading space, like so:
+  .
+  > testList=["list1",
+  >  "list2", "list3"]
+  .
+  In that case don't use the ListSetting option. Any character after the
+  the leading space in the next lines will go in the setting value. Note
+  that the library will automatically wrap setting values longer than 80
+  characters when saving.
+  .
+  Once we declared the settings, we can read the configuration
+  from disk (and your settings module should export your wrapper
+  around the function offered by this library):
+  .
+  > readResult <- try $ readSettings (AutoFromAppName "test")
+  > case readResult of
+  > 	Right (conf, GetSetting getSetting) -> do
+  > 		let textSize = getSetting fontSize
+  > 		saveSettings emptyDefaultConfig (AutoFromAppName "test") conf
+  > 	Left (x :: SomeException) -> error "Error reading the config file!"
+  .
+  'AutoFromAppName' specifies where to save the configuration file.
+  And we've already covered the getSetting in this snippet, see
+  the 'readSettings' documentation for further information.
+  .
+  You can also look at the tests of the library on the github project for sample use.
+
+homepage:            https://github.com/emmanueltouzery/app-settings
+license:             BSD3
+license-file:        LICENSE
+author:              Emmanuel Touzery
+maintainer:          etouzery@gmail.com
+-- copyright:
+category:            Configuration
+build-type:          Simple
+extra-source-files:  tests/*.conf tests/*.config tests/*.txt
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Data.AppSettings
+  other-modules:       Data.Serialization,
+                       Data.AppSettingsInternal
+  -- other-extensions:
+  build-depends:       base >=4.6 && <5,
+                       mtl >= 2.1 && <2.3,
+                       containers == 0.5.*,
+                       directory >= 1.2 && < 1.4,
+                       text >= 0.10,
+                       parsec == 3.1.*
+  -- hs-source-dirs:
+  default-language:    Haskell2010
+  Ghc-Options:         -Wall
+
+test-suite             tests
+  type:                 exitcode-stdio-1.0
+  hs-source-dirs: ., tests
+  main-is: Tests.hs
+  default-language:    Haskell2010
+  build-depends:       base,
+                       hspec,
+                       HUnit >= 1.2 && <1.7,
+                       mtl >= 2.1 && <2.3,
+                       containers == 0.5.*,
+                       directory >= 1.2 && < 1.4,
+                       text >= 0.10,
+                       parsec == 3.1.*
+  Ghc-Options:         -Wall
diff --git a/test/golden-test-cases/app-settings.nix.golden b/test/golden-test-cases/app-settings.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/app-settings.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, containers, directory, fetchurl, hspec, HUnit
+, mtl, parsec, text
+}:
+mkDerivation {
+  pname = "app-settings";
+  version = "0.2.0.11";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers directory mtl parsec text
+  ];
+  testHaskellDepends = [
+    base containers directory hspec HUnit mtl parsec text
+  ];
+  homepage = "https://github.com/emmanueltouzery/app-settings";
+  description = "A library to manage application settings (INI file-like)";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/apply-refact.cabal b/test/golden-test-cases/apply-refact.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/apply-refact.cabal
@@ -0,0 +1,96 @@
+-- Initial hlint-refactor.cabal generated by cabal init.  For further
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                apply-refact
+version:             0.4.1.0
+synopsis:            Perform refactorings specified by the refact library.
+description:         Perform refactorings specified by the refact library. It is primarily used with HLint's --refactor flag.
+license:             BSD3
+license-file:        LICENSE
+author:              Matthew Pickering
+maintainer:          matthewtpickering@gmail.com
+-- copyright:
+category:            Development
+build-type:          Simple
+extra-source-files: CHANGELOG
+                   , README.md
+                   , tests/examples/*.hs
+                   , tests/examples/*.hs.refact
+                   , tests/examples/*.hs.expected
+cabal-version:       >=1.10
+tested-with:        GHC == 8.0.1
+
+
+source-repository head
+  type:     git
+  location: https://github.com/mpickering/apply-refact.git
+
+library
+  exposed-modules:   Refact.Utils
+                   , Refact.Apply
+                   , Refact.Fixity
+  GHC-Options: -Wall
+  build-depends: base >=4.8 && <4.11
+               , refact >= 0.2
+               , ghc-exactprint >= 0.5.3.1
+               , ghc >= 8.2.0 && < 8.3
+               , containers
+               , syb
+               , mtl
+               , process
+               , transformers
+               , temporary
+               , filemanip
+               , unix-compat
+               , directory
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+executable refactor
+  main-is: Main.hs
+  hs-source-dirs:      src
+  default-language: Haskell2010
+  ghc-options: -Wall -fno-warn-unused-do-bind
+  build-depends: base >= 4.8 && < 4.11
+               , refact >= 0.2
+               , ghc-exactprint >= 0.5.3.1
+               , ghc >= 8.2.0 && < 8.3
+               , containers
+               , syb
+               , mtl
+               , process
+               , directory
+               , optparse-applicative >= 0.13
+               , filemanip
+               , unix-compat
+               , filepath
+               , temporary
+               , transformers
+
+Test-Suite test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      tests, src
+  main-is:             Test.hs
+  GHC-Options:         -threaded -main-is Test
+  Default-language:    Haskell2010
+  if impl (ghc < 7.10)
+      buildable: False
+  Build-depends:       tasty
+                     , tasty-golden
+                     , tasty-expected-failure
+                     , base < 5
+               , refact >= 0.2
+               , ghc-exactprint >= 0.5.3.1
+               , ghc >= 8.2.0 && < 8.3
+               , containers
+               , syb
+               , mtl
+               , process
+               , directory
+               , optparse-applicative
+               , filemanip
+               , unix-compat
+               , filepath
+               , silently
+               , temporary
+               , transformers
diff --git a/test/golden-test-cases/apply-refact.nix.golden b/test/golden-test-cases/apply-refact.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/apply-refact.nix.golden
@@ -0,0 +1,32 @@
+{ mkDerivation, base, containers, directory, fetchurl, filemanip
+, filepath, ghc, ghc-exactprint, mtl, optparse-applicative, process
+, refact, silently, syb, tasty, tasty-expected-failure
+, tasty-golden, temporary, transformers, unix-compat
+}:
+mkDerivation {
+  pname = "apply-refact";
+  version = "0.4.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base containers directory filemanip ghc ghc-exactprint mtl process
+    refact syb temporary transformers unix-compat
+  ];
+  executableHaskellDepends = [
+    base containers directory filemanip filepath ghc ghc-exactprint mtl
+    optparse-applicative process refact syb temporary transformers
+    unix-compat
+  ];
+  testHaskellDepends = [
+    base containers directory filemanip filepath ghc ghc-exactprint mtl
+    optparse-applicative process refact silently syb tasty
+    tasty-expected-failure tasty-golden temporary transformers
+    unix-compat
+  ];
+  description = "Perform refactorings specified by the refact library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/async.cabal b/test/golden-test-cases/async.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/async.cabal
@@ -0,0 +1,64 @@
+name:                async
+version:             2.1.1.1
+-- don't forget to update ./changelog.md!
+synopsis:            Run IO operations asynchronously and wait for their results
+
+description:
+ This package provides a higher-level interface over
+ threads, in which an @Async a@ is a concurrent
+ thread that will eventually deliver a value of
+ type @a@.  The package provides ways to create
+ @Async@ computations, wait for their results, and
+ cancel them.
+ .
+ Using @Async@ is safer than using threads in two
+ ways:
+ .
+ * When waiting for a thread to return a result,
+   if the thread dies with an exception then the
+   caller must either re-throw the exception
+   ('wait') or handle it ('waitCatch'); the
+   exception cannot be ignored.
+ .
+ * The API makes it possible to build a tree of
+   threads that are automatically killed when
+   their parent dies (see 'withAsync').
+
+license:             BSD3
+license-file:        LICENSE
+author:              Simon Marlow
+maintainer:          Simon Marlow <marlowsd@gmail.com>
+copyright:           (c) Simon Marlow 2012
+category:            Concurrency
+build-type:          Simple
+cabal-version:       >=1.10
+homepage:            https://github.com/simonmar/async
+bug-reports:         https://github.com/simonmar/async/issues
+tested-with:         GHC==7.11.*, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4
+
+extra-source-files:
+    changelog.md
+    bench/race.hs
+
+source-repository head
+    type: git
+    location: https://github.com/simonmar/async.git
+
+library
+    default-language:    Haskell2010
+    other-extensions:    CPP, MagicHash, RankNTypes, UnboxedTuples
+    if impl(ghc>=7.1)
+        other-extensions: Trustworthy
+    exposed-modules:     Control.Concurrent.Async
+    build-depends:       base >= 4.3 && < 4.11, stm >= 2.2 && < 2.5
+
+test-suite test-async
+    default-language: Haskell2010
+    type:       exitcode-stdio-1.0
+    hs-source-dirs: test
+    main-is:    test-async.hs
+    build-depends: base >= 4.3 && < 4.11,
+                   async,
+                   test-framework,
+                   test-framework-hunit,
+                   HUnit
diff --git a/test/golden-test-cases/async.nix.golden b/test/golden-test-cases/async.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/async.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, fetchurl, HUnit, stm, test-framework
+, test-framework-hunit
+}:
+mkDerivation {
+  pname = "async";
+  version = "2.1.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base stm ];
+  testHaskellDepends = [
+    base HUnit test-framework test-framework-hunit
+  ];
+  homepage = "https://github.com/simonmar/async";
+  description = "Run IO operations asynchronously and wait for their results";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/attoparsec-expr.cabal b/test/golden-test-cases/attoparsec-expr.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/attoparsec-expr.cabal
@@ -0,0 +1,28 @@
+name:                attoparsec-expr
+version:             0.1.1.2
+description:         Port of parsec's expression parser to attoparsec.
+synopsis:            Port of parsec's expression parser to attoparsec.
+category:            Text, Parsing
+license:             BSD3
+license-file:        LICENSE
+author:              Daan Leijen, Paolo Martini
+maintainer:          Silk <code@silk.co>
+build-type:          Simple
+cabal-version:       >= 1.6
+
+extra-source-files:
+  CHANGELOG.md
+  LICENSE
+  README.md
+
+source-repository head
+  type:              git
+  location:          https://github.com/silkapp/attoparsec-expr
+
+library
+  ghc-options:       -Wall
+  hs-source-dirs:    src
+  exposed-modules:   Data.Attoparsec.Expr
+  Build-Depends:
+      base == 4.*
+    , attoparsec >= 0.10 && < 0.14
diff --git a/test/golden-test-cases/attoparsec-expr.nix.golden b/test/golden-test-cases/attoparsec-expr.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/attoparsec-expr.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, attoparsec, base, fetchurl }:
+mkDerivation {
+  pname = "attoparsec-expr";
+  version = "0.1.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ attoparsec base ];
+  description = "Port of parsec's expression parser to attoparsec";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/attoparsec-time.cabal b/test/golden-test-cases/attoparsec-time.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/attoparsec-time.cabal
@@ -0,0 +1,84 @@
+name:
+  attoparsec-time
+version:
+  1
+synopsis:
+  Attoparsec parsers of time
+description:
+  A collection of Attoparsec parsers for the \"time\" library
+category:
+  Attoparsec, Parsers, Time
+homepage:
+  https://github.com/nikita-volkov/attoparsec-time 
+bug-reports:
+  https://github.com/nikita-volkov/attoparsec-time/issues 
+author:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+maintainer:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+copyright:
+  (c) 2017, Nikita Volkov
+license:
+  MIT
+license-file:
+  LICENSE
+build-type:
+  Custom
+cabal-version:
+  >=1.10
+
+source-repository head
+  type:
+    git
+  location:
+    git://github.com/nikita-volkov/attoparsec-time.git
+
+custom-setup
+  setup-depends:
+    base, Cabal, cabal-doctest >=1.0.2 && <1.1
+
+library
+  hs-source-dirs:
+    library
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  exposed-modules:
+    Attoparsec.Time.ByteString
+    Attoparsec.Time.Text
+  other-modules:
+    Attoparsec.Time.Prelude
+    Attoparsec.Time.Validation
+    Attoparsec.Time.Pure
+  build-depends:
+    -- 
+    attoparsec >=0.13 && <0.15,
+    --
+    time >=1.4 && <2,
+    scientific ==0.3.*,
+    text >=1 && <2,
+    bytestring ==0.10.*,
+    --
+    base-prelude <2,
+    base >=4.7 && <5
+
+test-suite doctests
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    doctests
+  main-is:
+    Main.hs
+  ghc-options:
+    -threaded
+    "-with-rtsopts=-N"
+    -funbox-strict-fields
+  default-language:
+    Haskell2010
+  build-depends:
+    doctest ==0.13.*,
+    directory >=1.2 && <2,
+    filepath >=1.4 && <2,
+    base-prelude <2,
+    base <5
diff --git a/test/golden-test-cases/attoparsec-time.nix.golden b/test/golden-test-cases/attoparsec-time.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/attoparsec-time.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, attoparsec, base, base-prelude, bytestring, Cabal
+, cabal-doctest, directory, doctest, fetchurl, filepath, scientific
+, text, time
+}:
+mkDerivation {
+  pname = "attoparsec-time";
+  version = "1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  setupHaskellDepends = [ base Cabal cabal-doctest ];
+  libraryHaskellDepends = [
+    attoparsec base base-prelude bytestring scientific text time
+  ];
+  testHaskellDepends = [
+    base base-prelude directory doctest filepath
+  ];
+  homepage = "https://github.com/nikita-volkov/attoparsec-time";
+  description = "Attoparsec parsers of time";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/avers-server.cabal b/test/golden-test-cases/avers-server.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/avers-server.cabal
@@ -0,0 +1,55 @@
+name:                avers-server
+version:             0.1.0
+synopsis:            Server implementation of the Avers API
+description:         Server implementation of the Avers API
+homepage:            http://github.com/wereHamster/avers-server
+license:             MIT
+license-file:        LICENSE
+author:              Tomas Carnecky
+maintainer:          tomas.carnecky@gmail.com
+copyright:           2016 Tomas Carnecky
+category:            Avers
+build-type:          Simple
+cabal-version:       >=1.10
+
+source-repository head
+  type:     git
+  location: https://github.com/wereHamster/avers
+
+library
+  default-language:    Haskell2010
+  hs-source-dirs:      src
+  ghc-options:         -Wall
+
+  exposed-modules:
+     Avers.Server
+
+  other-modules:
+     Avers.Server.Authorization
+   , Avers.Server.Instances
+
+  build-depends:
+     base >= 4.7 && < 5
+   , aeson
+   , avers
+   , avers-api
+   , base64-bytestring
+   , bytestring
+   , bytestring-conversion
+   , containers
+   , cookie
+   , cryptonite
+   , http-types
+   , memory
+   , mtl
+   , resource-pool
+   , rethinkdb-client-driver
+   , servant
+   , servant-server
+   , stm
+   , text
+   , time
+   , transformers
+   , wai
+   , wai-websockets
+   , websockets
diff --git a/test/golden-test-cases/avers-server.nix.golden b/test/golden-test-cases/avers-server.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/avers-server.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, aeson, avers, avers-api, base, base64-bytestring
+, bytestring, bytestring-conversion, containers, cookie, cryptonite
+, fetchurl, http-types, memory, mtl, resource-pool
+, rethinkdb-client-driver, servant, servant-server, stm, text, time
+, transformers, wai, wai-websockets, websockets
+}:
+mkDerivation {
+  pname = "avers-server";
+  version = "0.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson avers avers-api base base64-bytestring bytestring
+    bytestring-conversion containers cookie cryptonite http-types
+    memory mtl resource-pool rethinkdb-client-driver servant
+    servant-server stm text time transformers wai wai-websockets
+    websockets
+  ];
+  homepage = "http://github.com/wereHamster/avers-server";
+  description = "Server implementation of the Avers API";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/aws.cabal b/test/golden-test-cases/aws.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/aws.cabal
@@ -0,0 +1,430 @@
+Name:                aws
+Version:             0.18
+Synopsis:            Amazon Web Services (AWS) for Haskell
+Description:         Bindings for Amazon Web Services (AWS), with the aim of supporting all AWS services. To see a high level overview of the library, see the README at <https://github.com/aristidb/aws/blob/master/README.md>.
+Homepage:            http://github.com/aristidb/aws
+License:             BSD3
+License-file:        LICENSE
+Author:              Aristid Breitkreuz, contributors see README
+Maintainer:          aristidb@gmail.com
+Copyright:           See contributors list in README and LICENSE file
+Category:            Network, Web, AWS, Cloud, Distributed Computing
+Build-type:          Simple
+
+Extra-source-files:  README.md
+                     CHANGELOG.md
+
+Cabal-version:       >=1.10
+
+Source-repository this
+  type: git
+  location: https://github.com/aristidb/aws.git
+  tag: 0.18
+
+Source-repository head
+  type: git
+  location: https://github.com/aristidb/aws.git
+
+Flag Examples
+  Description: Build the examples.
+  Default: False
+
+Library
+  Exposed-modules:
+                       Aws
+                       Aws.Aws
+                       Aws.Core
+                       Aws.DynamoDb
+                       Aws.DynamoDb.Commands
+                       Aws.DynamoDb.Commands.BatchGetItem
+                       Aws.DynamoDb.Commands.BatchWriteItem
+                       Aws.DynamoDb.Commands.DeleteItem
+                       Aws.DynamoDb.Commands.GetItem
+                       Aws.DynamoDb.Commands.PutItem
+                       Aws.DynamoDb.Commands.Query
+                       Aws.DynamoDb.Commands.Scan
+                       Aws.DynamoDb.Commands.Table
+                       Aws.DynamoDb.Commands.UpdateItem
+                       Aws.DynamoDb.Core
+                       Aws.Ec2.InstanceMetadata
+                       Aws.Iam
+                       Aws.Iam.Commands
+                       Aws.Iam.Commands.CreateAccessKey
+                       Aws.Iam.Commands.CreateUser
+                       Aws.Iam.Commands.DeleteAccessKey
+                       Aws.Iam.Commands.DeleteUser
+                       Aws.Iam.Commands.DeleteUserPolicy
+                       Aws.Iam.Commands.GetUser
+                       Aws.Iam.Commands.GetUserPolicy
+                       Aws.Iam.Commands.ListAccessKeys
+                       Aws.Iam.Commands.ListMfaDevices
+                       Aws.Iam.Commands.ListUserPolicies
+                       Aws.Iam.Commands.ListUsers
+                       Aws.Iam.Commands.PutUserPolicy
+                       Aws.Iam.Commands.UpdateAccessKey
+                       Aws.Iam.Commands.UpdateUser
+                       Aws.Iam.Core
+                       Aws.Iam.Internal
+                       Aws.Network
+                       Aws.S3
+                       Aws.S3.Commands
+                       Aws.S3.Commands.CopyObject
+                       Aws.S3.Commands.DeleteBucket
+                       Aws.S3.Commands.DeleteObject
+                       Aws.S3.Commands.DeleteObjectVersion
+                       Aws.S3.Commands.DeleteObjects
+                       Aws.S3.Commands.GetBucket
+                       Aws.S3.Commands.GetBucketLocation
+                       Aws.S3.Commands.GetBucketObjectVersions
+                       Aws.S3.Commands.GetObject
+                       Aws.S3.Commands.GetService
+                       Aws.S3.Commands.HeadObject
+                       Aws.S3.Commands.PutBucket
+                       Aws.S3.Commands.PutObject
+                       Aws.S3.Commands.Multipart
+                       Aws.S3.Core
+                       Aws.Ses
+                       Aws.Ses.Commands
+                       Aws.Ses.Commands.DeleteIdentity
+                       Aws.Ses.Commands.GetIdentityDkimAttributes
+                       Aws.Ses.Commands.GetIdentityNotificationAttributes
+                       Aws.Ses.Commands.GetIdentityVerificationAttributes
+                       Aws.Ses.Commands.ListIdentities
+                       Aws.Ses.Commands.SendRawEmail
+                       Aws.Ses.Commands.SetIdentityDkimEnabled
+                       Aws.Ses.Commands.SetIdentityFeedbackForwardingEnabled
+                       Aws.Ses.Commands.SetIdentityNotificationTopic
+                       Aws.Ses.Commands.VerifyDomainDkim
+                       Aws.Ses.Commands.VerifyDomainIdentity
+                       Aws.Ses.Commands.VerifyEmailIdentity
+                       Aws.Ses.Core
+                       Aws.SimpleDb
+                       Aws.SimpleDb.Commands
+                       Aws.SimpleDb.Commands.Attributes
+                       Aws.SimpleDb.Commands.Domain
+                       Aws.SimpleDb.Commands.Select
+                       Aws.SimpleDb.Core
+                       Aws.Sqs
+                       Aws.Sqs.Commands
+                       Aws.Sqs.Commands.Message
+                       Aws.Sqs.Commands.Permission
+                       Aws.Sqs.Commands.Queue
+                       Aws.Sqs.Commands.QueueAttributes
+                       Aws.Sqs.Core
+
+  Build-depends:
+                       aeson                >= 0.6,
+                       attoparsec           >= 0.11    && < 0.14,
+                       base                 >= 4.6     && < 5,
+                       base16-bytestring    == 0.1.*,
+                       base64-bytestring    == 1.0.*,
+                       blaze-builder        >= 0.2.1.4 && < 0.5,
+                       byteable             == 0.1.*,
+                       bytestring           >= 0.9     && < 0.11,
+                       case-insensitive     >= 0.2     && < 1.3,
+                       cereal               >= 0.3     && < 0.6,
+                       conduit              >= 1.1     && < 1.3,
+                       conduit-extra        >= 1.1     && < 1.3,
+                       containers           >= 0.4,
+                       cryptonite           >= 0.11,
+                       data-default         >= 0.5.3   && < 0.8,
+                       directory            >= 1.0     && < 2.0,
+                       filepath             >= 1.1     && < 1.5,
+                       http-conduit         >= 2.1     && < 2.3,
+                       http-types           >= 0.7     && < 1.0,
+                       lifted-base          >= 0.1     && < 0.3,
+                       memory,
+                       monad-control        >= 0.3,
+                       mtl                  == 2.*,
+                       network              == 2.*,
+                       old-locale           == 1.*,
+                       resourcet            >= 1.1     && < 1.2,
+                       safe                 >= 0.3     && < 0.4,
+                       scientific           >= 0.3,
+                       tagged               >= 0.7     && < 0.9,
+                       text                 >= 0.11,
+                       time                 >= 1.4.0   && < 2.0,
+                       transformers         >= 0.2.2   && < 0.6,
+                       unordered-containers >= 0.2,
+                       utf8-string          >= 0.3     && < 1.1,
+                       vector               >= 0.10,
+                       xml-conduit          >= 1.2     && <2.0
+ 
+  if !impl(ghc >= 7.6)
+    Build-depends: ghc-prim
+
+  GHC-Options: -Wall
+
+  Default-Language: Haskell2010
+  Default-Extensions:
+        RecordWildCards,
+        TypeFamilies,
+        MultiParamTypeClasses,
+        FlexibleContexts,
+        FlexibleInstances,
+        FunctionalDependencies,
+        DeriveFunctor,
+        DeriveDataTypeable,
+        OverloadedStrings,
+        TupleSections,
+        ScopedTypeVariables,
+        EmptyDataDecls,
+        Rank2Types
+
+Executable GetObject
+  Main-is: GetObject.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       http-conduit,
+                       conduit,
+                       conduit-extra
+
+  Default-Language: Haskell2010
+
+Executable GetObjectGoogle
+  Main-is: GetObjectGoogle.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       http-conduit,
+                       conduit,
+                       conduit-extra
+
+  Default-Language: Haskell2010
+
+Executable MultipartUpload
+  Main-is: MultipartUpload.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       http-conduit,
+                       conduit,
+                       conduit-extra,
+                       text,
+                       resourcet
+
+  Default-Language: Haskell2010
+
+Executable MultipartTransfer
+  Main-is: MultipartTransfer.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       http-conduit,
+                       conduit,
+                       conduit-extra,
+                       text
+
+  Default-Language: Haskell2010
+
+Executable NukeBucket
+  Main-is: NukeBucket.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       http-conduit,
+                       conduit,
+                       conduit-extra,
+                       text >=0.1,
+                       transformers
+
+  Default-Language: Haskell2010
+
+Executable PutBucketNearLine
+  Main-is: PutBucketNearLine.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       http-conduit,
+                       conduit,
+                       conduit-extra,
+                       text >=0.1,
+                       transformers
+
+  Default-Language: Haskell2010
+
+Executable SimpleDb
+  Main-is: SimpleDb.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       text >=0.11
+
+  Default-Language: Haskell2010
+
+Executable DynamoDb
+  Main-is: DynamoDb.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       aws,
+                       base == 4.*,
+                       data-default,
+                       exceptions,
+                       http-conduit,
+                       text,
+                       conduit
+
+  Default-Language: Haskell2010
+
+
+Executable Sqs
+  Main-is: Sqs.hs
+  Hs-source-dirs: Examples
+
+  if !flag(Examples)
+    Buildable: False
+  else
+    Buildable: True
+    Build-depends:
+                       base == 4.*,
+                       aws,
+                       errors >= 2.0,
+                       text >=0.11,
+                       transformers >= 0.3
+
+  Default-Language: Haskell2010
+
+test-suite sqs-tests
+    type: exitcode-stdio-1.0
+    default-language: Haskell2010
+    hs-source-dirs: tests
+    main-is: Sqs/Main.hs
+
+    other-modules:
+        Utils
+
+    build-depends:
+        QuickCheck >= 2.7,
+        aeson >= 0.7,
+        aws,
+        base == 4.*,
+        bytestring >= 0.10,
+        errors >= 2.0,
+        http-client >= 0.3 && < 0.6,
+        lifted-base >= 0.2,
+        monad-control >= 0.3,
+        mtl >= 2.1,
+        quickcheck-instances >= 0.3,
+        resourcet >= 1.1,
+        tagged >= 0.7,
+        tasty >= 0.8,
+        tasty-quickcheck >= 0.8,
+        text >= 1.1,
+        time,
+        transformers >= 0.3,
+        transformers-base >= 0.4
+
+    ghc-options: -Wall -threaded
+
+test-suite dynamodb-tests
+    type: exitcode-stdio-1.0
+    default-language: Haskell2010
+    hs-source-dirs: tests
+    main-is: DynamoDb/Main.hs
+
+    other-modules:
+        Utils
+        DynamoDb.Utils
+
+    build-depends:
+        QuickCheck >= 2.7,
+        aeson >= 0.7,
+        aws,
+        base == 4.*,
+        bytestring >= 0.10,
+        errors >= 2.0,
+        http-client >= 0.3,
+        lifted-base >= 0.2,
+        monad-control >= 0.3,
+        mtl >= 2.1,
+        quickcheck-instances >= 0.3,
+        resourcet >= 1.1,
+        tagged >= 0.7,
+        tasty >= 0.8,
+        tasty-quickcheck >= 0.8,
+        text >= 1.1,
+        time,
+        transformers >= 0.3,
+        transformers-base >= 0.4
+
+
+test-suite s3-tests
+    type: exitcode-stdio-1.0
+    default-language: Haskell2010
+    hs-source-dirs: tests
+    main-is: S3/Main.hs
+
+    other-modules:
+        Utils
+
+    build-depends:
+        aws,
+        base == 4.*,
+        QuickCheck >= 2.7,
+        aeson >= 0.7,
+        bytestring,
+        conduit-combinators,
+        errors >= 2.0,
+        lifted-base >= 0.2,
+        monad-control >= 0.3,
+        mtl >= 2.1,
+        http-client < 0.6,
+        http-client-tls < 0.5,
+        http-types,
+        resourcet,
+        tasty >= 0.8,
+        tasty-hunit >= 0.8,
+        tasty-quickcheck >= 0.8,
+        text,
+        time,
+        tagged >= 0.7,
+        transformers >= 0.3,
+        transformers-base >= 0.4
diff --git a/test/golden-test-cases/aws.nix.golden b/test/golden-test-cases/aws.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/aws.nix.golden
@@ -0,0 +1,38 @@
+{ mkDerivation, aeson, attoparsec, base, base16-bytestring
+, base64-bytestring, blaze-builder, byteable, bytestring
+, case-insensitive, cereal, conduit, conduit-combinators
+, conduit-extra, containers, cryptonite, data-default, directory
+, errors, fetchurl, filepath, http-client, http-client-tls
+, http-conduit, http-types, lifted-base, memory, monad-control, mtl
+, network, old-locale, QuickCheck, quickcheck-instances, resourcet
+, safe, scientific, tagged, tasty, tasty-hunit, tasty-quickcheck
+, text, time, transformers, transformers-base, unordered-containers
+, utf8-string, vector, xml-conduit
+}:
+mkDerivation {
+  pname = "aws";
+  version = "0.18";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson attoparsec base base16-bytestring base64-bytestring
+    blaze-builder byteable bytestring case-insensitive cereal conduit
+    conduit-extra containers cryptonite data-default directory filepath
+    http-conduit http-types lifted-base memory monad-control mtl
+    network old-locale resourcet safe scientific tagged text time
+    transformers unordered-containers utf8-string vector xml-conduit
+  ];
+  testHaskellDepends = [
+    aeson base bytestring conduit-combinators errors http-client
+    http-client-tls http-types lifted-base monad-control mtl QuickCheck
+    quickcheck-instances resourcet tagged tasty tasty-hunit
+    tasty-quickcheck text time transformers transformers-base
+  ];
+  homepage = "http://github.com/aristidb/aws";
+  description = "Amazon Web Services (AWS) for Haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/bbdb.cabal b/test/golden-test-cases/bbdb.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bbdb.cabal
@@ -0,0 +1,54 @@
+Name:                bbdb
+Version:             0.8
+Synopsis:            Ability to read, write, and modify BBDB files
+Description:         BBDB (http://savannah.nongnu.org/projects/bbdb/) is a
+                     contact management utility that can be used with
+                     emacs.  It stores its data internally as a lisp
+                     expression.  This module parses the lisp and
+                     provides some convenience functions to get at and
+                     manipulate the data all from within Haskell.  See
+                     the hackage docs for usage and examples.
+
+Homepage:            https://github.com/henrylaxen/bbdb
+License:             GPL-3
+License-file:        LICENSE
+Author:              Henry Laxen
+Copyright:           Henry Laxen
+Maintainer:          nadine.and.henry@pobox.com
+Stability:           stable
+Bug-reports:         mailto:nadine.and.henry@pobox.com
+Category:            Database
+Build-type:          Simple
+Extra-source-files:  changelog.md
+                     LICENSE
+                     README.md
+                     test/sampleData.txt
+                     
+Cabal-version:       >=1.10
+
+Library
+  Exposed-modules:     Database.BBDB
+  hs-source-dirs:      src
+  ghc-options:         -Wall
+  default-language:    Haskell2010
+  default-extensions:  FlexibleInstances,
+                       MultiParamTypeClasses,
+                       OverloadedStrings
+  Build-depends:
+                base >= 3 && <= 5,
+                parsec >= 3
+
+Test-Suite bbdb-tests
+  Type:                exitcode-stdio-1.0
+  Main-is:             Spec.hs
+  hs-source-dirs:      src,test
+  Other-modules:       Database.BBDB,
+                       BBDBSpec
+  default-language:    Haskell2010
+  default-extensions:  FlexibleInstances,
+                       MultiParamTypeClasses,
+                       OverloadedStrings
+  Build-depends:
+                base >= 3 && <= 5,
+                hspec,
+                parsec >= 3
diff --git a/test/golden-test-cases/bbdb.nix.golden b/test/golden-test-cases/bbdb.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bbdb.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, hspec, parsec }:
+mkDerivation {
+  pname = "bbdb";
+  version = "0.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base parsec ];
+  testHaskellDepends = [ base hspec parsec ];
+  homepage = "https://github.com/henrylaxen/bbdb";
+  description = "Ability to read, write, and modify BBDB files";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/benchpress.cabal b/test/golden-test-cases/benchpress.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/benchpress.cabal
@@ -0,0 +1,41 @@
+name:           benchpress
+version:        0.2.2.10
+synopsis:       Micro-benchmarking with detailed statistics.
+Description:    Benchmarks actions and produces statistics
+                such as min, mean, median, standard deviation,
+                and max execution time.  Also computes
+                execution time percentiles.  Comes with
+                functions to pretty-print the results.
+license:        BSD3
+license-file:   LICENSE
+author:         Johan Tibell
+maintainer:     me@willsewell.com
+build-type:     Simple
+cabal-version:  >= 1.2
+category:       Testing
+homepage:       https://github.com/WillSewell/benchpress
+
+library
+  exposed-modules:  Test.BenchPress
+
+  other-modules:  Math.Statistics
+
+  build-depends:  base >= 2.0 && < 4.11,
+                  mtl >= 1 && < 2.3,
+                  time >= 1 && < 1.10
+
+  ghc-options:  -funbox-strict-fields -Wall
+
+executable example
+  main-is:  Main.hs
+
+  -- This is not in build-depends for cabal 1.2 compatibility (requires 1.8)
+  other-modules:  Test.BenchPress
+                  Math.Statistics
+
+  hs-source-dirs:  example, .
+
+  build-depends:  base,
+                  bytestring
+
+  ghc-options:  -funbox-strict-fields -Wall
diff --git a/test/golden-test-cases/benchpress.nix.golden b/test/golden-test-cases/benchpress.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/benchpress.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, bytestring, fetchurl, mtl, time }:
+mkDerivation {
+  pname = "benchpress";
+  version = "0.2.2.10";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base mtl time ];
+  executableHaskellDepends = [ base bytestring ];
+  homepage = "https://github.com/WillSewell/benchpress";
+  description = "Micro-benchmarking with detailed statistics";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/binary-bits.cabal b/test/golden-test-cases/binary-bits.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/binary-bits.cabal
@@ -0,0 +1,44 @@
+-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/
+name:                binary-bits
+version:             0.5
+synopsis:            Bit parsing/writing on top of binary.
+description:         Bit parsing/writing on top of binary. Provides functions to
+                     read and write bits to and from 8\/16\/32\/64 words.
+license:             BSD3
+license-file:        LICENSE
+author:              Lennart Kolmodin <kolmodin@gmail.com>
+maintainer:          Lennart Kolmodin <kolmodin@gmail.com>
+category:            Data, Parsing
+build-type:          Simple
+
+cabal-version:       >=1.10
+
+source-repository head
+  type: git
+  location: git://github.com/kolmodin/binary-bits.git
+
+library
+  build-depends: base==4.*, binary >= 0.6.0.0, bytestring
+
+  other-extensions: RankNTypes, MagicHash, BangPatterns, CPP
+
+  exposed-modules:     Data.Binary.Bits ,
+                       Data.Binary.Bits.Put ,
+                       Data.Binary.Bits.Get
+
+  default-language:    Haskell98
+
+  ghc-options: -O2 -Wall
+
+test-suite qc
+  type: exitcode-stdio-1.0
+  main-is: BitsQC.hs
+  default-language:    Haskell98
+
+  build-depends: base==4.*, binary >= 0.6.0.0, bytestring,
+                 QuickCheck>=2, random,
+                 test-framework,
+                 test-framework-quickcheck2
+
+  other-extensions: RankNTypes, MagicHash, BangPatterns, CPP,
+                    FlexibleInstances, FlexibleContexts, TupleSections
diff --git a/test/golden-test-cases/binary-bits.nix.golden b/test/golden-test-cases/binary-bits.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/binary-bits.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, binary, bytestring, fetchurl, QuickCheck
+, random, test-framework, test-framework-quickcheck2
+}:
+mkDerivation {
+  pname = "binary-bits";
+  version = "0.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base binary bytestring ];
+  testHaskellDepends = [
+    base binary bytestring QuickCheck random test-framework
+    test-framework-quickcheck2
+  ];
+  description = "Bit parsing/writing on top of binary";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/binary-tagged.cabal b/test/golden-test-cases/binary-tagged.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/binary-tagged.cabal
@@ -0,0 +1,121 @@
+-- This file has been generated from package.yaml by hpack version 0.14.1.
+--
+-- see: https://github.com/sol/hpack
+
+name:           binary-tagged
+version:        0.1.4.2
+synopsis:       Tagged binary serialisation.
+description:    Check <https://github.com/phadej/binary-tagged#readme README on Github>
+category:       Web
+homepage:       https://github.com/phadej/binary-tagged#readme
+bug-reports:    https://github.com/phadej/binary-tagged/issues
+author:         Oleg Grenrus <oleg.grenrus@iki.fi>
+maintainer:     Oleg Grenrus <oleg.grenrus@iki.fi>
+license:        BSD3
+license-file:   LICENSE
+tested-with:    GHC==7.8.4, GHC==7.10.3, GHC==8.0.1
+build-type:     Simple
+cabal-version:  >= 1.10
+
+extra-source-files:
+    CHANGELOG.md
+    README.md
+
+source-repository head
+  type: git
+  location: https://github.com/phadej/binary-tagged
+
+library
+  hs-source-dirs:
+      src
+  ghc-options: -Wall
+  build-depends:
+      base                     >=4.7  && <4.10
+    , aeson                    >=0.8  && <1.1
+    , array                    >=0.5  && <0.6
+    , base16-bytestring        >=0.1.1.6 && <0.2
+    , binary                   >=0.7  && <0.9
+    , bytestring               >=0.10 && <0.11
+    , containers               >=0.5  && <0.6
+    , generics-sop             >=0.1  && <0.3
+    , hashable                 >=1.2  && <1.3
+    , nats                     >=1    && <1.2
+    , scientific               >=0.3  && <0.4
+    , SHA                      >=1.6  && <1.7
+    , semigroups               >=0.16 && <0.19
+    , tagged                   >=0.7  && <0.9
+    , text                     >=1.2  && <1.3
+    , time                     >=1.4  && <1.7
+    , unordered-containers     >=0.2  && <0.3
+    , vector                   >=0.10 && <0.12
+  exposed-modules:
+      Data.Binary.Tagged
+  default-language: Haskell2010
+
+test-suite binary-tagged-test
+  type: exitcode-stdio-1.0
+  main-is: Tests.hs
+  hs-source-dirs:
+      test
+  ghc-options: -Wall
+  build-depends:
+      base                     >=4.7  && <4.10
+    , aeson                    >=0.8  && <1.1
+    , array                    >=0.5  && <0.6
+    , base16-bytestring        >=0.1.1.6 && <0.2
+    , binary                   >=0.7  && <0.9
+    , bytestring               >=0.10 && <0.11
+    , containers               >=0.5  && <0.6
+    , generics-sop             >=0.1  && <0.3
+    , hashable                 >=1.2  && <1.3
+    , nats                     >=1    && <1.2
+    , scientific               >=0.3  && <0.4
+    , SHA                      >=1.6  && <1.7
+    , semigroups               >=0.16 && <0.19
+    , tagged                   >=0.7  && <0.9
+    , text                     >=1.2  && <1.3
+    , time                     >=1.4  && <1.7
+    , unordered-containers     >=0.2  && <0.3
+    , vector                   >=0.10 && <0.12
+    , binary-tagged
+    , binary-orphans >=0.1.1
+    , bifunctors
+    , quickcheck-instances
+    , tasty
+    , tasty-quickcheck
+  other-modules:
+      Generators
+      Rec1
+      Rec2
+  default-language: Haskell2010
+
+benchmark binary-tagged-bench
+  type: exitcode-stdio-1.0
+  main-is: Bench.hs
+  hs-source-dirs:
+      bench
+  ghc-options: -Wall
+  build-depends:
+      base                     >=4.7  && <4.10
+    , aeson                    >=0.8  && <1.1
+    , array                    >=0.5  && <0.6
+    , base16-bytestring        >=0.1.1.6 && <0.2
+    , binary                   >=0.7  && <0.9
+    , bytestring               >=0.10 && <0.11
+    , containers               >=0.5  && <0.6
+    , generics-sop             >=0.1  && <0.3
+    , hashable                 >=1.2  && <1.3
+    , nats                     >=1    && <1.2
+    , scientific               >=0.3  && <0.4
+    , SHA                      >=1.6  && <1.7
+    , semigroups               >=0.16 && <0.19
+    , tagged                   >=0.7  && <0.9
+    , text                     >=1.2  && <1.3
+    , time                     >=1.4  && <1.7
+    , unordered-containers     >=0.2  && <0.3
+    , vector                   >=0.10 && <0.12
+    , binary-tagged
+    , binary-orphans >=0.1.1
+    , deepseq
+    , criterion
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/binary-tagged.nix.golden b/test/golden-test-cases/binary-tagged.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/binary-tagged.nix.golden
@@ -0,0 +1,33 @@
+{ mkDerivation, aeson, array, base, base16-bytestring, bifunctors
+, binary, binary-orphans, bytestring, containers, criterion
+, deepseq, fetchurl, generics-sop, hashable, nats
+, quickcheck-instances, scientific, semigroups, SHA, tagged, tasty
+, tasty-quickcheck, text, time, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "binary-tagged";
+  version = "0.1.4.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson array base base16-bytestring binary bytestring containers
+    generics-sop hashable nats scientific semigroups SHA tagged text
+    time unordered-containers vector
+  ];
+  testHaskellDepends = [
+    aeson array base base16-bytestring bifunctors binary binary-orphans
+    bytestring containers generics-sop hashable nats
+    quickcheck-instances scientific semigroups SHA tagged tasty
+    tasty-quickcheck text time unordered-containers vector
+  ];
+  benchmarkHaskellDepends = [
+    aeson array base base16-bytestring binary binary-orphans bytestring
+    containers criterion deepseq generics-sop hashable nats scientific
+    semigroups SHA tagged text time unordered-containers vector
+  ];
+  homepage = "https://github.com/phadej/binary-tagged#readme";
+  description = "Tagged binary serialisation";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/bindings-uname.cabal b/test/golden-test-cases/bindings-uname.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bindings-uname.cabal
@@ -0,0 +1,30 @@
+Name:                bindings-uname
+Version:             0.1
+Synopsis:            Low-level binding to POSIX uname(3)
+Description:
+        This is a low-level binding to POSIX uname(3)
+        function. Perhaps it shoule be part of unix package.
+Category:            FFI, System
+License:             PublicDomain
+Author:              PHO <pho at cielonegro.org>
+Maintainer:          PHO <pho at cielonegro.org>
+Stability:           Experimental
+Cabal-Version:       >= 1.6
+Build-Type:          Simple
+
+Source-Repository head
+    Type: git
+    Location: git://git.cielonegro.org/bindings-uname
+
+Library
+    Build-Depends:
+        base < 5
+
+    Exposed-Modules:
+        Bindings.Uname
+
+    Extensions:
+        EmptyDataDecls, ForeignFunctionInterface
+
+    GHC-Options:
+        -Wall
diff --git a/test/golden-test-cases/bindings-uname.nix.golden b/test/golden-test-cases/bindings-uname.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bindings-uname.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "bindings-uname";
+  version = "0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  description = "Low-level binding to POSIX uname(3)";
+  license = stdenv.lib.licenses.publicDomain;
+}
diff --git a/test/golden-test-cases/bioalign.cabal b/test/golden-test-cases/bioalign.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bioalign.cabal
@@ -0,0 +1,23 @@
+Name:                bioalign
+Version:             0.0.5
+Synopsis:            Data structures and helper functions for calculating alignments
+Description:         Data structures and helper functions for calculating alignments
+Homepage:	     https://patch-tag.com/r/dfornika/biophd/home
+License:             GPL
+License-file:        LICENSE
+Cabal-Version:       >=1.6
+Author:              Dan Fornika <dfornika@gmail.com>
+Maintainer:          dfornika@gmail.com
+Stability:	     Provisional
+Category:	     Bioinformatics
+Build-Type:          Simple
+
+Library
+  Build-depends:     base >= 2 && < 5, biocore, bytestring
+  Exposed-modules:   Bio.Alignment.AlignData
+  Hs-source-dirs:    src
+
+source-Repository    head
+  type:		     darcs
+  location:	     http://www.patch-tag.com/r/dfornika/bioalign
+
diff --git a/test/golden-test-cases/bioalign.nix.golden b/test/golden-test-cases/bioalign.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bioalign.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, biocore, bytestring, fetchurl }:
+mkDerivation {
+  pname = "bioalign";
+  version = "0.0.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base biocore bytestring ];
+  homepage = "https://patch-tag.com/r/dfornika/biophd/home";
+  description = "Data structures and helper functions for calculating alignments";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/bits.cabal b/test/golden-test-cases/bits.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bits.cabal
@@ -0,0 +1,73 @@
+name:          bits
+category:      Data, Serialization
+version:       0.5.1
+license:       BSD3
+cabal-version: >= 1.8
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     experimental
+homepage:      http://github.com/ekmett/bits
+bug-reports:   http://github.com/ekmett/bits/issues
+copyright:     Copyright (C) 2013 Edward A. Kmett
+build-type:    Custom
+tested-with:   GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
+synopsis:      Various bit twiddling and bitwise serialization primitives
+description:   Various bit twiddling and bitwise serialization primitives
+
+extra-source-files:
+  .travis.yml
+  .ghci
+  .gitignore
+  .vim.custom
+  travis/cabal-apt-install
+  travis/config
+  AUTHORS.markdown
+  README.markdown
+  CHANGELOG.markdown
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/bits.git
+
+custom-setup
+  setup-depends:
+    base          >= 4 && < 5,
+    Cabal,
+    cabal-doctest >= 1 && < 1.1
+
+-- You can disable the doctests test suite with -f-test-doctests
+flag test-doctests
+  default: True
+  manual: True
+
+library
+  build-depends:
+    base         >= 4.7      && < 5,
+    bytes        >= 0.11     && < 1,
+    mtl          >= 2.0      && < 2.3,
+    transformers >= 0.2      && < 0.6
+
+  exposed-modules:
+    Data.Bits.Coding
+    Data.Bits.Coded
+    Data.Bits.Extras
+
+  c-sources: cbits/debruijn.c
+  ghc-options: -Wall -fwarn-tabs -O2
+  hs-source-dirs: src
+
+test-suite doctests
+  type:           exitcode-stdio-1.0
+  main-is:        doctests.hs
+  ghc-options:    -Wall -threaded
+  hs-source-dirs: tests
+  c-sources:      cbits/debruijn.c
+
+  if !flag(test-doctests)
+    buildable: False
+  else
+    build-depends:
+      base,
+      bits,
+      doctest >= 0.11.1 && < 0.12
diff --git a/test/golden-test-cases/bits.nix.golden b/test/golden-test-cases/bits.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bits.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, bytes, Cabal, cabal-doctest, doctest
+, fetchurl, mtl, transformers
+}:
+mkDerivation {
+  pname = "bits";
+  version = "0.5.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  setupHaskellDepends = [ base Cabal cabal-doctest ];
+  libraryHaskellDepends = [ base bytes mtl transformers ];
+  testHaskellDepends = [ base doctest ];
+  homepage = "http://github.com/ekmett/bits";
+  description = "Various bit twiddling and bitwise serialization primitives";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/blank-canvas.cabal b/test/golden-test-cases/blank-canvas.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blank-canvas.cabal
@@ -0,0 +1,172 @@
+Name:                blank-canvas
+Version:             0.6.1
+Synopsis:            HTML5 Canvas Graphics Library
+
+Description:      @blank-canvas@ is a Haskell binding to the complete
+                  <https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API HTML5 Canvas API>.
+                  @blank-canvas@ allows Haskell users to write, in Haskell,
+                  interactive images onto their web browsers. @blank-canvas@
+                  gives the user a single full-window canvas, and provides
+                  many well-documented functions for rendering
+                  images.
+                  .
+                  @
+                     &#123;-&#35; LANGUAGE OverloadedStrings &#35;-&#125;
+                     module Main where
+                     import Graphics.Blank                     -- import the blank canvas
+                     .
+                     main = blankCanvas 3000 $ \\ context -> do -- start blank canvas on port 3000
+                     &#32;&#32;send context $ do                       -- send commands to this specific context
+                     &#32;&#32;&#32;&#32;moveTo(50,50)
+                     &#32;&#32;&#32;&#32;lineTo(200,100)
+                     &#32;&#32;&#32;&#32;lineWidth 10
+                     &#32;&#32;&#32;&#32;strokeStyle \"red\"
+                     &#32;&#32;&#32;&#32;stroke()                              -- this draws the ink into the canvas
+                  @
+                  .
+                  <<https://github.com/ku-fpg/blank-canvas/wiki/images/Red_Line.png>>
+                  .
+                  For more details, read the <https://github.com/ku-fpg/blank-canvas/wiki blank-canvas wiki>.
+                  .
+License:             BSD3
+License-file:        LICENSE
+Author:              Andy Gill and Ryan Scott
+Maintainer:          andygill@ku.edu
+Copyright:           Copyright (c) 2014 The University of Kansas
+Homepage:            https://github.com/ku-fpg/blank-canvas/wiki
+Bug-reports:         https://github.com/ku-fpg/blank-canvas/issues
+Category:            Graphics
+Build-type:          Simple
+Stability:           Beta
+Extra-source-files:  README.md
+                     Changelog.md
+Cabal-version:       >= 1.10
+tested-with:         GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
+data-files:
+    static/index.html
+    static/jquery.js
+    static/jquery-json.js
+
+
+Library
+  Exposed-modules:     Graphics.Blank
+                       Graphics.Blank.Cursor
+                       Graphics.Blank.Font
+                       Graphics.Blank.GHCi
+                       Graphics.Blank.Style
+  other-modules:       Graphics.Blank.Canvas
+                       Graphics.Blank.DeviceContext
+                       Graphics.Blank.Events
+                       Graphics.Blank.Generated
+                       Graphics.Blank.JavaScript
+                       Graphics.Blank.Parser
+                       Graphics.Blank.Types
+                       Graphics.Blank.Types.CSS
+                       Graphics.Blank.Types.Cursor
+                       Graphics.Blank.Types.Font
+                       Graphics.Blank.Utils
+                       Paths_blank_canvas
+
+  default-language:    Haskell2010
+  build-depends:       aeson              >= 0.7     && < 1.3,
+                       base64-bytestring  == 1.0.*,
+                       base               >= 4.7     && < 4.11,
+                       base-compat        >= 0.8.1   && < 1,
+                       bytestring         == 0.10.*,
+                       colour             >= 2.2     && < 3.0,
+                       containers         == 0.5.*,
+                       data-default-class >= 0.0.1   && < 0.2,
+                       http-types         >= 0.8     && < 0.10,
+                       mime-types         >= 0.1.0.3 && < 0.2,
+                       kansas-comet       >= 0.4     && < 0.5,
+                       scotty             >= 0.10    && < 0.12,
+                       stm                >= 2.2     && < 2.5,
+                       text               >= 1.1     && < 1.3,
+                       text-show          >= 2       && < 4,
+                       transformers       >= 0.3     && < 0.6,
+                       wai                == 3.*,
+                       wai-extra          >= 3.0.1   && < 3.1,
+                       warp               == 3.*,
+                       vector             >= 0.10    && < 0.13
+
+  GHC-options:         -Wall
+  GHC-prof-options:    -Wall -fsimpl-tick-factor=100000
+
+
+test-suite wiki-suite
+    build-depends:    base              >= 4.7  && < 4.11,
+                      blank-canvas,
+                      containers        == 0.5.*,
+                      process           >= 1.2  && < 1.7,
+                      directory         >= 1.2,
+                      shake             >= 0.13,
+                      stm               >= 2.2  && < 2.5,
+                      text              >= 1.1  && < 1.3,
+                      time              >= 1.4  && < 1.9,
+                      unix              == 2.7.*,
+                      vector            >= 0.10 && < 0.13
+
+    default-language: Haskell2010
+    GHC-options:      -threaded -Wall
+    main-is:          Main.hs
+    hs-source-dirs:   wiki-suite
+    type:             exitcode-stdio-1.0
+    other-modules:    Arc
+                      Bezier_Curve
+                      Bounce
+                      Circle
+                      Clipping_Region
+                      Color_Fill
+                      Color_Square
+                      Custom_Shape
+                      Custom_Transform
+                      Draw_Canvas
+                      Draw_Device
+                      Draw_Image
+                      Favicon
+                      Font_Size_and_Style
+                      Get_Image_Data_URL
+                      Global_Alpha
+                      Global_Composite_Operations
+                      Grayscale
+                      Image_Crop
+                      Image_Loader
+                      Image_Size
+                      Is_Point_In_Path
+                      Key_Read
+                      Line
+                      Line_Cap
+                      Line_Color
+                      Line_Join
+                      Line_Width
+                      Linear_Gradient
+                      Load_Image_Data_URL
+                      Load_Image_Data_URL_2
+                      Miter_Limit
+                      Path
+                      Pattern
+                      Quadratic_Curve
+                      Radial_Gradient
+                      Rectangle
+                      Red_Line
+                      Rotate_Transform
+                      Rotating_Square
+                      Rounded_Corners
+                      Scale_Transform
+                      Semicircle
+                      Shadow
+                      Square
+                      Text_Align
+                      Text_Baseline
+                      Text_Color
+                      Text_Metrics
+                      Text_Stroke
+                      Text_Wrap
+                      Tic_Tac_Toe
+                      Translate_Transform
+                      Wiki
+
+
+source-repository head
+  type:     git
+  location: https://github.com/ku-fpg/blank-canvas.git
diff --git a/test/golden-test-cases/blank-canvas.nix.golden b/test/golden-test-cases/blank-canvas.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blank-canvas.nix.golden
@@ -0,0 +1,26 @@
+{ mkDerivation, aeson, base, base-compat, base64-bytestring
+, bytestring, colour, containers, data-default-class, directory
+, fetchurl, http-types, kansas-comet, mime-types, process, scotty
+, shake, stm, text, text-show, time, transformers, unix, vector
+, wai, wai-extra, warp
+}:
+mkDerivation {
+  pname = "blank-canvas";
+  version = "0.6.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    aeson base base-compat base64-bytestring bytestring colour
+    containers data-default-class http-types kansas-comet mime-types
+    scotty stm text text-show transformers vector wai wai-extra warp
+  ];
+  testHaskellDepends = [
+    base containers directory process shake stm text time unix vector
+  ];
+  homepage = "https://github.com/ku-fpg/blank-canvas/wiki";
+  description = "HTML5 Canvas Graphics Library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/blaze-html.cabal b/test/golden-test-cases/blaze-html.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blaze-html.cabal
@@ -0,0 +1,87 @@
+Name:         blaze-html
+Version:      0.9.0.1
+Homepage:     http://jaspervdj.be/blaze
+Bug-Reports:  http://github.com/jaspervdj/blaze-html/issues
+License:      BSD3
+License-file: LICENSE
+Author:       Jasper Van der Jeugt, Simon Meier
+Maintainer:   Jasper Van der Jeugt <m@jaspervdj.be>
+Stability:    Experimental
+Category:     Text
+Synopsis:     A blazingly fast HTML combinator library for Haskell
+Description:
+  A blazingly fast HTML combinator library for the Haskell
+  programming language. The Text.Blaze module is a good
+  starting point, as well as this tutorial:
+  <http://jaspervdj.be/blaze/tutorial.html>.
+
+Build-type:    Simple
+Cabal-version: >= 1.8
+
+Extra-source-files:
+  CHANGELOG
+  src/Util/Sanitize.hs
+  src/Util/GenerateHtmlCombinators.hs
+
+Library
+  Hs-source-dirs: src
+  Ghc-Options:    -Wall
+
+  Exposed-modules:
+    Text.Blaze.Html
+    Text.Blaze.Html.Renderer.Pretty
+    Text.Blaze.Html.Renderer.String
+    Text.Blaze.Html.Renderer.Text
+    Text.Blaze.Html.Renderer.Utf8
+    Text.Blaze.Html4.FrameSet
+    Text.Blaze.Html4.FrameSet.Attributes
+    Text.Blaze.Html4.Strict
+    Text.Blaze.Html4.Strict.Attributes
+    Text.Blaze.Html4.Transitional
+    Text.Blaze.Html4.Transitional.Attributes
+    Text.Blaze.Html5
+    Text.Blaze.Html5.Attributes
+    Text.Blaze.XHtml1.FrameSet
+    Text.Blaze.XHtml1.FrameSet.Attributes
+    Text.Blaze.XHtml1.Strict
+    Text.Blaze.XHtml1.Strict.Attributes
+    Text.Blaze.XHtml1.Transitional
+    Text.Blaze.XHtml1.Transitional.Attributes
+    Text.Blaze.XHtml5
+    Text.Blaze.XHtml5.Attributes
+
+  Build-depends:
+    base          >= 4    && < 5,
+    blaze-builder >= 0.3  && < 0.5,
+    blaze-markup  >= 0.8  && < 0.9,
+    bytestring    >= 0.9  && < 0.11,
+    text          >= 0.10 && < 1.3
+
+Test-suite blaze-html-tests
+  Type:           exitcode-stdio-1.0
+  Hs-source-dirs: src tests
+  Main-is:        TestSuite.hs
+  Ghc-options:    -Wall
+
+  Other-modules:
+    Text.Blaze.Html.Tests
+    Text.Blaze.Html.Tests.Util
+    Util.Tests
+
+  Build-depends:
+    HUnit                      >= 1.2 && < 1.6,
+    QuickCheck                 >= 2.4 && < 2.10,
+    containers                 >= 0.3 && < 0.6,
+    test-framework             >= 0.4 && < 0.9,
+    test-framework-hunit       >= 0.3 && < 0.4,
+    test-framework-quickcheck2 >= 0.3 && < 0.4,
+    -- Copied from regular dependencies...
+    base          >= 4    && < 5,
+    blaze-builder >= 0.3  && < 0.5,
+    blaze-markup  >= 0.8  && < 0.9,
+    bytestring    >= 0.9  && < 0.11,
+    text          >= 0.10 && < 1.3
+
+Source-repository head
+  Type:     git
+  Location: http://github.com/jaspervdj/blaze-html.git
diff --git a/test/golden-test-cases/blaze-html.nix.golden b/test/golden-test-cases/blaze-html.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blaze-html.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, blaze-builder, blaze-markup, bytestring
+, containers, fetchurl, HUnit, QuickCheck, test-framework
+, test-framework-hunit, test-framework-quickcheck2, text
+}:
+mkDerivation {
+  pname = "blaze-html";
+  version = "0.9.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base blaze-builder blaze-markup bytestring text
+  ];
+  testHaskellDepends = [
+    base blaze-builder blaze-markup bytestring containers HUnit
+    QuickCheck test-framework test-framework-hunit
+    test-framework-quickcheck2 text
+  ];
+  homepage = "http://jaspervdj.be/blaze";
+  description = "A blazingly fast HTML combinator library for Haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/blaze-markup.cabal b/test/golden-test-cases/blaze-markup.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blaze-markup.cabal
@@ -0,0 +1,67 @@
+Name:         blaze-markup
+Version:      0.8.0.0
+Homepage:     http://jaspervdj.be/blaze
+Bug-Reports:  http://github.com/jaspervdj/blaze-markup/issues
+License:      BSD3
+License-file: LICENSE
+Author:       Jasper Van der Jeugt, Simon Meier, Deepak Jois
+Maintainer:   Jasper Van der Jeugt <m@jaspervdj.be>
+Stability:    Experimental
+Category:     Text
+Synopsis:     A blazingly fast markup combinator library for Haskell
+Description:
+  Core modules of a blazingly fast markup combinator library for the Haskell
+  programming language. The Text.Blaze module is a good
+  starting point, as well as this tutorial:
+  <http://jaspervdj.be/blaze/tutorial.html>.
+
+Build-type:    Simple
+Cabal-version: >= 1.8
+
+Extra-source-files:
+  CHANGELOG
+
+Library
+  Hs-source-dirs: src
+  Ghc-Options:    -Wall
+
+  Exposed-modules:
+    Text.Blaze
+    Text.Blaze.Internal
+    Text.Blaze.Renderer.Pretty
+    Text.Blaze.Renderer.String
+    Text.Blaze.Renderer.Text
+    Text.Blaze.Renderer.Utf8
+
+  Build-depends:
+    base          >= 4    && < 5,
+    blaze-builder >= 0.3  && < 0.5,
+    text          >= 0.10 && < 1.3,
+    bytestring    >= 0.9  && < 0.11
+
+Test-suite blaze-markup-tests
+  Type:           exitcode-stdio-1.0
+  Hs-source-dirs: src tests
+  Main-is:        TestSuite.hs
+  Ghc-options:    -Wall
+
+  Other-modules:
+    Text.Blaze.Tests
+    Text.Blaze.Tests.Util
+
+  Build-depends:
+    HUnit                      >= 1.2 && < 1.6,
+    QuickCheck                 >= 2.4 && < 2.10,
+    containers                 >= 0.3 && < 0.6,
+    test-framework             >= 0.4 && < 0.9,
+    test-framework-hunit       >= 0.3 && < 0.4,
+    test-framework-quickcheck2 >= 0.3 && < 0.4,
+    -- Copied from regular dependencies...
+    base          >= 4    && < 5,
+    blaze-builder >= 0.3  && < 0.5,
+    text          >= 0.10 && < 1.3,
+    bytestring    >= 0.9  && < 0.11
+
+Source-repository head
+  Type:     git
+  Location: http://github.com/jaspervdj/blaze-markup
diff --git a/test/golden-test-cases/blaze-markup.nix.golden b/test/golden-test-cases/blaze-markup.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blaze-markup.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, blaze-builder, bytestring, containers
+, fetchurl, HUnit, QuickCheck, test-framework, test-framework-hunit
+, test-framework-quickcheck2, text
+}:
+mkDerivation {
+  pname = "blaze-markup";
+  version = "0.8.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base blaze-builder bytestring text ];
+  testHaskellDepends = [
+    base blaze-builder bytestring containers HUnit QuickCheck
+    test-framework test-framework-hunit test-framework-quickcheck2 text
+  ];
+  homepage = "http://jaspervdj.be/blaze";
+  description = "A blazingly fast markup combinator library for Haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/blaze-svg.cabal b/test/golden-test-cases/blaze-svg.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blaze-svg.cabal
@@ -0,0 +1,54 @@
+name:                blaze-svg
+version:             0.3.6.1
+synopsis:            SVG combinator library
+homepage:            https://github.com/deepakjois/blaze-svg
+license:             BSD3
+license-file:        LICENSE
+author:              Deepak Jois
+maintainer:          deepak.jois@gmail.com
+category:            Graphics
+build-type:          Simple
+cabal-version:       >=1.8
+description:
+  A blazingly fast SVG combinator library for the Haskell
+  programming language. The "Text.Blaze.SVG" module is a good
+  starting point.
+  .
+  Other documentation:
+  .
+  * Programs in the /examples/ folder of this project: <https://github.com/deepakjois/blaze-svg/tree/master/examples/>
+  .
+  * Jasper Van Der Jeugt has written a tutorial for /blaze-html/,
+    which is a sister library of /blaze-svg/. It may not be directly relevant,
+    but still it gives a good overview on how to use the  combinators in
+    "Text.Blaze.Svg11" and "Text.Blaze.Svg11.Attributes":
+    <http://jaspervdj.be/blaze/tutorial.html>.
+
+Extra-source-files:
+  src/Util/Sanitize.hs
+  src/Util/GenerateSvgCombinators.hs
+  examples/*.hs
+  CHANGES.md
+
+Library
+  Hs-Source-Dirs: src
+  Ghc-Options:       -Wall
+
+  Exposed-modules:
+    Text.Blaze.Svg
+    Text.Blaze.Svg.Internal
+    Text.Blaze.Svg11
+    Text.Blaze.Svg11.Attributes
+    Text.Blaze.Svg.Renderer.Pretty
+    Text.Blaze.Svg.Renderer.String
+    Text.Blaze.Svg.Renderer.Text
+    Text.Blaze.Svg.Renderer.Utf8
+
+  Build-depends:
+    base            >= 4  && < 5,
+    mtl             >= 2  && < 3,
+    blaze-markup    >= 0.5 && < 0.9
+
+Source-repository head
+  Type:     git
+  Location: http://github.com/deepakjois/blaze-svg.git
diff --git a/test/golden-test-cases/blaze-svg.nix.golden b/test/golden-test-cases/blaze-svg.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blaze-svg.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, blaze-markup, fetchurl, mtl }:
+mkDerivation {
+  pname = "blaze-svg";
+  version = "0.3.6.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base blaze-markup mtl ];
+  homepage = "https://github.com/deepakjois/blaze-svg";
+  description = "SVG combinator library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/blosum.cabal b/test/golden-test-cases/blosum.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blosum.cabal
@@ -0,0 +1,48 @@
+name:                blosum
+version:             0.1.1.4
+synopsis:            BLOSUM generator
+description:         Generates BLOSUMs for use with finding the degree of amino acid conservation.
+homepage:            http://github.com/GregorySchwartz/blosum#readme
+license:             GPL-2
+license-file:        LICENSE
+author:              Gregory W. Schwartz
+maintainer:          gregory.schwartz@drexel.edu
+copyright:           Copyright 2016 Gregory W. Schwartz
+category:            Bioinformatics
+build-type:          Simple
+-- extra-source-files:
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Types
+                     , Utility
+                     , Cluster
+                     , Matrix
+                     , Print
+  build-depends:       base >= 4.9 && < 5
+                     , containers
+                     , text
+                     , text-show
+                     , fasta
+                     , lens
+  default-language:    Haskell2010
+
+executable blosum
+  hs-source-dirs:      app
+  main-is:             Main.hs
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N -O2
+  build-depends:       base
+                     , blosum
+                     , containers
+                     , fasta
+                     , text
+                     , split
+                     , pipes
+                     , pipes-text
+                     , optparse-applicative >=0.13
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/GregorySchwartz/blosum
diff --git a/test/golden-test-cases/blosum.nix.golden b/test/golden-test-cases/blosum.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/blosum.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, containers, fasta, fetchurl, lens
+, optparse-applicative, pipes, pipes-text, split, text, text-show
+}:
+mkDerivation {
+  pname = "blosum";
+  version = "0.1.1.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base containers fasta lens text text-show
+  ];
+  executableHaskellDepends = [
+    base containers fasta optparse-applicative pipes pipes-text split
+    text
+  ];
+  homepage = "http://github.com/GregorySchwartz/blosum#readme";
+  description = "BLOSUM generator";
+  license = stdenv.lib.licenses.gpl2;
+}
diff --git a/test/golden-test-cases/boomerang.cabal b/test/golden-test-cases/boomerang.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/boomerang.cabal
@@ -0,0 +1,45 @@
+Name:             boomerang
+Version:          1.4.5.3
+License:          BSD3
+License-File:     LICENSE
+Author:           jeremy@seereason.com
+Maintainer:       partners@seereason.com
+Bug-Reports:      http://code.google.com/p/happstack/issues/list
+Category:         Parsing, Text
+Synopsis:         Library for invertible parsing and printing
+Description:      Specify a single unified grammar which can be used for parsing and pretty-printing
+Cabal-Version:    >= 1.6
+Build-type:       Simple
+tested-with:      GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+
+Library
+        Build-Depends:    base             >= 4    && < 5,
+                          mtl              >= 2.0  && < 2.3,
+                          template-haskell            < 2.13,
+                          text             >= 0.11 && < 1.3
+        Exposed-Modules:  Text.Boomerang
+                          Text.Boomerang.Combinators
+                          Text.Boomerang.Error
+                          Text.Boomerang.HStack
+                          Text.Boomerang.Pos
+                          Text.Boomerang.Prim
+                          Text.Boomerang.String
+                          Text.Boomerang.Strings
+                          Text.Boomerang.Texts
+                          Text.Boomerang.TH
+
+        Extensions:       DeriveDataTypeable,
+                          FlexibleContexts,
+                          FlexibleContexts,
+                          FlexibleInstances,
+                          RankNTypes,
+                          ScopedTypeVariables,
+                          TemplateHaskell,
+                          TypeFamilies,
+                          TypeFamilies,
+                          TypeOperators,
+                          TypeSynonymInstances
+
+source-repository head
+    type:     git
+    location: https://github.com/Happstack/boomerang.git
diff --git a/test/golden-test-cases/boomerang.nix.golden b/test/golden-test-cases/boomerang.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/boomerang.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchurl, mtl, template-haskell, text }:
+mkDerivation {
+  pname = "boomerang";
+  version = "1.4.5.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base mtl template-haskell text ];
+  description = "Library for invertible parsing and printing";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/boxes.cabal b/test/golden-test-cases/boxes.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/boxes.cabal
@@ -0,0 +1,35 @@
+name:                boxes
+version:             0.1.4
+synopsis:            2D text pretty-printing library
+description:         A pretty-printing library for laying out text in
+                     two dimensions, using a simple box model.
+category:            Text
+license:             BSD3
+license-file:        LICENSE
+extra-source-files:  CHANGES, README.md
+author:              Brent Yorgey
+maintainer:          David Feuer <David.Feuer@gmail.com>
+build-type:          Simple
+cabal-version:       >= 1.9.2
+-- Minimum Cabal version supporting test suites
+
+library
+  build-depends:     base >= 3 && < 5, split >=0.2 && <0.3
+  exposed-modules:   Text.PrettyPrint.Boxes
+  extensions:        CPP
+  if impl(ghc)
+    extensions: OverloadedStrings
+
+Test-Suite test-boxes
+  type:              exitcode-stdio-1.0
+  main-is:           Text/PrettyPrint/Tests.hs
+  build-depends:     base >= 3 && < 5, split >=0.2 && <0.3, QuickCheck
+  extensions:        CPP
+  if impl(ghc)
+     extensions: OverloadedStrings
+  cpp-options:       -DTESTING
+-- Export some internals so the tests can get at them
+
+source-repository head
+  type: git
+  location: git://github.com/treeowl/boxes.git
diff --git a/test/golden-test-cases/boxes.nix.golden b/test/golden-test-cases/boxes.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/boxes.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, QuickCheck, split }:
+mkDerivation {
+  pname = "boxes";
+  version = "0.1.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base split ];
+  testHaskellDepends = [ base QuickCheck split ];
+  description = "2D text pretty-printing library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/brittany.cabal b/test/golden-test-cases/brittany.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/brittany.cabal
@@ -0,0 +1,372 @@
+name:                 brittany
+version:              0.9.0.0
+synopsis:             Haskell source code formatter
+description: {
+  See <https://github.com/lspitzner/brittany/blob/master/README.md the README>.
+  .
+  If you are interested in the implementation, have a look at <https://github.com/lspitzner/brittany/blob/master/doc/implementation/theory.md this document>;
+  .
+  The implementation is documented in more detail <https://github.com/lspitzner/brittany/blob/master/doc/implementation/index.md here>.
+}
+license:              AGPL-3
+license-file:         LICENSE
+author:               Lennart Spitzner
+maintainer:           Lennart Spitzner <hexagoxel@hexagoxel.de>
+copyright:            Copyright (C) 2016-2017 Lennart Spitzner
+category:             Language
+build-type:           Simple
+cabal-version:        >=1.18
+homepage:             https://github.com/lspitzner/brittany/
+bug-reports:          https://github.com/lspitzner/brittany/issues
+extra-doc-files: {
+  ChangeLog.md
+  README.md
+  doc/implementation/*.md
+}
+extra-source-files: {
+  src-literatetests/*.blt
+}
+
+source-repository head {
+  type: git
+  location: https://github.com/lspitzner/brittany.git
+}
+
+flag brittany-dev-lib
+  description: set buildable false for anything but lib
+  default: False
+  manual: True
+
+library {
+  default-language:
+    Haskell2010
+  hs-source-dirs:
+    src
+  install-includes: {
+    srcinc/prelude.inc
+  }
+  exposed-modules: {
+    Language.Haskell.Brittany
+    Language.Haskell.Brittany.Internal
+    Language.Haskell.Brittany.Internal.Prelude
+    Language.Haskell.Brittany.Internal.PreludeUtils
+    Language.Haskell.Brittany.Internal.Types
+    Language.Haskell.Brittany.Internal.Utils
+    Language.Haskell.Brittany.Internal.Config
+    Language.Haskell.Brittany.Internal.Config.Types
+    Language.Haskell.Brittany.Internal.Config.Types.Instances
+    Paths_brittany
+  }
+  other-modules: {
+    Language.Haskell.Brittany.Internal.LayouterBasics
+    Language.Haskell.Brittany.Internal.Backend
+    Language.Haskell.Brittany.Internal.BackendUtils
+    Language.Haskell.Brittany.Internal.ExactPrintUtils
+    Language.Haskell.Brittany.Internal.Layouters.Type
+    Language.Haskell.Brittany.Internal.Layouters.Decl
+    Language.Haskell.Brittany.Internal.Layouters.Expr
+    Language.Haskell.Brittany.Internal.Layouters.Stmt
+    Language.Haskell.Brittany.Internal.Layouters.Pattern
+    Language.Haskell.Brittany.Internal.Transformations.Alt
+    Language.Haskell.Brittany.Internal.Transformations.Floating
+    Language.Haskell.Brittany.Internal.Transformations.Par
+    Language.Haskell.Brittany.Internal.Transformations.Columns
+    Language.Haskell.Brittany.Internal.Transformations.Indent
+  }
+  ghc-options: {
+    -Wall
+    -fno-warn-unused-imports
+    -fno-warn-redundant-constraints
+  }
+  build-depends:
+    { base >=4.9 && <4.11
+    , ghc >=8.0.1 && <8.3
+    , ghc-paths >=0.1.0.9 && <0.2
+    , ghc-exactprint >=0.5.3.0 && <0.6
+    , transformers >=0.5.2.0 && <0.6
+    , containers >=0.5.7.1 && <0.6
+    , mtl >=2.2.1 && <2.3
+    , text >=1.2 && <1.3
+    , multistate >=0.7.1.1 && <0.8
+    , syb >=0.6 && <0.8
+    , neat-interpolation >=0.3.2 && <0.4
+    , data-tree-print
+    , pretty >=1.1.3.3 && <1.2
+    , bytestring >=0.10.8.1 && <0.11
+    , directory >=1.2.6.2 && <1.4
+    , butcher >=1.2 && <1.3
+    , yaml >=0.8.18 && <0.9
+    , aeson >=1.0.1.0 && <1.3
+    , extra >=1.4.10 && <1.7
+    , uniplate >=1.6.12 && <1.7
+    , strict >=0.3.2 && <0.4
+    , monad-memo >=0.4.1 && <0.5
+    , unsafe >=0.0 && <0.1
+    , safe >=0.3.9 && <0.4
+    , deepseq >=1.4.2.0 && <1.5
+    , semigroups >=0.18.2 && <0.19
+    , cmdargs >=0.10.14 && <0.11
+    , czipwith >=1.0.0.0 && <1.1
+    , ghc-boot-th >=8.0.1 && <8.3
+    }
+  default-extensions: {
+    CPP
+
+    NoImplicitPrelude
+
+    GADTs
+
+    FlexibleContexts
+    FlexibleInstances
+    ScopedTypeVariables
+    MonadComprehensions
+    LambdaCase
+    MultiWayIf
+    KindSignatures
+  }
+  include-dirs:
+    srcinc
+}
+
+executable brittany
+  if flag(brittany-dev-lib) {
+    buildable: False
+  } else {
+    buildable: True
+  }
+  main-is:             Main.hs
+  other-modules: {
+    Paths_brittany
+  }
+  -- other-extensions:
+  build-depends:
+    { brittany
+    , base
+    , ghc
+    , ghc-paths
+    , ghc-exactprint
+    , transformers
+    , containers
+    , mtl
+    , text
+    , multistate
+    , syb
+    , neat-interpolation
+    , data-tree-print
+    , pretty
+    , bytestring
+    , directory
+    , butcher
+    , yaml
+    , aeson
+    , extra
+    , uniplate
+    , strict
+    , monad-memo
+    , unsafe
+    , safe
+    , deepseq
+    , semigroups
+    , cmdargs
+    , czipwith
+    , ghc-boot-th
+    , hspec >=2.4.1 && <2.5
+    , filepath >=1.4.1.0 && <1.5
+    }
+  hs-source-dirs:      src-brittany
+  default-language:    Haskell2010
+  default-extensions: {
+    CPP
+
+    NoImplicitPrelude
+
+    GADTs
+
+    FlexibleContexts
+    FlexibleInstances
+    ScopedTypeVariables
+    MonadComprehensions
+    LambdaCase
+    MultiWayIf
+    KindSignatures
+  }
+  ghc-options: {
+    -Wall
+    -fno-spec-constr
+    -fno-warn-unused-imports
+    -fno-warn-redundant-constraints
+    -rtsopts
+    -with-rtsopts "-M2G"
+  }
+
+test-suite unittests
+  if flag(brittany-dev-lib) {
+    buildable: False
+  } else {
+    buildable: True
+  }
+  type:             exitcode-stdio-1.0
+  default-language: Haskell2010
+  build-depends:
+    { brittany
+    , base
+    , ghc
+    , ghc-paths
+    , ghc-exactprint
+    , transformers
+    , containers
+    , mtl
+    , text
+    , multistate
+    , syb
+    , neat-interpolation
+    , data-tree-print
+    , pretty
+    , bytestring
+    , directory
+    , butcher
+    , yaml
+    , aeson
+    , extra
+    , uniplate
+    , strict
+    , monad-memo
+    , unsafe
+    , safe
+    , deepseq
+    , semigroups
+    , cmdargs
+    , czipwith
+    , ghc-boot-th
+    , hspec >=2.4.1 && <2.5
+    }
+  ghc-options:      -Wall
+  main-is:          TestMain.hs
+  other-modules:    TestUtils
+                    AsymptoticPerfTests
+  hs-source-dirs:   src-unittests
+  default-extensions: {
+    CPP
+
+    NoImplicitPrelude
+
+    GADTs
+
+    FlexibleContexts
+    FlexibleInstances
+    ScopedTypeVariables
+    MonadComprehensions
+    LambdaCase
+    MultiWayIf
+    KindSignatures
+  }
+  ghc-options: {
+    -Wall
+    -fno-warn-unused-imports
+    -rtsopts
+    -with-rtsopts "-M2G"
+  }
+
+test-suite littests
+  if flag(brittany-dev-lib) {
+    buildable: False
+  } else {
+    buildable: True
+  }
+  type:             exitcode-stdio-1.0
+  default-language: Haskell2010
+  build-depends:
+    { brittany
+    , base
+    , ghc
+    , ghc-paths
+    , ghc-exactprint
+    , transformers
+    , containers
+    , mtl
+    , text
+    , multistate
+    , syb
+    , neat-interpolation
+    , data-tree-print
+    , pretty
+    , bytestring
+    , directory
+    , butcher
+    , yaml
+    , aeson
+    , extra
+    , uniplate
+    , strict
+    , monad-memo
+    , unsafe
+    , safe
+    , deepseq
+    , semigroups
+    , cmdargs
+    , czipwith
+    , ghc-boot-th
+    , hspec >=2.4.1 && <2.5
+    , filepath
+    , parsec >=3.1.11 && <3.2
+    }
+  ghc-options:      -Wall
+  main-is:          Main.hs
+  other-modules:
+  hs-source-dirs:   src-literatetests
+  default-extensions: {
+    CPP
+
+    NoImplicitPrelude
+
+    GADTs
+
+    FlexibleContexts
+    FlexibleInstances
+    ScopedTypeVariables
+    MonadComprehensions
+    LambdaCase
+    MultiWayIf
+    KindSignatures
+  }
+  ghc-options: {
+    -Wall
+    -fno-warn-unused-imports
+    -rtsopts
+    -with-rtsopts "-M2G"
+  }
+
+test-suite libinterfacetests
+  if flag(brittany-dev-lib) {
+    buildable: False
+  } else {
+    buildable: True
+  }
+  type:             exitcode-stdio-1.0
+  default-language: Haskell2010
+  build-depends:
+    { brittany
+    , base
+    , text
+    , transformers
+    , hspec >=2.4.1 && <2.5
+    }
+  ghc-options:      -Wall
+  main-is:          Main.hs
+  other-modules:
+  hs-source-dirs:   src-libinterfacetests
+  default-extensions: {
+    FlexibleContexts
+    FlexibleInstances
+    ScopedTypeVariables
+    MonadComprehensions
+    LambdaCase
+    MultiWayIf
+    KindSignatures
+  }
+  ghc-options: {
+    -Wall
+    -fno-warn-unused-imports
+    -rtsopts
+    -with-rtsopts "-M2G"
+  }
diff --git a/test/golden-test-cases/brittany.nix.golden b/test/golden-test-cases/brittany.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/brittany.nix.golden
@@ -0,0 +1,41 @@
+{ mkDerivation, aeson, base, butcher, bytestring, cmdargs
+, containers, czipwith, data-tree-print, deepseq, directory, extra
+, fetchurl, filepath, ghc, ghc-boot-th, ghc-exactprint, ghc-paths
+, hspec, monad-memo, mtl, multistate, neat-interpolation, parsec
+, pretty, safe, semigroups, strict, syb, text, transformers
+, uniplate, unsafe, yaml
+}:
+mkDerivation {
+  pname = "brittany";
+  version = "0.9.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base butcher bytestring cmdargs containers czipwith
+    data-tree-print deepseq directory extra ghc ghc-boot-th
+    ghc-exactprint ghc-paths monad-memo mtl multistate
+    neat-interpolation pretty safe semigroups strict syb text
+    transformers uniplate unsafe yaml
+  ];
+  executableHaskellDepends = [
+    aeson base butcher bytestring cmdargs containers czipwith
+    data-tree-print deepseq directory extra filepath ghc ghc-boot-th
+    ghc-exactprint ghc-paths hspec monad-memo mtl multistate
+    neat-interpolation pretty safe semigroups strict syb text
+    transformers uniplate unsafe yaml
+  ];
+  testHaskellDepends = [
+    aeson base butcher bytestring cmdargs containers czipwith
+    data-tree-print deepseq directory extra filepath ghc ghc-boot-th
+    ghc-exactprint ghc-paths hspec monad-memo mtl multistate
+    neat-interpolation parsec pretty safe semigroups strict syb text
+    transformers uniplate unsafe yaml
+  ];
+  homepage = "https://github.com/lspitzner/brittany/";
+  description = "Haskell source code formatter";
+  license = stdenv.lib.licenses.agpl3;
+}
diff --git a/test/golden-test-cases/broadcast-chan.cabal b/test/golden-test-cases/broadcast-chan.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/broadcast-chan.cabal
@@ -0,0 +1,53 @@
+Name:                broadcast-chan
+Version:             0.1.1
+
+Homepage:            https://github.com/merijn/broadcast-chan
+Bug-Reports:         https://github.com/merijn/broadcast-chan/issues
+
+Author:              Merijn Verstraaten
+Maintainer:          Merijn Verstraaten <merijn@inconsistent.nl>
+Copyright:           Copyright © 2014 Merijn Verstraaten
+
+License:             BSD3
+License-File:        LICENSE
+
+Category:            System
+Cabal-Version:       >= 1.10
+Build-Type:          Simple
+Tested-With:         GHC == 7.8.3
+
+Synopsis:            Broadcast channel type that avoids 0 reader space leaks.
+
+Description:
+    A variation of "Control.Concurrent.Chan" from base, which allows to the
+    easy creation of broadcast channels without the space-leaks that may arise
+    from using 'Control.Concurrent.Chan.dupChan'.
+
+    The 'Control.Concurrent.Chan.Chan' type from "Control.Concurrent.Chan"
+    consists of both a read and write end. This presents a problem when one
+    wants to have a broadcast channel that, at times, has zero listeners. To
+    write to a 'Control.Concurrent.Chan.Chan' there must always be a read end
+    and this read end will hold ALL messages alive until read.
+
+    The simple solution applied in this module is to separate read and write
+    ends. As a result, any messages written to the write end can be immediately
+    garbage collected if there are no active read ends, avoding space leaks.
+
+Library
+  Default-Language:     Haskell2010
+  GHC-Options:          -Wall -fno-warn-unused-do-bind
+  Exposed-Modules:      Control.Concurrent.BroadcastChan
+
+  Build-Depends:        base >= 4 && < 5
+
+Source-Repository head
+  Type:     git
+  Location: ssh://github.com:merijn/broadcast-chan.git
+
+Source-Repository head
+  Type:     mercurial
+  Location: git+ssh://github.com:merijn/broadcast-chan.git
+
+Source-Repository head
+  Type:     mercurial
+  Location: https://bitbucket.org/merijnv/broadcast-chan
diff --git a/test/golden-test-cases/broadcast-chan.nix.golden b/test/golden-test-cases/broadcast-chan.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/broadcast-chan.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "broadcast-chan";
+  version = "0.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/merijn/broadcast-chan";
+  description = "Broadcast channel type that avoids 0 reader space leaks";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/butcher.cabal b/test/golden-test-cases/butcher.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/butcher.cabal
@@ -0,0 +1,157 @@
+name:                butcher
+version:             1.2.1.0
+synopsis:            Chops a command or program invocation into digestable pieces.
+description:         See the <https://github.com/lspitzner/butcher/blob/master/README.md README> (it is properly formatted on github).
+license:             BSD3
+license-file:        LICENSE
+author:              Lennart Spitzner
+maintainer:          Lennart Spitzner <hexagoxel@hexagoxel.de>
+copyright:           Copyright (C) 2016-2017 Lennart Spitzner
+category:            UI
+build-type:          Simple
+Stability:           experimental
+extra-source-files: {
+  ChangeLog.md
+  srcinc/prelude.inc
+  README.md
+}
+cabal-version:       >=1.10
+homepage:            https://github.com/lspitzner/butcher/
+bug-reports:         https://github.com/lspitzner/butcher/issues
+
+source-repository head {
+  type: git
+  location: https://github.com/lspitzner/butcher.git
+}
+
+flag butcher-dev
+  description: dev options
+  default: False
+  manual: True
+
+library
+  exposed-modules:     UI.Butcher.Monadic.Types
+                       UI.Butcher.Monadic
+                       UI.Butcher.Monadic.Command
+                       UI.Butcher.Monadic.Param
+                       UI.Butcher.Monadic.Flag
+                       UI.Butcher.Monadic.Pretty
+                       UI.Butcher.Monadic.IO
+                       UI.Butcher.Monadic.Interactive
+                       UI.Butcher.Monadic.BuiltinCommands
+  other-modules:       UI.Butcher.Monadic.Internal.Types
+                       UI.Butcher.Monadic.Internal.Core
+  build-depends:
+    { base >=4.8 && <4.11
+    , free
+    , unsafe
+    , microlens
+    , microlens-th
+    , multistate
+    , pretty
+    , containers
+    , either
+    , transformers
+    , mtl
+    , extra
+    , void
+    , bifunctors
+    , deque
+    }
+  if flag(butcher-dev) {
+    build-depends:
+      hspec
+  }
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  default-extensions: {
+    CPP
+
+    NoImplicitPrelude
+
+    GADTs
+
+    FlexibleContexts
+    FlexibleInstances
+    ScopedTypeVariables
+    MonadComprehensions
+    LambdaCase
+    MultiWayIf
+    KindSignatures
+  }
+  other-extensions: {
+    DeriveFunctor
+    ExistentialQuantification
+    GeneralizedNewtypeDeriving
+    StandaloneDeriving
+    DataKinds
+    TypeOperators
+    TemplateHaskell
+  }
+  ghc-options: {
+    -Wall
+    -fno-spec-constr
+    -fno-warn-unused-imports
+    -fno-warn-orphans
+  }
+  if flag(butcher-dev) {
+    ghc-options: -O0 -Werror -fprof-auto -fprof-cafs
+  }
+  include-dirs:
+    srcinc
+
+test-suite tests
+  type:             exitcode-stdio-1.0
+  default-language: Haskell2010
+  build-depends:
+    { base >=4.8 && <4.11
+    , butcher
+    , free
+    , unsafe
+    , microlens
+    , microlens-th
+    , multistate
+    , pretty
+    , containers
+    , either
+    , transformers
+    , mtl
+    , extra
+    , deque
+    }
+  if flag(butcher-dev) {
+    buildable:        True
+    build-depends:
+      hspec
+  } else {
+    buildable:        False
+  }
+  ghc-options:      -Wall
+  main-is:          TestMain.hs
+  other-modules:    
+  hs-source-dirs:   src-tests
+  default-extensions: {
+    CPP
+
+    NoImplicitPrelude
+
+    GADTs
+
+    FlexibleContexts
+    FlexibleInstances
+    ScopedTypeVariables
+    MonadComprehensions
+    LambdaCase
+    MultiWayIf
+    KindSignatures
+  }
+  ghc-options: {
+    -Wall
+    -fno-spec-constr
+    -fno-warn-unused-imports
+    -fno-warn-orphans
+  }
+  if flag(butcher-dev) {
+    ghc-options: -Werror -fprof-auto -fprof-cafs -O0
+  }
+
diff --git a/test/golden-test-cases/butcher.nix.golden b/test/golden-test-cases/butcher.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/butcher.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, bifunctors, containers, deque, either, extra
+, fetchurl, free, microlens, microlens-th, mtl, multistate, pretty
+, transformers, unsafe, void
+}:
+mkDerivation {
+  pname = "butcher";
+  version = "1.2.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bifunctors containers deque either extra free microlens
+    microlens-th mtl multistate pretty transformers unsafe void
+  ];
+  testHaskellDepends = [
+    base containers deque either extra free microlens microlens-th mtl
+    multistate pretty transformers unsafe
+  ];
+  homepage = "https://github.com/lspitzner/butcher/";
+  description = "Chops a command or program invocation into digestable pieces";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/bzlib.cabal b/test/golden-test-cases/bzlib.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bzlib.cabal
@@ -0,0 +1,47 @@
+name:            bzlib
+version:         0.5.0.5
+copyright:       (c) 2006-2015 Duncan Coutts
+license:         BSD3
+license-file:    LICENSE
+author:          Duncan Coutts <duncan@community.haskell.org>
+maintainer:      Duncan Coutts <duncan@community.haskell.org>
+category:        Codec
+synopsis:        Compression and decompression in the bzip2 format
+description:     This package provides a pure interface for compressing and 
+                 decompressing streams of data represented as lazy 
+                 'ByteString's. It uses the bz2 C library so it has high
+                 performance.
+                 .
+                 It provides a convenient high level API suitable for most
+                 tasks and for the few cases where more control is needed it
+                 provides access to the full bzip2 feature set.
+build-type:      Simple
+cabal-version:   >= 1.6
+extra-source-files: cbits/bzlib_private.h cbits/LICENSE
+                    -- demo programs:
+                    examples/bzip2.hs examples/bunzip2.hs
+
+source-repository head
+  type: darcs
+  location: http://code.haskell.org/bzlib/
+
+library
+  exposed-modules: Codec.Compression.BZip,
+                   Codec.Compression.BZip.Internal
+  other-modules:   Codec.Compression.BZip.Stream
+  extensions:      CPP, ForeignFunctionInterface
+  build-depends:   base >= 3 && < 5,
+                   bytestring == 0.9.* || == 0.10.*
+  includes:        bzlib.h
+  ghc-options:     -Wall
+  if !os(windows)
+    -- Normally we use the the standard system bz2 lib:
+    extra-libraries: bz2
+  else
+    -- However for the benefit of users of Windows (which does not have zlib
+    -- by default) we bundle a complete copy of the C sources of bzip2-1.0.6
+    c-sources:     cbits/blocksort.c cbits/bzlib.c cbits/compress.c
+                   cbits/crctable.c cbits/decompress.c cbits/huffman.c
+                   cbits/randtable.c
+    include-dirs:  cbits
+    install-includes: bzlib.h
diff --git a/test/golden-test-cases/bzlib.nix.golden b/test/golden-test-cases/bzlib.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/bzlib.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, bytestring, bzip2, fetchurl }:
+mkDerivation {
+  pname = "bzlib";
+  version = "0.5.0.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring ];
+  librarySystemDepends = [ bzip2 ];
+  description = "Compression and decompression in the bzip2 format";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/case-insensitive.cabal b/test/golden-test-cases/case-insensitive.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/case-insensitive.cabal
@@ -0,0 +1,73 @@
+name:          case-insensitive
+version:       1.2.0.10
+cabal-version: >=1.8
+build-type:    Simple
+license:       BSD3
+license-file:  LICENSE
+copyright:     2011 Bas van Dijk
+author:        Bas van Dijk
+maintainer:    Bas van Dijk <v.dijk.bas@gmail.com>
+homepage:      https://github.com/basvandijk/case-insensitive
+bug-reports:   https://github.com/basvandijk/case-insensitive/issues
+category:      Data, Text
+synopsis:      Case insensitive string comparison
+description:   The module @Data.CaseInsensitive@ provides the 'CI' type
+               constructor which can be parameterised by a string-like
+               type like: 'String', 'ByteString', 'Text',
+               etc.. Comparisons of values of the resulting type will be
+               insensitive to cases.
+tested-with:
+  GHC==7.0.4,
+  GHC==7.2.2
+  GHC==7.4.2,
+  GHC==7.6.3,
+  GHC==7.8.4,
+  GHC==7.10.3,
+  GHC==8.0.1
+
+extra-source-files: README.markdown CHANGELOG pg2189.txt
+
+source-repository head
+  Type:     git
+  Location: git://github.com/basvandijk/case-insensitive.git
+
+Library
+  ghc-options: -Wall
+  build-depends: base       >= 3   && < 4.11
+               , bytestring >= 0.9 && < 0.11
+               , text       >= 0.3 && < 1.3
+               , deepseq    >= 1.1 && < 1.5
+               , hashable   >= 1.0 && < 1.3
+  if !impl(ghc >= 8.0)
+    build-depends: semigroups >= 0.18 && < 0.19
+  exposed-modules: Data.CaseInsensitive, Data.CaseInsensitive.Unsafe
+  other-modules: Data.CaseInsensitive.Internal
+
+test-suite test-case-insensitive
+  type:           exitcode-stdio-1.0
+  main-is:        test.hs
+  hs-source-dirs: test
+
+  build-depends: case-insensitive
+               , base                 >= 3     && < 4.11
+               , bytestring           >= 0.9   && < 0.11
+               , text                 >= 0.3   && < 1.3
+               , HUnit                >= 1.2.2 && < 1.6
+               , test-framework       >= 0.2.4 && < 0.9
+               , test-framework-hunit >= 0.2.4 && < 0.4
+
+  ghc-options: -Wall
+
+benchmark bench-case-insensitive
+  type:           exitcode-stdio-1.0
+  main-is:        bench.hs
+  other-modules:  NoClass
+  hs-source-dirs: bench
+
+  ghc-options:    -Wall -O2
+
+  build-depends: case-insensitive
+               , base                 >= 3     && < 4.11
+               , bytestring           >= 0.9   && < 0.11
+               , criterion            >= 0.6.1 && < 1.3
+               , deepseq              >= 1.1   && < 1.5
diff --git a/test/golden-test-cases/case-insensitive.nix.golden b/test/golden-test-cases/case-insensitive.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/case-insensitive.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, bytestring, criterion, deepseq, fetchurl
+, hashable, HUnit, test-framework, test-framework-hunit, text
+}:
+mkDerivation {
+  pname = "case-insensitive";
+  version = "1.2.0.10";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring deepseq hashable text ];
+  testHaskellDepends = [
+    base bytestring HUnit test-framework test-framework-hunit text
+  ];
+  benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
+  homepage = "https://github.com/basvandijk/case-insensitive";
+  description = "Case insensitive string comparison";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/cassava-conduit.cabal b/test/golden-test-cases/cassava-conduit.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cassava-conduit.cabal
@@ -0,0 +1,79 @@
+name:               cassava-conduit
+version:            0.4.0.1
+license:            BSD3
+license-file:       etc/LICENCE.md
+author:             Dom De Re
+maintainer:         Dom De Re
+copyright:          Copyright (C) 2014-2017 Dom De Re
+synopsis:           Conduit interface for cassava package
+category:           Data
+description:        Conduit interface for cassava package
+                    .
+                    PRs welcome.
+homepage:           https://github.com/domdere/cassava-conduit
+bug-reports:        https://github.com/domdere/cassava-conduit/issues
+cabal-version:      >= 1.18
+build-type:         Simple
+tested-with:        GHC == 7.10.1
+                ,   GHC == 7.10.2
+extra-source-files: README.md
+                ,   CHANGELOG.md
+
+source-repository       head
+    type:               git
+    location:           https://github.com/domdere/cassava-conduit
+
+flag                    small_base
+    description:        Choose the new, split-up base package.
+
+library
+    default-language:   Haskell2010
+
+    build-depends:      base < 5 && >= 4
+                    ,   containers
+                    ,   array
+                    ,   bifunctors              >= 4.2           && < 6
+                    ,   bytestring              == 0.10.*
+                    ,   cassava                 == 0.5.*
+                    ,   conduit                 == 1.2.*
+                    ,   conduit-extra           == 1.2.*
+                    ,   mtl                     == 2.2.*
+                    ,   text                    == 1.2.*
+
+    ghc-options:        -Wall
+
+    hs-source-dirs:     src
+
+    exposed-modules:    Data.Csv.Conduit
+
+    other-modules:      LocalPrelude
+
+    default-extensions: NoImplicitPrelude
+
+test-suite              quickcheck
+    default-language:   Haskell2010
+    type:               exitcode-stdio-1.0
+    main-is:            Main.hs
+    hs-source-dirs:     quickcheck
+    other-modules:      Test.Arbitrary
+                        Test.Data.Csv.Conduit
+
+    build-depends:      base                >= 4 && < 5
+                      , bytestring          == 0.10.*
+                      , cassava             == 0.5.*
+                      , conduit             == 1.2.*
+                      , conduit-extra       == 1.2.*
+                      , QuickCheck          == 2.10.*
+                      , text                == 1.2.*
+                      , cassava-conduit
+
+benchmark               benchmarks
+    default-language:   Haskell2010
+    type:               exitcode-stdio-1.0
+    hs-source-dirs:     benchmarks
+    main-is:            Main.hs
+    ghc-options:        -O2 -rtsopts
+
+    build-depends:      base > 4 && <= 5
+                    ,   cassava-conduit
+                    ,   criterion >= 0.8
diff --git a/test/golden-test-cases/cassava-conduit.nix.golden b/test/golden-test-cases/cassava-conduit.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cassava-conduit.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, array, base, bifunctors, bytestring, cassava
+, conduit, conduit-extra, containers, criterion, fetchurl, mtl
+, QuickCheck, text
+}:
+mkDerivation {
+  pname = "cassava-conduit";
+  version = "0.4.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bifunctors bytestring cassava conduit conduit-extra
+    containers mtl text
+  ];
+  testHaskellDepends = [
+    base bytestring cassava conduit conduit-extra QuickCheck text
+  ];
+  benchmarkHaskellDepends = [ base criterion ];
+  homepage = "https://github.com/domdere/cassava-conduit";
+  description = "Conduit interface for cassava package";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/cassette.cabal b/test/golden-test-cases/cassette.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cassette.cabal
@@ -0,0 +1,28 @@
+Name:           cassette
+Version:        0.1.0
+Author:         Mathieu Boespflug
+Maintainer:     Mathieu Boespflug <mboes@cs.mcgill.ca>
+Synopsis:       A combinator library for simultaneously defining parsers and pretty printers.
+Description:
+    Combinator library for defining both type safe parsers and pretty printers simultaneously.
+    This library performs well in practice because parsers and printers are implemented in CPS
+    and because arguments are always curried, rather than packed into nested tuples.
+Category:       Parsing, Text
+License:        BSD3
+License-File:   LICENSE
+Cabal-Version:  >= 1.10.0
+Build-Type:     Simple
+Tested-With:    GHC == 7.4.1
+
+library
+  Hs-Source-Dirs: src
+  Build-Depends:  base >= 4 && < 5
+  Default-Language:     Haskell2010
+  default-extensions:   RankNTypes
+  other-extensions:     ImpredicativeTypes
+  Exposed-Modules:      Text.Cassette
+                        Text.Cassette.Prim
+                        Text.Cassette.Lead
+                        Text.Cassette.Combinator
+                        Text.Cassette.Char
+                        Text.Cassette.Number
diff --git a/test/golden-test-cases/cassette.nix.golden b/test/golden-test-cases/cassette.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cassette.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "cassette";
+  version = "0.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  description = "A combinator library for simultaneously defining parsers and pretty printers";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/cereal-text.cabal b/test/golden-test-cases/cereal-text.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cereal-text.cabal
@@ -0,0 +1,38 @@
+-- Initial cereal-text.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                cereal-text
+version:             0.1.0.2
+synopsis:            Data.Text instances for the cereal serialization library
+description:         Data.Text instances for the cereal serialization library.
+                     .
+                     Provides instances for Text and lazy Text.
+                     Uses UTF-8 encoding for serialization.
+                     .
+                     Use
+                     @import Data.Serialize.Text ()@
+                     to import instances.
+homepage:            https://github.com/ulikoehler/cereal-text
+license:             Apache-2.0
+license-file:        LICENSE
+author:              Uli Köhler
+maintainer:          ukoehler@btronik.de
+-- copyright:           
+category:            Data
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+source-repository head
+  type: git
+  location: https://github.com/ulikoehler/cereal-text
+
+library
+  exposed-modules: Data.Serialize.Text
+  -- other-modules:       
+  -- other-extensions:    
+  build-depends:       base >= 4.0 && < 6.0, 
+                       cereal >= 0.2, 
+                       text >= 0.10
+  -- hs-source-dirs:      
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/cereal-text.nix.golden b/test/golden-test-cases/cereal-text.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cereal-text.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, cereal, fetchurl, text }:
+mkDerivation {
+  pname = "cereal-text";
+  version = "0.1.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base cereal text ];
+  homepage = "https://github.com/ulikoehler/cereal-text";
+  description = "Data.Text instances for the cereal serialization library";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/cheapskate.cabal b/test/golden-test-cases/cheapskate.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cheapskate.cabal
@@ -0,0 +1,81 @@
+name:                cheapskate
+version:             0.1.1
+synopsis:            Experimental markdown processor.
+description:         This is an experimental Markdown processor in pure
+                     Haskell.  It aims to process Markdown efficiently and in
+                     the most forgiving possible way.  It is designed to deal
+                     with any input, including garbage, with linear
+                     performance.  Output is sanitized by default for
+                     protection against XSS attacks.
+                     .
+                     Several markdown extensions are implemented, including
+                     fenced code blocks, significant list start numbers, and
+                     autolinked URLs.  See README.markdown for details.
+homepage:            http://github.com/jgm/cheapskate
+license:             BSD3
+license-file:        LICENSE
+author:              John MacFarlane
+maintainer:          jgm@berkeley.edu
+copyright:           (C) 2012-2013 John MacFarlane
+category:            Text
+build-type:          Simple
+extra-source-files:  README.markdown
+                     changelog
+                     man/man1/cheapskate.1
+cabal-version:       >=1.10
+Source-repository head
+  type:              git
+  location:          git://github.com/jgm/cheapskate.git
+
+Flag dingus
+  Description:       Build cheapskate-dingus cgi script.
+  Default:           False
+
+library
+  hs-source-dirs:    .
+  exposed-modules:   Cheapskate
+                     Cheapskate.Parse
+                     Cheapskate.Types
+                     Cheapskate.Html
+  other-modules:     Cheapskate.Util
+                     Cheapskate.Inlines
+                     Cheapskate.ParserCombinators
+                     Paths_cheapskate
+  build-depends:     base >=4.4 && <5,
+                     containers >=0.4 && <0.6,
+                     mtl >=2.1 && <2.3,
+                     text >= 0.9 && < 1.3,
+                     blaze-html >=0.6 && < 0.10,
+                     xss-sanitize >= 0.3 && < 0.4,
+                     data-default >= 0.5 && < 0.8,
+                     syb,
+                     uniplate >= 1.6 && < 1.7,
+                     deepseq
+  default-language:  Haskell2010
+  ghc-options:       -Wall -fno-warn-unused-do-bind
+
+executable cheapskate
+  main-is:           main.hs
+  hs-source-dirs:    bin
+  build-depends:     base >=4.4 && <5,
+                     cheapskate,
+                     bytestring,
+                     blaze-html >=0.6 && < 0.10,
+                     text >= 0.9 && < 1.3
+  default-language:  Haskell2010
+  ghc-options:       -Wall -fno-warn-unused-do-bind
+  ghc-prof-options:  -auto-exported -rtsopts
+
+executable cheapskate-dingus
+  main-is:           cheapskate-dingus.hs
+  hs-source-dirs:    bin
+  if flag(dingus)
+    build-depends:     base, aeson, cheapskate, blaze-html,
+                       text, wai-extra, wai >= 0.3, http-types
+  default-language:  Haskell2010
+  if flag(dingus)
+    Buildable:       True
+  else
+    Buildable:       False
+  ghc-options:       -Wall -fno-warn-unused-do-bind
+  ghc-prof-options:  -auto-exported -rtsopts
diff --git a/test/golden-test-cases/cheapskate.nix.golden b/test/golden-test-cases/cheapskate.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cheapskate.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, blaze-html, bytestring, containers
+, data-default, deepseq, fetchurl, mtl, syb, text, uniplate
+, xss-sanitize
+}:
+mkDerivation {
+  pname = "cheapskate";
+  version = "0.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base blaze-html containers data-default deepseq mtl syb text
+    uniplate xss-sanitize
+  ];
+  executableHaskellDepends = [ base blaze-html bytestring text ];
+  homepage = "http://github.com/jgm/cheapskate";
+  description = "Experimental markdown processor";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/chell.cabal b/test/golden-test-cases/chell.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/chell.cabal
@@ -0,0 +1,88 @@
+name: chell
+version: 0.4.0.2
+license: MIT
+license-file: license.txt
+author: John Millikin <john@john-millikin.com>
+maintainer: John Millikin <john@john-millikin.com>
+build-type: Simple
+cabal-version: >= 1.6
+category: Testing
+bug-reports: mailto:jmillikin@gmail.com
+homepage: https://john-millikin.com/software/chell/
+
+synopsis: A simple and intuitive library for automated testing.
+description:
+  Chell is a simple and intuitive library for automated testing. It natively
+  supports assertion-based testing, and can use companion libraries
+  such as @chell-quickcheck@ to support more complex testing strategies.
+  .
+  An example test suite, which verifies the behavior of artithmetic operators.
+  .
+  @
+  &#x7b;-\# LANGUAGE TemplateHaskell \#-&#x7d;
+  .
+  import Test.Chell
+  .
+  tests_Math :: Suite
+  tests_Math = suite \"math\"
+  &#x20;   [ test_Addition
+  &#x20;   , test_Subtraction
+  &#x20;   ]
+  .
+  test_Addition :: Test
+  test_Addition = assertions \"addition\" $ do
+  &#x20;   $expect (equal (2 + 1) 3)
+  &#x20;   $expect (equal (1 + 2) 3)
+  .
+  test_Subtraction :: Test
+  test_Subtraction = assertions \"subtraction\" $ do
+  &#x20;   $expect (equal (2 - 1) 1)
+  &#x20;   $expect (equal (1 - 2) (-1))
+  .
+  main :: IO ()
+  main = defaultMain [tests_Math]
+  @
+  .
+  @
+  $ ghc --make chell-example.hs
+  $ ./chell-example
+  PASS: 2 tests run, 2 tests passed
+  @
+
+source-repository head
+  type: git
+  location: https://john-millikin.com/code/chell/
+
+source-repository this
+  type: git
+  location: https://john-millikin.com/code/chell/
+  tag: chell_0.4.0.2
+
+flag color-output
+  description: Enable colored output in test results
+  default: True
+
+library
+  ghc-options: -Wall
+
+  build-depends:
+      base >= 4.1 && < 5.0
+    , bytestring >= 0.9
+    , options >= 1.0 && < 2.0
+    , patience >= 0.1 && < 0.2
+    , random >= 1.0
+    , template-haskell >= 2.3
+    , text
+    , transformers >= 0.2
+
+  if flag(color-output)
+    build-depends:
+        ansi-terminal >= 0.5 && < 0.8
+
+  exposed-modules:
+    Test.Chell
+
+  other-modules:
+    Test.Chell.Main
+    Test.Chell.Output
+    Test.Chell.Types
diff --git a/test/golden-test-cases/chell.nix.golden b/test/golden-test-cases/chell.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/chell.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, ansi-terminal, base, bytestring, fetchurl, options
+, patience, random, template-haskell, text, transformers
+}:
+mkDerivation {
+  pname = "chell";
+  version = "0.4.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    ansi-terminal base bytestring options patience random
+    template-haskell text transformers
+  ];
+  homepage = "https://john-millikin.com/software/chell/";
+  description = "A simple and intuitive library for automated testing";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/clumpiness.cabal b/test/golden-test-cases/clumpiness.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/clumpiness.cabal
@@ -0,0 +1,72 @@
+-- Initial clumpiness.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+-- The name of the package.
+name:                clumpiness
+
+-- The package version.  See the Haskell package versioning policy (PVP) 
+-- for standards guiding when and how versions should be incremented.
+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
+-- PVP summary:      +-+------- breaking API changes
+--                   | | +----- non-breaking API additions
+--                   | | | +--- code changes with no API change
+version:             0.17.0.0
+
+-- A short (one-line) description of the package.
+synopsis:            Calculate the clumpiness of leaf properties in a tree
+
+-- A longer description of the package.
+-- description:         
+
+-- The license under which the package is released.
+license:             GPL-3
+
+-- The file containing the license text.
+license-file:        LICENSE
+
+-- The package author(s).
+author:              Gregory Schwartz
+
+-- An email address to which users can send suggestions, bug reports, and 
+-- patches.
+maintainer:          gs394@drexel.edu
+
+-- A copyright notice.
+-- copyright:           
+
+category:            Math
+
+build-type:          Simple
+
+-- Extra files to be distributed with the package, such as examples or a 
+-- README.
+-- extra-source-files:  
+
+-- Constraint on the version of Cabal needed to build this package.
+cabal-version:       >=1.10
+
+
+library
+  -- Modules exported by the library.
+  exposed-modules:     Math.Clumpiness.Algorithms
+                     , Math.Clumpiness.Types
+                     , Math.Clumpiness.Utilities
+                     , Math.Clumpiness.Pinpoint
+  
+  -- Modules included in this library but not exported.
+  -- other-modules:       
+  
+  -- LANGUAGE extensions used by modules in this package.
+  other-extensions:    BangPatterns
+  
+  -- Other library packages from which modules are imported.
+  build-depends:       base >=4.6 && <5
+                     , containers >=0.5
+                     , tree-fun >=0.7
+  
+  -- Directories containing source files.
+  hs-source-dirs:      src
+  
+  -- Base language which the package is written in.
+  default-language:    Haskell2010
+  
diff --git a/test/golden-test-cases/clumpiness.nix.golden b/test/golden-test-cases/clumpiness.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/clumpiness.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, containers, fetchurl, tree-fun }:
+mkDerivation {
+  pname = "clumpiness";
+  version = "0.17.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers tree-fun ];
+  description = "Calculate the clumpiness of leaf properties in a tree";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/code-page.cabal b/test/golden-test-cases/code-page.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/code-page.cabal
@@ -0,0 +1,60 @@
+name:                code-page
+version:             0.1.3
+synopsis:            Windows code page library for Haskell
+description:         This library provides two modules:
+                     .
+                     * "System.IO.CodePage": a cross-platform module that exports
+                     functions which adjust code pages on Windows, and do nothing
+                     on other operating systems.
+                     .
+                     * "System.Win32.CodePage": On Windows, this exports functions
+                     for getting, setting, and analyzing code pages. On other
+                     operating systems, this module exports nothing.
+homepage:            https://github.com/RyanGlScott/code-page
+bug-reports:         https://github.com/RyanGlScott/code-page/issues
+license:             BSD3
+license-file:        LICENSE
+author:              Ryan Scott
+maintainer:          Ryan Scott <ryan.gl.scott@gmail.com>
+stability:           Provisional
+copyright:           (C) 2016-2017 Ryan Scott
+category:            System
+build-type:          Simple
+extra-source-files:  CHANGELOG.md, README.md, include/*.h
+cabal-version:       >=1.10
+tested-with:         GHC == 7.0.4
+                   , GHC == 7.2.2
+                   , GHC == 7.4.2
+                   , GHC == 7.6.3
+                   , GHC == 7.8.4
+                   , GHC == 7.10.3
+                   , GHC == 8.0.2
+
+source-repository head
+  type:                git
+  location:            https://github.com/RyanGlScott/code-page
+
+library
+  exposed-modules:     System.IO.CodePage
+                       System.Win32.CodePage
+  build-depends:       base >= 4.3 && < 5
+  build-tools:         hsc2hs
+  if os(windows)
+    include-dirs:      include
+    includes:          windows_cconv.h
+    cpp-options:       "-DWINDOWS"
+    build-depends:     Win32
+
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  ghc-options:         -Wall
+
+test-suite tests
+  type:                exitcode-stdio-1.0
+  main-is:             Tests.hs
+
+  build-depends:       base      >= 4.3 && < 5
+                     , code-page
+
+  hs-source-dirs:      tests
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/code-page.nix.golden b/test/golden-test-cases/code-page.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/code-page.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "code-page";
+  version = "0.1.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [ base ];
+  homepage = "https://github.com/RyanGlScott/code-page";
+  description = "Windows code page library for Haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/colorize-haskell.cabal b/test/golden-test-cases/colorize-haskell.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/colorize-haskell.cabal
@@ -0,0 +1,33 @@
+name:           colorize-haskell
+version:        1.0.1
+license:        BSD3
+license-file:   LICENSE
+author:         Iavor S. Diatchki
+maintainer:     iavor.diatchki@gmail.com
+homepage:       http://github.com/yav/colorize-haskell
+build-type:     Simple
+cabal-version:  >= 1.2
+synopsis:       Highligt Haskell source
+description:    Highligt Haskell source
+category:       Development
+
+library
+  build-depends:
+    base >= 3 && < 5,
+    haskell-lexer,
+    ansi-terminal
+  exposed-modules:
+    Language.Haskell.Colorize
+  ghc-options:
+    -Wall -O2
+
+
+executable hscolor
+    main-is:         Main.hs
+    -- because we cannot depend on self:
+    build-depends:
+      base >= 3 && < 5,
+      haskell-lexer,
+      ansi-terminal
+    ghc-options:     -Wall -O2
+
diff --git a/test/golden-test-cases/colorize-haskell.nix.golden b/test/golden-test-cases/colorize-haskell.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/colorize-haskell.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, ansi-terminal, base, fetchurl, haskell-lexer }:
+mkDerivation {
+  pname = "colorize-haskell";
+  version = "1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ ansi-terminal base haskell-lexer ];
+  executableHaskellDepends = [ ansi-terminal base haskell-lexer ];
+  homepage = "http://github.com/yav/colorize-haskell";
+  description = "Highligt Haskell source";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/countable.cabal b/test/golden-test-cases/countable.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/countable.cabal
@@ -0,0 +1,78 @@
+cabal-version:  >=1.14
+name:           countable
+version:        1.0
+x-follows-version-policy:
+license:        BSD3
+license-file:   LICENSE
+copyright:      Ashley Yakeley <ashley@semantic.org>
+author:         Ashley Yakeley <ashley@semantic.org>
+maintainer:     Ashley Yakeley <ashley@semantic.org>
+homepage:       https://github.com/AshleyYakeley/countable
+bug-reports:    https://github.com/AshleyYakeley/countable/issues
+synopsis:       Countable, Searchable, Finite, Empty classes
+description:
+    * @class Countable@, for countable types
+    .
+    * @class AtLeastOneCountable@, for countable types that have at least one value
+    .
+    * @class InfiniteCountable@, for infinite countable types
+    .
+    * @class Searchable@, for types that can be searched over. This turns out to include some infinite types, see <http://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/>.
+    .
+    * @class Finite@, for finite types
+    .
+    * @class Empty@, for empty types
+    .
+    * @data Nothing@, an empty type
+    .
+    Some orphan instances:
+    .
+    * @(Searchable a,Eq b) => Eq (a -> b)@ / /
+    .
+    * @(Finite t) => Foldable ((->) t)@ / /
+    .
+    * @(Finite a) => Traversable ((->) a)@ / /
+    .
+    * @(Show a,Finite a,Show b) => Show (a -> b)@ / /
+category:       Data
+build-type:     Simple
+
+library
+    hs-source-dirs: src
+    default-language: Haskell2010
+    default-extensions:
+        ExistentialQuantification
+        EmptyCase
+    build-depends:
+        base >= 4.8 && < 5
+    exposed-modules:
+        Data.Expression
+        Data.Searchable
+        Data.Countable
+        Data.Empty
+    ghc-options: -Wall
+
+test-suite tests
+    type: exitcode-stdio-1.0
+    hs-source-dirs: test
+    default-language: Haskell2010
+    default-extensions:
+        ExistentialQuantification
+        EmptyCase
+        GeneralizedNewtypeDeriving
+        ScopedTypeVariables
+    build-depends:
+        base >= 4.8 && < 5,
+        countable,
+        bytestring,
+        silently,
+        tasty,
+        tasty-hunit,
+        tasty-golden
+    main-is: Count.hs
+    other-modules:
+        Show
+        TypeName
+        Three
+        Golden
+    ghc-options: -Wall
diff --git a/test/golden-test-cases/countable.nix.golden b/test/golden-test-cases/countable.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/countable.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, fetchurl, silently, tasty
+, tasty-golden, tasty-hunit
+}:
+mkDerivation {
+  pname = "countable";
+  version = "1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base bytestring silently tasty tasty-golden tasty-hunit
+  ];
+  homepage = "https://github.com/AshleyYakeley/countable";
+  description = "Countable, Searchable, Finite, Empty classes";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/cpu.cabal b/test/golden-test-cases/cpu.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cpu.cabal
@@ -0,0 +1,81 @@
+Name:                cpu
+Version:             0.1.2
+Description:         
+    Lowlevel cpu routines to get basic properties of the cpu platform, like endianness and architecture.
+License:             BSD3
+License-file:        LICENSE
+Copyright:           Vincent Hanquez <vincent@snarc.org>
+Author:              Vincent Hanquez <vincent@snarc.org>
+Maintainer:          Vincent Hanquez <vincent@snarc.org>
+Synopsis:            Cpu information and properties helpers.
+Build-Type:          Simple
+Category:            Data
+stability:           experimental
+Cabal-Version:       >=1.8
+Homepage:            http://github.com/vincenthz/hs-cpu
+data-files:          README.md
+Extra-source-files:  cbits/endian.c
+
+Flag executable
+  Description:       Build the executable
+  Default:           False
+
+Library
+  Build-Depends:     base >= 3 && < 5
+  Exposed-modules:   System.Cpuid
+                     System.Endian
+                     System.Arch
+  ghc-options:       -Wall
+
+  if impl(ghc < 7.8)
+    C-sources:   cbits/endian.c
+
+  if arch(i386)
+    Cpp-options: -DARCH_X86
+  if arch(x86_64)
+    Cpp-options: -DARCH_X86_64
+  if arch(ppc)
+    Cpp-options: -DARCH_PPC
+  if arch(ppc64)
+    Cpp-options: -DARCH_PPC64
+  if arch(sparc)
+    Cpp-options: -DARCH_SPARC
+  if arch(arm)
+    Cpp-options: -DARCH_ARM
+  if arch(mips)
+    Cpp-options: -DARCH_MIPS
+  if arch(sh)
+    Cpp-options: -DARCH_SH
+  if arch(ia64)
+    Cpp-options: -DARCH_IA64
+  if arch(s390)
+    Cpp-options: -DARCH_S390
+  if arch(alpha)
+    Cpp-options: -DARCH_ALPHA
+  if arch(hppa)
+    Cpp-options: -DARCH_HPPA
+  if arch(rs6000)
+    Cpp-options: -DARCH_RS6000
+  if arch(m68k)
+    Cpp-options: -DARCH_M68K
+  if arch(vax)
+    Cpp-options: -DARCH_VAX
+
+  if arch(i386) || arch(x86_64)
+    C-sources:   cbits/cpuid.c
+
+executable           cpuid
+  hs-source-dirs:    cpuid
+  Main-is:           Cpuid.hs
+  if flag(executable)
+    Buildable:       True
+    Build-Depends:   base >= 3 && < 5
+                   , cpu
+                   , bytestring
+  else
+    Buildable:       False
+  ghc-options:       -Wall -fno-warn-orphans -fno-warn-missing-signatures
+
+source-repository head
+  type: git
+  location: git://github.com/vincenthz/hs-cpu
diff --git a/test/golden-test-cases/cpu.nix.golden b/test/golden-test-cases/cpu.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/cpu.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "cpu";
+  version = "0.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [ base ];
+  homepage = "http://github.com/vincenthz/hs-cpu";
+  description = "Cpu information and properties helpers";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/criterion.cabal b/test/golden-test-cases/criterion.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/criterion.cabal
@@ -0,0 +1,218 @@
+name:           criterion
+version:        1.2.6.0
+synopsis:       Robust, reliable performance measurement and analysis
+license:        BSD3
+license-file:   LICENSE
+author:         Bryan O'Sullivan <bos@serpentine.com>
+maintainer:     Bryan O'Sullivan <bos@serpentine.com>
+copyright:      2009-2016 Bryan O'Sullivan and others
+category:       Development, Performance, Testing, Benchmarking
+homepage:       http://www.serpentine.com/criterion
+bug-reports:    https://github.com/bos/criterion/issues
+build-type:     Simple
+cabal-version:  >= 1.10
+extra-source-files:
+  README.markdown
+  changelog.md
+  examples/*.cabal
+  examples/*.hs
+  examples/*.html
+tested-with:
+  GHC==7.4.2,
+  GHC==7.6.3,
+  GHC==7.8.4,
+  GHC==7.10.3,
+  GHC==8.0.2,
+  GHC==8.2.2
+
+data-files:
+  templates/*.css
+  templates/*.tpl
+  templates/js/jquery.criterion.js
+
+description:
+  This library provides a powerful but simple way to measure software
+  performance.  It provides both a framework for executing and
+  analysing benchmarks and a set of driver functions that makes it
+  easy to build and run benchmarks, and to analyse their results.
+  .
+  The fastest way to get started is to read the
+  <http://www.serpentine.com/criterion/tutorial.html online tutorial>,
+  followed by the documentation and examples in the "Criterion.Main"
+  module.
+  .
+  For examples of the kinds of reports that criterion generates, see
+  <http://www.serpentine.com/criterion the home page>.
+
+flag fast
+  description: compile without optimizations
+  default: False
+  manual: True
+
+flag embed-data-files
+  description: Embed the data files in the binary for a relocatable executable.
+               (Warning: This will increase the executable size significantly.)
+  default: False
+  manual: True
+
+library
+  exposed-modules:
+    Criterion
+    Criterion.Analysis
+    Criterion.IO
+    Criterion.IO.Printf
+    Criterion.Internal
+    Criterion.Main
+    Criterion.Main.Options
+    Criterion.Measurement
+    Criterion.Monad
+    Criterion.Report
+    Criterion.Types
+
+  other-modules:
+    Criterion.Monad.Internal
+    Criterion.Types.Internal
+
+  c-sources: cbits/cycles.c
+  if os(darwin)
+    c-sources: cbits/time-osx.c
+  else {
+    if os(windows)
+      c-sources: cbits/time-windows.c
+    else
+      c-sources: cbits/time-posix.c
+  }
+
+  other-modules:
+    Paths_criterion
+
+  build-depends:
+    aeson >= 0.8,
+    ansi-wl-pprint >= 0.6.7.2,
+    base >= 4.5 && < 5,
+    base-compat >= 0.9,
+    binary >= 0.5.1.0,
+    bytestring >= 0.9 && < 1.0,
+    cassava >= 0.3.0.0,
+    code-page,
+    containers,
+    deepseq >= 1.1.0.0,
+    directory,
+    exceptions >= 0.8.2 && < 0.9,
+    filepath,
+    Glob >= 0.7.2,
+    microstache >= 1.0.1 && < 1.1,
+    js-flot,
+    js-jquery,
+    mtl >= 2,
+    mwc-random >= 0.8.0.3,
+    optparse-applicative >= 0.13,
+    parsec >= 3.1.0,
+    semigroups,
+    statistics >= 0.14 && < 0.15,
+    text >= 0.11,
+    time,
+    transformers,
+    transformers-compat >= 0.4,
+    vector >= 0.7.1,
+    vector-algorithms >= 0.4
+  if impl(ghc < 7.6)
+    build-depends:
+      ghc-prim
+
+  default-language: Haskell2010
+  ghc-options: -Wall -funbox-strict-fields
+  if impl(ghc >= 6.8)
+    ghc-options: -fwarn-tabs
+  if flag(fast)
+    ghc-options: -O0
+  else
+    ghc-options: -O2
+
+  if flag(embed-data-files)
+    other-modules: Criterion.EmbeddedData
+    build-depends: file-embed < 0.1,
+                   template-haskell
+    cpp-options: "-DEMBED"
+
+Executable criterion-report
+  Default-Language:     Haskell2010
+  GHC-Options:          -Wall -rtsopts
+  Main-Is:              Report.hs
+  Other-Modules:        Options
+                        Paths_criterion
+  Hs-Source-Dirs:       app
+
+  Build-Depends:
+    base,
+    criterion,
+    optparse-applicative >= 0.13
+
+  if impl(ghc < 7.6)
+    build-depends:
+      ghc-prim
+
+test-suite sanity
+  type:                 exitcode-stdio-1.0
+  hs-source-dirs:       tests
+  main-is:              Sanity.hs
+  default-language:     Haskell2010
+  ghc-options:          -Wall -rtsopts
+  if flag(fast)
+    ghc-options:        -O0
+  else
+    ghc-options:        -O2
+
+  build-depends:
+    HUnit,
+    base,
+    bytestring,
+    criterion,
+    deepseq,
+    tasty,
+    tasty-hunit
+
+test-suite tests
+  type:                 exitcode-stdio-1.0
+  hs-source-dirs:       tests
+  main-is:              Tests.hs
+  default-language:     Haskell2010
+  other-modules:        Properties
+
+  ghc-options:
+    -Wall -threaded     -O0 -rtsopts
+
+  build-depends:
+    QuickCheck >= 2.4,
+    base,
+    criterion,
+    statistics,
+    HUnit,
+    tasty,
+    tasty-hunit,
+    tasty-quickcheck,
+    vector,
+    aeson >= 0.8
+
+test-suite cleanup
+  type:                 exitcode-stdio-1.0
+  hs-source-dirs:       tests
+  default-language:     Haskell2010
+  main-is:              Cleanup.hs
+
+  ghc-options:
+    -Wall -threaded     -O0 -rtsopts
+
+  build-depends:
+    HUnit,
+    base,
+    bytestring,
+    criterion,
+    deepseq,
+    directory,
+    tasty,
+    tasty-hunit
+
+source-repository head
+  type:     git
+  location: https://github.com/bos/criterion.git
diff --git a/test/golden-test-cases/criterion.nix.golden b/test/golden-test-cases/criterion.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/criterion.nix.golden
@@ -0,0 +1,34 @@
+{ mkDerivation, aeson, ansi-wl-pprint, base, base-compat, binary
+, bytestring, cassava, code-page, containers, deepseq, directory
+, exceptions, fetchurl, filepath, Glob, HUnit, js-flot, js-jquery
+, microstache, mtl, mwc-random, optparse-applicative, parsec
+, QuickCheck, semigroups, statistics, tasty, tasty-hunit
+, tasty-quickcheck, text, time, transformers, transformers-compat
+, vector, vector-algorithms
+}:
+mkDerivation {
+  pname = "criterion";
+  version = "1.2.6.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    aeson ansi-wl-pprint base base-compat binary bytestring cassava
+    code-page containers deepseq directory exceptions filepath Glob
+    js-flot js-jquery microstache mtl mwc-random optparse-applicative
+    parsec semigroups statistics text time transformers
+    transformers-compat vector vector-algorithms
+  ];
+  executableHaskellDepends = [ base optparse-applicative ];
+  testHaskellDepends = [
+    aeson base bytestring deepseq directory HUnit QuickCheck statistics
+    tasty tasty-hunit tasty-quickcheck vector
+  ];
+  homepage = "http://www.serpentine.com/criterion";
+  description = "Robust, reliable performance measurement and analysis";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/crypt-sha512.cabal b/test/golden-test-cases/crypt-sha512.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/crypt-sha512.cabal
@@ -0,0 +1,60 @@
+name:                   crypt-sha512
+version:                0
+synopsis:               Pure Haskell implelementation for GNU SHA512 crypt algorithm
+description:
+  crypt() is the password encryption function.  It is based on the Data
+  Encryption Standard algorithm with variations intended (among other things) to
+  discourage use of hardware implementations of a key search.
+  .
+  This package provides a pure Haskell implementation of SHA512 crypt scheme.
+category:               Data
+license:                BSD3
+license-file:           LICENSE
+author:                 Oleg Grenrus <oleg.grenrus@iki.fi>
+maintainer:             Oleg Grenrus <oleg.grenrus@iki.fi>
+copyright:              2017 Oleg Grenrus
+homepage:               https://github.com/phadej/crypt-sha512
+bug-reports:            https://github.com/phadej/crypt-sha512
+extra-source-files:     README.md
+build-type:             Simple
+cabal-version:          >= 1.10
+tested-with:
+  GHC==7.6.3,
+  GHC==7.8.4,
+  GHC==7.10.3,
+  GHC==8.0.2,
+  GHC==8.2.1
+
+source-repository head
+  type:                 git
+  location:             git://github.com/phadej/crypt-sha512.git
+
+library
+  exposed-modules:      System.POSIX.Crypt.SHA512
+  build-depends:        base               >=4.5        && <4.11,
+                        bytestring,
+                        attoparsec         >=0.13.1.0   && <0.14,
+                        cryptohash-sha512  >=0.11.100.1 && <0.12
+  default-language:     Haskell2010
+  hs-source-dirs:       src
+  ghc-options:          -Wall
+
+test-suite example
+  if !os(linux)
+    buildable:          False
+
+  build-depends:        base,
+                        crypt-sha512,
+                        bytestring,
+                        tasty,
+                        tasty-hunit,
+                        tasty-quickcheck,
+                        quickcheck-instances
+  default-language:     Haskell2010
+  main-is:              Example.hs
+  other-modules:        System.POSIX.Crypt
+  type:                 exitcode-stdio-1.0
+  hs-source-dirs:       test
+  other-extensions:     OverloadedStrings CApiFFI
+  extra-libraries:      crypt
+  ghc-options:          -Wall
diff --git a/test/golden-test-cases/crypt-sha512.nix.golden b/test/golden-test-cases/crypt-sha512.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/crypt-sha512.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, attoparsec, base, bytestring, cryptohash-sha512
+, fetchurl, quickcheck-instances, tasty, tasty-hunit
+, tasty-quickcheck
+}:
+mkDerivation {
+  pname = "crypt-sha512";
+  version = "0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base bytestring cryptohash-sha512
+  ];
+  testHaskellDepends = [
+    base bytestring quickcheck-instances tasty tasty-hunit
+    tasty-quickcheck
+  ];
+  homepage = "https://github.com/phadej/crypt-sha512";
+  description = "Pure Haskell implelementation for GNU SHA512 crypt algorithm";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/crypto-random-api.cabal b/test/golden-test-cases/crypto-random-api.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/crypto-random-api.cabal
@@ -0,0 +1,23 @@
+Name:                crypto-random-api
+Version:             0.2.0
+Description:         Simple random generators API for cryptography related code
+License:             BSD3
+License-file:        LICENSE
+Copyright:           Vincent Hanquez <vincent@snarc.org>
+Author:              Vincent Hanquez <vincent@snarc.org>
+Maintainer:          Vincent Hanquez <vincent@snarc.org>
+Synopsis:            Simple random generators API for cryptography related code
+Category:            Cryptography
+Build-Type:          Simple
+Homepage:            http://github.com/vincenthz/hs-crypto-random-api
+Cabal-Version:       >=1.6
+
+Library
+  Exposed-modules:   Crypto.Random.API
+  Build-depends:     base >= 4 && < 5
+                   , bytestring
+                   , entropy
+
+source-repository head
+  type:     git
+  location: git://github.com/vincenthz/hs-crypto-random-api
diff --git a/test/golden-test-cases/crypto-random-api.nix.golden b/test/golden-test-cases/crypto-random-api.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/crypto-random-api.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, bytestring, entropy, fetchurl }:
+mkDerivation {
+  pname = "crypto-random-api";
+  version = "0.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring entropy ];
+  homepage = "http://github.com/vincenthz/hs-crypto-random-api";
+  description = "Simple random generators API for cryptography related code";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/csv.cabal b/test/golden-test-cases/csv.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/csv.cabal
@@ -0,0 +1,23 @@
+Name:                csv
+Version:             0.1.2
+Category:            Text
+Synopsis:            CSV loader and dumper
+cabal-version:       >= 1.4
+build-type:          Simple
+Description:         CSV loader and dumper
+        .
+        This library parses and dumps documents that are formatted 
+        according to RFC 4180, \"The common Format and MIME Type for
+        Comma-Separated Values (CSV) Files\". This format is used, among
+        many other things, as a lingua franca for spreadsheets, and for
+        certain web services.
+Copyright:           Jaap Weel, 2007
+License:             MIT
+License-file:        COPYING
+Author:              Jaap Weel <weel@ugcs.caltech.edu>
+Maintainer:          Jaap Weel <weel@ugcs.caltech.edu>
+
+Library
+    Build-Depends:       base, parsec, filepath
+    build-depends:       base >= 2 && < 5
+    Exposed-modules:     Text.CSV
diff --git a/test/golden-test-cases/csv.nix.golden b/test/golden-test-cases/csv.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/csv.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchurl, filepath, parsec }:
+mkDerivation {
+  pname = "csv";
+  version = "0.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base filepath parsec ];
+  description = "CSV loader and dumper";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/data-accessor.cabal b/test/golden-test-cases/data-accessor.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-accessor.cabal
@@ -0,0 +1,128 @@
+Name:             data-accessor
+Version:          0.2.2.7
+License:          BSD3
+License-File:     LICENSE
+Author:           Henning Thielemann <haskell@henning-thielemann.de>, Luke Palmer <lrpalmer@gmail.com>
+Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
+Homepage:         http://www.haskell.org/haskellwiki/Record_access
+Category:         Data
+-- Default-Language: Haskell98
+Cabal-Version:    >=1.6
+Build-Type:       Simple
+Tested-With:      GHC==6.4.1, GHC==6.8.2, GHC==6.10.4, GHC==6.12.3
+Tested-With:      GHC==7.0.1, GHC==7.2.1, GHC==7.4.1, GHC==7.6.3
+Tested-With:      JHC==0.7.3
+Synopsis:         Utilities for accessing and manipulating fields of records
+Description:
+  In Haskell 98 the name of a record field
+  is automatically also the name of a function which gets the value
+  of the according field.
+  E.g. if we have
+  .
+    data Pair a b = Pair {first :: a, second :: b}
+  .
+  then
+  .
+  > first  :: Pair a b -> a
+  > second :: Pair a b -> b
+  .
+  However for setting or modifying a field value
+  we need to use some syntactic sugar, which is often clumsy.
+  .
+    modifyFirst :: (a -> a) -> (Pair a b -> Pair a b)
+    modifyFirst f r\@(Pair {first=a}) = r{first = f a}
+  .
+  With this package you can define record field accessors
+  which allow setting, getting and modifying values easily.
+  The package clearly demonstrates the power of the functional approach:
+  You can combine accessors of a record and sub-records,
+  to make the access look like the fields of the sub-record belong to the main record.
+  .
+  Example:
+  .
+  > *Data.Accessor.Example> (first^:second^=10) (('b',7),"hallo")
+  > (('b',10),"hallo")
+  .
+  You can easily manipulate record fields in a 'Control.Monad.State.State' monad,
+  you can easily code 'Show' instances that use the Accessor syntax
+  and you can parse binary streams into records.
+  See @Data.Accessor.Example@ for demonstration of all features.
+  .
+  It would be great if in revised Haskell versions the names of record fields
+  are automatically 'Data.Accessor.Accessor's
+  rather than plain @get@ functions.
+  For now, the package @data-accessor-template@ provides Template Haskell functions
+  for automated generation of 'Data.Acesssor.Accessor's.
+  See also the other @data-accessor@ packages
+  that provide an Accessor interface to other data types.
+  The package @enumset@ provides accessors to bit-packed records.
+  .
+  For similar packages see @lenses@ and @fclabel@.
+  A related concept are editors
+  <http://conal.net/blog/posts/semantic-editor-combinators/>.
+  Editors only consist of a modify method
+  (and @modify@ applied to a 'const' function is a @set@ function).
+  This way, they can modify all function values of a function at once,
+  whereas an accessor can only change a single function value,
+  say, it can change @f 0 = 1@ to @f 0 = 2@.
+  This way, editors can even change the type of a record or a function.
+  An Arrow instance can be defined for editors,
+  but for accessors only a Category instance is possible ('(.)' method).
+  The reason is the @arr@ method of the @Arrow@ class,
+  that conflicts with the two-way nature (set and get) of accessors.
+
+Extra-Source-Files:
+  RegExp
+  src-3/Data/Accessor/Private.hs
+  src-4/Data/Accessor/Private.hs
+
+Source-Repository this
+  Tag:         0.2.2.7
+  Type:        darcs
+  Location:    http://code.haskell.org/data-accessor/core/
+
+Source-Repository head
+  Type:        darcs
+  Location:    http://code.haskell.org/data-accessor/core/
+
+Flag category
+  description: Check whether Arrow class is split into Arrow and Category.
+
+Flag splitBase
+  description: Choose the smaller, split-up base package from version 2 on.
+
+Library
+  Build-Depends:
+    transformers >=0.2 && <0.6
+  If flag(splitBase)
+    Build-Depends:
+      array >=0.1 && <0.6,
+      containers >=0.1 && <0.6
+    If flag(category)
+      Hs-Source-Dirs: src-4
+      Build-Depends: base >= 4 && <5
+    Else
+      Hs-Source-Dirs: src-3
+      Build-Depends: base >= 2 && <4
+  Else
+    Hs-Source-Dirs: src-3
+    Build-Depends:
+      base >= 1 && <2
+    If impl(jhc)
+      Build-Depends:
+        containers >=0.1 && <0.6
+
+  GHC-Options:      -Wall
+  Hs-Source-Dirs:   src
+  Exposed-Modules:
+    Data.Accessor
+    Data.Accessor.Basic
+    Data.Accessor.Container
+    Data.Accessor.Show
+    Data.Accessor.Tuple
+    Data.Accessor.BinaryRead
+    Data.Accessor.MonadState
+  Other-Modules:
+    Data.Accessor.Example
+    Data.Accessor.Private
+    Data.Accessor.MonadStatePrivate
diff --git a/test/golden-test-cases/data-accessor.nix.golden b/test/golden-test-cases/data-accessor.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-accessor.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, array, base, containers, fetchurl, transformers }:
+mkDerivation {
+  pname = "data-accessor";
+  version = "0.2.2.7";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ array base containers transformers ];
+  homepage = "http://www.haskell.org/haskellwiki/Record_access";
+  description = "Utilities for accessing and manipulating fields of records";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/data-default-instances-containers.cabal b/test/golden-test-cases/data-default-instances-containers.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-default-instances-containers.cabal
@@ -0,0 +1,18 @@
+Name:            data-default-instances-containers
+Version:         0.0.1
+Cabal-Version:   >= 1.6
+Category:        Data
+Synopsis:        Default instances for types in containers
+Build-Type:      Simple
+License:         BSD3
+License-File:    LICENSE
+Author:          Lukas Mai
+Maintainer:      <l.mai@web.de>
+
+source-repository head
+  type: git
+  location: https://github.com/mauke/data-default
+
+Library
+  Build-Depends:     base >=2 && <5, data-default-class, containers
+  Exposed-Modules:   Data.Default.Instances.Containers
diff --git a/test/golden-test-cases/data-default-instances-containers.nix.golden b/test/golden-test-cases/data-default-instances-containers.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-default-instances-containers.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, containers, data-default-class, fetchurl }:
+mkDerivation {
+  pname = "data-default-instances-containers";
+  version = "0.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers data-default-class ];
+  description = "Default instances for types in containers";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/data-endian.cabal b/test/golden-test-cases/data-endian.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-endian.cabal
@@ -0,0 +1,30 @@
+Name: data-endian
+Version: 0.1.1
+Category: Data
+Stability: experimental
+Synopsis: Endian-sensitive data
+Description:
+  This package provides helpers for converting endian-sensitive data.
+
+Homepage: https://github.com/mvv/data-endian
+Bug-Reports: https://github.com/mvv/data-endian/issues
+
+Author: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
+Maintainer: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
+Copyright: 2011-2016 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
+License: BSD3
+License-File: LICENSE
+
+Cabal-Version: >= 1.6.0
+Build-Type: Simple
+
+Source-Repository head
+  Type: git
+  Location: https://github.com/mvv/data-endian.git
+
+Library
+  Build-Depends: base >= 4 && < 5
+  Hs-Source-Dirs: src
+  GHC-Options: -Wall
+  Exposed-Modules:
+    Data.Endian
diff --git a/test/golden-test-cases/data-endian.nix.golden b/test/golden-test-cases/data-endian.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-endian.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "data-endian";
+  version = "0.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/mvv/data-endian";
+  description = "Endian-sensitive data";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/data-msgpack.cabal b/test/golden-test-cases/data-msgpack.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-msgpack.cabal
@@ -0,0 +1,114 @@
+name:                 data-msgpack
+version:              0.0.10
+synopsis:             A Haskell implementation of MessagePack
+homepage:             http://msgpack.org/
+license:              BSD3
+license-file:         LICENSE
+author:               Hideyuki Tanaka
+maintainer:           Iphigenia Df <iphydf@gmail.com>
+copyright:            Copyright (c) 2009-2016, Hideyuki Tanaka
+category:             Data
+stability:            Experimental
+cabal-version:        >= 1.10
+build-type:           Simple
+description:
+  A Haskell implementation of MessagePack <http://msgpack.org/>
+  .
+  This is a fork of msgpack-haskell <https://github.com/msgpack/msgpack-haskell>,
+  since the original author is unreachable. This fork incorporates a number of
+  bugfixes and is actively being developed.
+
+source-repository head
+  type:             git
+  location:         https://github.com/TokTok/hs-msgpack.git
+
+library
+  default-language: Haskell2010
+  hs-source-dirs:
+      src
+  ghc-options:
+      -Wall
+      -fno-warn-unused-imports
+  exposed-modules:
+      Data.MessagePack
+      Data.MessagePack.Option
+      Data.MessagePack.Result
+  other-modules:
+      Data.MessagePack.Assoc
+      Data.MessagePack.Class
+      Data.MessagePack.Generic
+      Data.MessagePack.Get
+      Data.MessagePack.Instances
+      Data.MessagePack.Object
+      Data.MessagePack.Put
+  build-depends:
+      base < 5
+    , QuickCheck
+    , binary >= 0.7.0.0
+    , bytestring
+    , containers
+    , data-binary-ieee754
+    , deepseq
+    , hashable
+    , text
+    , unordered-containers
+    , vector
+    , void
+
+executable msgpack-parser
+  default-language: Haskell2010
+  hs-source-dirs:
+      tools
+  ghc-options:
+      -Wall
+      -fno-warn-unused-imports
+  build-depends:
+      base < 5
+    , bytestring
+    , groom
+    , data-msgpack
+  main-is: msgpack-parser.hs
+
+test-suite testsuite
+  type: exitcode-stdio-1.0
+  default-language: Haskell2010
+  hs-source-dirs: test
+  main-is: testsuite.hs
+  other-modules:
+      Data.MessagePack.OptionSpec
+      Data.MessagePack.ResultSpec
+      Data.MessagePackSpec
+  ghc-options:
+      -Wall
+      -fno-warn-unused-imports
+  build-depends:
+      base < 5
+    , QuickCheck
+    , bytestring
+    , containers
+    , data-msgpack
+    , hashable
+    , hspec
+    , text
+    , unordered-containers
+    , vector
+    , void
+
+benchmark benchmark
+  type: exitcode-stdio-1.0
+  default-language: Haskell2010
+  hs-source-dirs: bench
+  main-is: benchmark.hs
+  other-modules:
+      Data.MessagePack.IntBench
+      Data.MessagePackBench
+  ghc-options:
+      -Wall
+      -fno-warn-unused-imports
+  build-depends:
+      base < 5
+    , QuickCheck
+    , bytestring
+    , criterion
+    , data-msgpack
+    , deepseq
diff --git a/test/golden-test-cases/data-msgpack.nix.golden b/test/golden-test-cases/data-msgpack.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-msgpack.nix.golden
@@ -0,0 +1,29 @@
+{ mkDerivation, base, binary, bytestring, containers, criterion
+, data-binary-ieee754, deepseq, fetchurl, groom, hashable, hspec
+, QuickCheck, text, unordered-containers, vector, void
+}:
+mkDerivation {
+  pname = "data-msgpack";
+  version = "0.0.10";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base binary bytestring containers data-binary-ieee754 deepseq
+    hashable QuickCheck text unordered-containers vector void
+  ];
+  executableHaskellDepends = [ base bytestring groom ];
+  testHaskellDepends = [
+    base bytestring containers hashable hspec QuickCheck text
+    unordered-containers vector void
+  ];
+  benchmarkHaskellDepends = [
+    base bytestring criterion deepseq QuickCheck
+  ];
+  homepage = "http://msgpack.org/";
+  description = "A Haskell implementation of MessagePack";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/data-serializer.cabal b/test/golden-test-cases/data-serializer.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-serializer.cabal
@@ -0,0 +1,60 @@
+Name: data-serializer
+Version: 0.3.2
+Category: Data
+Stability: experimental
+Synopsis: Common API for serialization libraries
+Description:
+  This package provides a common API for serialization libraries like
+  <http://hackage.haskell.org/package/binary binary> and
+  <http://hackage.haskell.org/package/cereal cereal>.
+
+Homepage: https://github.com/mvv/data-serializer
+Bug-Reports: https://github.com/mvv/data-serializer/issues
+
+Author: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
+Maintainer: Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
+Copyright: 2016 Mikhail Vorozhtsov <mikhail.vorozhtsov@gmail.com>
+License: BSD3
+License-File: LICENSE
+
+Extra-Source-Files:
+  README.md
+
+Tested-With: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
+
+Cabal-Version: >= 1.10.0
+Build-Type: Simple
+
+Source-Repository head
+  Type: git
+  Location: https://github.com/mvv/data-serializer.git
+
+Library
+  Default-Language: Haskell2010
+  Build-Depends: base >= 4.8 && < 5
+               , semigroups >= 0.18.2
+               , bytestring >= 0.10.4
+               , binary >= 0.7.2
+               , cereal >= 0.4.1
+               , data-endian >= 0.1.1
+               , parsers >= 0.12.3
+               , split >= 0.2
+  Hs-Source-Dirs: src
+  GHC-Options: -Wall
+  Exposed-Modules:
+    Data.Serializer
+    Data.Deserializer
+
+Test-Suite tests
+  Default-Language: Haskell2010
+  Type: exitcode-stdio-1.0
+  Build-Depends: base
+               , bytestring
+               , binary
+               , cereal
+               , tasty >= 0.8
+               , tasty-quickcheck >= 0.8
+               , data-serializer
+  Hs-Source-Dirs: tests
+  GHC-Options: -Wall
+  Main-Is: Tests.hs
diff --git a/test/golden-test-cases/data-serializer.nix.golden b/test/golden-test-cases/data-serializer.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/data-serializer.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, binary, bytestring, cereal, data-endian
+, fetchurl, parsers, semigroups, split, tasty, tasty-quickcheck
+}:
+mkDerivation {
+  pname = "data-serializer";
+  version = "0.3.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base binary bytestring cereal data-endian parsers semigroups split
+  ];
+  testHaskellDepends = [
+    base binary bytestring cereal tasty tasty-quickcheck
+  ];
+  homepage = "https://github.com/mvv/data-serializer";
+  description = "Common API for serialization libraries";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/deque.cabal b/test/golden-test-cases/deque.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/deque.cabal
@@ -0,0 +1,45 @@
+name:
+  deque
+version:
+  0.2
+synopsis:
+  Double-ended queue
+description:
+  An implementation of Double-Ended Queue (aka Dequeue or Deque)
+  based on the head-tail linked list.
+homepage:
+  https://github.com/nikita-volkov/deque
+bug-reports:
+  https://github.com/nikita-volkov/deque/issues
+author:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+maintainer:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+copyright:
+  (c) 2016, Nikita Volkov
+license:
+  MIT
+license-file:
+  LICENSE
+build-type:
+  Simple
+cabal-version:
+  >=1.10
+
+source-repository head
+  type:
+    git
+  location:
+    git://github.com/nikita-volkov/deque.git
+
+library
+  hs-source-dirs:
+    library
+  default-extensions:
+    DeriveFunctor, StandaloneDeriving
+  default-language:
+    Haskell2010
+  exposed-modules:
+    Deque
+  build-depends:
+    base >= 4.6 && < 5
diff --git a/test/golden-test-cases/deque.nix.golden b/test/golden-test-cases/deque.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/deque.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "deque";
+  version = "0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/nikita-volkov/deque";
+  description = "Double-ended queue";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/dhall-bash.cabal b/test/golden-test-cases/dhall-bash.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dhall-bash.cabal
@@ -0,0 +1,54 @@
+Name: dhall-bash
+Version: 1.0.6
+Cabal-Version: >=1.8.0.2
+Build-Type: Simple
+Tested-With: GHC == 7.10.2, GHC == 8.0.1
+License: BSD3
+License-File: LICENSE
+Copyright: 2017 Gabriel Gonzalez
+Author: Gabriel Gonzalez
+Maintainer: Gabriel439@gmail.com
+Bug-Reports: https://github.com/Gabriel439/Haskell-Dhall-Bash-Library/issues
+Synopsis: Compile Dhall to Bash
+Description:
+    Use this package if you want to compile Dhall expressions to Bash.
+    You can use this package as a library or an executable:
+    .
+    * See the "Dhall.Bash" module if you want to use this package as a library
+    .
+    * Use the @dhall-to-bash@ if you want an executable
+    .
+    The "Dhall.Bash" module also contains instructions for how to use this
+    package
+Category: Compiler
+Source-Repository head
+    Type: git
+    Location: https://github.com/Gabriel439/Haskell-Dhall-Bash-Library
+
+Library
+    Hs-Source-Dirs: src
+    Build-Depends:
+        base               >= 4.8.0.0 && < 5   ,
+        bytestring                       < 0.11,
+        containers                       < 0.6 ,
+        dhall              >= 1.0.1   && < 1.9 ,
+        neat-interpolation               < 0.4 ,
+        shell-escape                     < 0.3 ,
+        text-format                      < 0.4 ,
+        text               >= 0.2     && < 1.3 ,
+        vector             >= 0.3     && < 0.13
+    Exposed-Modules: Dhall.Bash
+    GHC-Options: -Wall
+
+Executable dhall-to-bash
+    Hs-Source-Dirs: exec
+    Main-Is: Main.hs
+    Build-Depends:
+        base                                  ,
+        bytestring                            ,
+        dhall                                 ,
+        dhall-bash                            ,
+        optparse-generic >= 1.1.1    && < 1.3 ,
+        trifecta         >= 1.6      && < 1.8 ,
+        text
+    GHC-Options: -Wall
diff --git a/test/golden-test-cases/dhall-bash.nix.golden b/test/golden-test-cases/dhall-bash.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dhall-bash.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, bytestring, containers, dhall, fetchurl
+, neat-interpolation, optparse-generic, shell-escape, text
+, text-format, trifecta, vector
+}:
+mkDerivation {
+  pname = "dhall-bash";
+  version = "1.0.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base bytestring containers dhall neat-interpolation shell-escape
+    text text-format vector
+  ];
+  executableHaskellDepends = [
+    base bytestring dhall optparse-generic text trifecta
+  ];
+  description = "Compile Dhall to Bash";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/diagrams-solve.cabal b/test/golden-test-cases/diagrams-solve.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/diagrams-solve.cabal
@@ -0,0 +1,42 @@
+name:                diagrams-solve
+version:             0.1.1
+synopsis:            Pure Haskell solver routines used by diagrams
+description:         Pure Haskell solver routines used by the diagrams
+                     project.  Currently includes finding real roots
+                     of low-degree (n < 5) polynomials, and solving
+                     tridiagonal and cyclic tridiagonal linear
+                     systems.
+homepage:            http://projects.haskell.org/diagrams
+license:             BSD3
+license-file:        LICENSE
+author:              various
+maintainer:          diagrams-discuss@googlegroups.com
+category:            Math
+build-type:          Simple
+extra-source-files:  README.markdown, CHANGES.markdown
+cabal-version:       >=1.10
+Tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.1
+Source-repository head
+  type:     git
+  location: http://github.com/diagrams/diagrams-solve.git
+
+library
+  exposed-modules:     Diagrams.Solve.Polynomial,
+                       Diagrams.Solve.Tridiagonal
+  build-depends:       base >=4.5 && < 4.11
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+test-suite tests
+  type: exitcode-stdio-1.0
+  main-is: Test.hs
+  -- other-modules: Instances
+  hs-source-dirs: tests
+  default-language:    Haskell2010
+  build-depends:       base >= 4.2 && < 4.11,
+                       tasty >= 0.10 && < 0.12,
+                       tasty-hunit >= 0.9.2 && < 0.10,
+                       tasty-quickcheck >= 0.8 && < 0.9,
+                       deepseq >= 1.3 && < 1.5,
+                       diagrams-solve
+
diff --git a/test/golden-test-cases/diagrams-solve.nix.golden b/test/golden-test-cases/diagrams-solve.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/diagrams-solve.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, deepseq, fetchurl, tasty, tasty-hunit
+, tasty-quickcheck
+}:
+mkDerivation {
+  pname = "diagrams-solve";
+  version = "0.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base deepseq tasty tasty-hunit tasty-quickcheck
+  ];
+  homepage = "http://projects.haskell.org/diagrams";
+  description = "Pure Haskell solver routines used by diagrams";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/discrimination.cabal b/test/golden-test-cases/discrimination.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/discrimination.cabal
@@ -0,0 +1,76 @@
+name:          discrimination
+category:      Data, Sorting
+version:       0.3
+license:       BSD3
+cabal-version: >= 1.10
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     experimental
+homepage:      http://github.com/ekmett/discrimination/
+bug-reports:   http://github.com/ekmett/discrimination/issues
+copyright:     Copyright (C) 2014-2015 Edward A. Kmett
+build-type:    Simple
+tested-with:   GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
+synopsis:      Fast generic linear-time sorting, joins and container construction.
+description:
+  This package provides fast, generic, linear-time discrimination and sorting.
+  .
+  The techniques applied are based on <http://www.diku.dk/hjemmesider/ansatte/henglein/papers/henglein2011a.pdf multiple> <http://www.diku.dk/hjemmesider/ansatte/henglein/papers/henglein2011c.pdf papers> and <https://www.youtube.com/watch?v=sz9ZlZIRDAg talks> by <http://www.diku.dk/hjemmesider/ansatte/henglein/ Fritz Henglein>.
+
+extra-source-files:
+  .gitignore
+  README.markdown
+  CHANGELOG.markdown
+  HLint.hs
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/discrimination.git
+
+library
+  default-language: Haskell2010
+  ghc-options: -Wall -O2
+  hs-source-dirs: src
+
+  exposed-modules:
+    Data.Discrimination
+    Data.Discrimination.Class
+    Data.Discrimination.Grouping
+    Data.Discrimination.Internal
+    Data.Discrimination.Internal.SmallArray
+    Data.Discrimination.Internal.WordMap
+    Data.Discrimination.Sorting
+
+  build-depends:
+    array         >= 0.5    && < 0.6,
+    base          >= 4.8    && < 5,
+    containers    >= 0.4    && < 0.6,
+    contravariant >= 1.3.1  && < 2,
+    deepseq       >= 1.3    && < 1.5,
+    ghc-prim,
+    hashable      >= 1.2    && < 1.3,
+    primitive     >= 0.6    && < 0.7,
+    profunctors   >= 5      && < 6,
+    promises      >= 0.2    && < 0.4,
+    semigroups    >= 0.16.2 && < 1,
+    transformers  >= 0.2    && < 0.6,
+    transformers-compat >= 0.3 && < 1,
+    vector        >= 0.10   && < 0.13,
+    void          >= 0.5    && < 1
+
+benchmark wordmap
+  type:             exitcode-stdio-1.0
+  main-is:          wordmap.hs
+  ghc-options:      -Wall -O2 -threaded 
+  hs-source-dirs:   benchmarks
+  default-language: Haskell2010
+  build-depends:
+    base >= 4.9,
+    containers,
+    criterion,
+    deepseq,
+    discrimination,
+    ghc-prim,
+    unordered-containers,
+    primitive
diff --git a/test/golden-test-cases/discrimination.nix.golden b/test/golden-test-cases/discrimination.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/discrimination.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, array, base, containers, contravariant, criterion
+, deepseq, fetchurl, ghc-prim, hashable, primitive, profunctors
+, promises, semigroups, transformers, transformers-compat
+, unordered-containers, vector, void
+}:
+mkDerivation {
+  pname = "discrimination";
+  version = "0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base containers contravariant deepseq ghc-prim hashable
+    primitive profunctors promises semigroups transformers
+    transformers-compat vector void
+  ];
+  benchmarkHaskellDepends = [
+    base containers criterion deepseq ghc-prim primitive
+    unordered-containers
+  ];
+  homepage = "http://github.com/ekmett/discrimination/";
+  description = "Fast generic linear-time sorting, joins and container construction";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/dotenv.cabal b/test/golden-test-cases/dotenv.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dotenv.cabal
@@ -0,0 +1,153 @@
+name:                dotenv
+version:             0.5.2.1
+synopsis:            Loads environment variables from dotenv files
+homepage:            https://github.com/stackbuilders/dotenv-hs
+description:
+  .
+  In most applications,
+  <http://12factor.net/config configuration should be separated from code>.
+  While it usually works well to keep configuration in the
+  environment, there are cases where you may want to store
+  configuration in a file outside of version control.
+  .
+  "Dotenv" files have become popular for storing configuration,
+  especially in development and test environments. In
+  <https://github.com/bkeepers/dotenv Ruby>,
+  <https://github.com/theskumar/python-dotenv Python> and
+  <https://www.npmjs.com/package/dotenv Javascript> there are libraries
+  to facilitate loading of configuration options from configuration
+  files. This library loads configuration to environment variables for
+  programs written in Haskell.
+  .
+  To use, call `loadFile` from your application:
+  .
+  > import Configuration.Dotenv
+  > loadFile False "/my/dotenvfile"
+  .
+  This package also includes an executable that can be used
+  to inspect the results of applying one or more Dotenv files
+  to the environment, or for invoking your executables with
+  an environment after one or more Dotenv files is applied.
+  .
+  See the <https://github.com/stackbuilders/dotenv-hs Github>
+  page for more information on this package.
+license:             MIT
+license-file:        LICENSE
+author:              Justin Leitgeb
+maintainer:          hackage@stackbuilders.com
+copyright:           2015-2017 Stack Builders Inc.
+category:            Configuration
+build-type:          Simple
+extra-source-files:    spec/fixtures/.dotenv
+                     , CHANGELOG.md
+                     , README.md
+cabal-version:       >=1.10
+bug-reports:         https://github.com/stackbuilders/dotenv-hs/issues
+
+data-dir: spec/fixtures/
+data-files:
+  .dotenv
+  .dotenv.example
+  .scheme.yml
+
+flag dev
+  description:        Turn on development settings.
+  manual:             True
+  default:            False
+
+executable dotenv
+  main-is:             Main.hs
+  build-depends:         base >=4.7 && <5.0
+                       , base-compat >= 0.4
+                       , dotenv
+                       , optparse-applicative >=0.11 && < 0.15
+                       , megaparsec >= 6.0 && < 7.0
+                       , process >= 1.4.3.0
+                       , text
+                       , transformers >=0.4 && < 0.6
+                       , yaml
+  other-modules: Paths_dotenv
+
+  hs-source-dirs:      app
+  if flag(dev)
+    ghc-options:      -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-language:    Haskell2010
+
+library
+  exposed-modules:      Configuration.Dotenv
+                      , Configuration.Dotenv.Parse
+                      , Configuration.Dotenv.ParsedVariable
+                      , Configuration.Dotenv.Text
+                      , Configuration.Dotenv.Types
+                      , Configuration.Dotenv.Scheme
+                      , Configuration.Dotenv.Scheme.Helpers
+                      , Configuration.Dotenv.Scheme.Parser
+                      , Configuration.Dotenv.Scheme.Types
+
+  build-depends:         base >=4.7 && <5.0
+                       , base-compat >= 0.4
+                       , directory
+                       , megaparsec >= 6.0 && < 7.0
+                       , process >= 1.4.3.0
+                       , text
+                       , transformers >=0.4 && < 0.6
+                       , exceptions >= 0.8 && < 0.9
+                       , yaml
+
+  if !impl(ghc >= 7.10)
+    build-depends:      void         == 0.7.*
+
+  hs-source-dirs:      src
+  ghc-options:         -Wall
+  if flag(dev)
+    ghc-options:      -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-language:    Haskell2010
+
+test-suite dotenv-test
+  type: exitcode-stdio-1.0
+  hs-source-dirs: spec, src
+  main-is: Spec.hs
+  other-modules:         Configuration.DotenvSpec
+                       , Configuration.Dotenv.TextSpec
+                       , Configuration.Dotenv.ParseSpec
+                       , Configuration.Dotenv
+                       , Configuration.Dotenv.Text
+                       , Configuration.Dotenv.Types
+                       , Configuration.Dotenv.Parse
+                       , Configuration.Dotenv.ParsedVariable
+                       , Configuration.Dotenv.SchemeSpec
+                       , Configuration.Dotenv.Scheme.ParseSpec
+                       , Configuration.Dotenv.Scheme
+                       , Configuration.Dotenv.Scheme.Helpers
+                       , Configuration.Dotenv.Scheme.Parser
+                       , Configuration.Dotenv.Scheme.Types
+
+  build-depends:       base >=4.7 && <5.0
+                     , base-compat >= 0.4
+                     , dotenv
+                     , directory
+                     , megaparsec >= 6.0 && < 7.0
+                     , hspec
+                     , process >= 1.4.3.0
+                     , text
+                     , transformers >=0.4 && < 0.6
+                     , exceptions >= 0.8 && < 0.9
+                     , hspec-megaparsec >= 1.0 && < 2.0
+                     , yaml
+
+  if !impl(ghc >= 7.10)
+    build-depends:      void         == 0.7.*
+
+  if flag(dev)
+    ghc-options:      -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: git@github.com:stackbuilders/dotenv-hs.git
diff --git a/test/golden-test-cases/dotenv.nix.golden b/test/golden-test-cases/dotenv.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dotenv.nix.golden
@@ -0,0 +1,30 @@
+{ mkDerivation, base, base-compat, directory, exceptions, fetchurl
+, hspec, hspec-megaparsec, megaparsec, optparse-applicative
+, process, text, transformers, yaml
+}:
+mkDerivation {
+  pname = "dotenv";
+  version = "0.5.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    base base-compat directory exceptions megaparsec process text
+    transformers yaml
+  ];
+  executableHaskellDepends = [
+    base base-compat megaparsec optparse-applicative process text
+    transformers yaml
+  ];
+  testHaskellDepends = [
+    base base-compat directory exceptions hspec hspec-megaparsec
+    megaparsec process text transformers yaml
+  ];
+  homepage = "https://github.com/stackbuilders/dotenv-hs";
+  description = "Loads environment variables from dotenv files";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/dotnet-timespan.cabal b/test/golden-test-cases/dotnet-timespan.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dotnet-timespan.cabal
@@ -0,0 +1,79 @@
+-- Initial eventstore.cabal generated by cabal init.  For further
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+-- The name of the package.
+name:                dotnet-timespan
+
+-- The package version.  See the Haskell package versioning policy (PVP)
+-- for standards guiding when and how versions should be incremented.
+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
+-- PVP summary:      +-+------- breaking API changes
+--                   | | +----- non-breaking API additions
+--                   | | | +--- code changes with no API change
+version:             0.0.1.0
+
+tested-with: GHC >= 7.8.3 && < 7.11
+
+-- A short (one-line) description of the package.
+synopsis: .NET TimeSpan
+
+-- A longer description of the package.
+description: .NET TimeSpan
+
+-- The license under which the package is released.
+license:             BSD3
+
+-- The file containing the license text.
+license-file:        LICENSE
+
+-- The package author(s).
+author:              Yorick Laupa
+
+-- An email address to which users can send suggestions, bug reports, and
+-- patches.
+maintainer:          yo.eight@gmail.com
+
+-- A copyright notice.
+-- copyright:
+
+homepage:            http://github.com/YoEight/dotnet-timespan
+bug-reports:         http://github.com/YoEight/dotnet-timespan/issues
+category:            Data
+
+build-type:          Simple
+
+-- Extra files to be distributed with the package, such as examples or a
+-- README.
+extra-source-files:  README.md
+                     CHANGELOG.markdown
+                     .gitignore
+                     .travis.yml
+
+-- Constraint on the version of Cabal needed to build this package.
+cabal-version:       >=1.10
+
+source-repository head
+  type: git
+  location: git://github.com/YoEight/dotnet-timespan.git
+
+library
+  -- Modules exported by the library.
+  exposed-modules: Data.DotNet.TimeSpan
+                   Data.DotNet.TimeSpan.Internal
+  -- Modules included in this library but not exported.
+  -- other-modules:
+
+  -- LANGUAGE extensions used by modules in this package.
+  -- other-extensions:
+
+  -- Other library packages from which modules are imported.
+  build-depends:       base >=4.7 && <5
+
+
+  -- Directories containing source files.
+  -- hs-source-dirs:
+
+  -- Base language which the package is written in.
+  ghc-options: -Wall
+
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/dotnet-timespan.nix.golden b/test/golden-test-cases/dotnet-timespan.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dotnet-timespan.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "dotnet-timespan";
+  version = "0.0.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "http://github.com/YoEight/dotnet-timespan";
+  description = ".NET TimeSpan";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/dpor.cabal b/test/golden-test-cases/dpor.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dpor.cabal
@@ -0,0 +1,74 @@
+-- Initial dpor.cabal generated by cabal init.  For further documentation, 
+-- see http://haskell.org/cabal/users-guide/
+
+name:                dpor
+version:             0.2.0.0
+synopsis:            A generic implementation of dynamic partial-order reduction (DPOR) for testing arbitrary models of concurrency.
+
+description:
+  We can characterise the state of a concurrent computation by
+  considering the ordering of dependent events. This is a partial
+  order: independent events can be performed in any order without
+  affecting the result. DPOR is a technique for computing these
+  partial orders at run-time, and only testing one total order for
+  each partial order. This cuts down the amount of work to be done
+  significantly. In particular, this package implemented bounded
+  partial-order reduction, which is a further optimisation. Only
+  schedules within some *bound* are considered.
+  .
+  * DPOR with no schedule bounding is __complete__, it /will/ find all
+    distinct executions!
+  .
+  * DPOR with schedule bounding is __incomplete__, it will only find
+    all distinct executions /within the bound/!
+  .
+  __Caution:__ The fundamental assumption behind DPOR is that the
+  *only* source of nondeterminism in your program is the
+  scheduler. Or, to put it another way, if you execute the same
+  program with the same schedule twice, you get the same result. If
+  you are using this library in combination with something which
+  performs I/O, be *very* certain that this is the case!
+  .
+  See the <https://github.com/barrucadu/dejafu README> for more
+  details.
+  .
+  For details on the algorithm, albeit presented in a very imperative
+  way, see /Bounded partial-order reduction/, K. Coons, M. Musuvathi,
+  and K. McKinley (2013), available at
+  <http://research.microsoft.com/pubs/202164/bpor-oopsla-2013.pdf>
+
+homepage:            https://github.com/barrucadu/dejafu
+license:             MIT
+license-file:        LICENSE
+author:              Michael Walker
+maintainer:          mike@barrucadu.co.uk
+-- copyright:           
+category:            Testing
+build-type:          Simple
+-- extra-source-files:  
+cabal-version:       >=1.10
+
+source-repository head
+  type:     git
+  location: https://github.com/barrucadu/dejafu.git
+
+source-repository this
+  type:     git
+  location: https://github.com/barrucadu/dejafu.git
+  tag:      dpor-0.2.0.0
+
+library
+  exposed-modules:     Test.DPOR
+                     , Test.DPOR.Internal
+                     , Test.DPOR.Random
+                     , Test.DPOR.Schedule
+  -- other-modules:       
+  -- other-extensions:    
+  build-depends:       base       >=4.8  && <5
+                     , containers >=0.5  && <0.6
+                     , deepseq    >=1.3  && <1.5
+                     , random     >=1.0  && <1.2
+                     , semigroups >=0.16 && <0.19
+  -- hs-source-dirs:      
+  default-language:    Haskell2010
+  ghc-options:         -Wall
diff --git a/test/golden-test-cases/dpor.nix.golden b/test/golden-test-cases/dpor.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/dpor.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, containers, deepseq, fetchurl, random
+, semigroups
+}:
+mkDerivation {
+  pname = "dpor";
+  version = "0.2.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers deepseq random semigroups
+  ];
+  homepage = "https://github.com/barrucadu/dejafu";
+  description = "A generic implementation of dynamic partial-order reduction (DPOR) for testing arbitrary models of concurrency";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/drawille.cabal b/test/golden-test-cases/drawille.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/drawille.cabal
@@ -0,0 +1,102 @@
+-- This file has been generated from package.yaml by hpack version 0.14.0.
+--
+-- see: https://github.com/sol/hpack
+
+name:                   drawille
+version:                0.1.2.0
+synopsis:               A port of asciimoo's drawille to haskell
+description:            A tiny library for drawing with braille.
+category:               System
+homepage:               https://github.com/yamadapc/haskell-drawille#readme
+bug-reports:            https://github.com/yamadapc/haskell-drawille/issues
+author:                 Pedro Yamada <tacla.yamada@gmail.com>
+maintainer:             Pedro Yamada <tacla.yamada@gmail.com>
+copyright:              (c) Pedro Yamada
+license:                GPL-3
+license-file:           LICENSE
+build-type:             Simple
+cabal-version:          >= 1.10
+
+source-repository head
+  type: git
+  location: https://github.com/yamadapc/haskell-drawille
+
+flag examples
+  description: Build examples
+  manual: False
+  default: False
+
+flag no-tests
+  description: Don't build test suites
+  manual: False
+  default: False
+
+library
+  hs-source-dirs:
+      src
+  build-depends:
+      base >=4 && <5
+    , containers >=0.5 && <0.6
+  exposed-modules:
+      System.Drawille
+  other-modules:
+      Paths_drawille
+  default-language: Haskell2010
+
+executable image2term
+  main-is: Image2Term.hs
+  hs-source-dirs:
+      examples
+    , src
+  ghc-options: -Wall -threaded -O3
+  if flag(examples)
+    build-depends:
+        base >=4 && <5
+      , containers >=0.5
+      , friday >=0.1 && <0.2
+      , terminal-size >=0.2
+      , vector
+  else
+    buildable: False
+  other-modules:
+      Senoid
+      System.Drawille
+  default-language: Haskell2010
+
+executable senoid
+  main-is: Senoid.hs
+  hs-source-dirs:
+      examples
+    , src
+  ghc-options: -threaded -Wall -O3
+  if flag(examples)
+    build-depends:
+        base >=4 && <5
+      , containers >=0.5 && <0.6
+      , AC-Angle >=1.0 && <1.1
+  else
+    buildable: False
+  other-modules:
+      Image2Term
+      System.Drawille
+  default-language: Haskell2010
+
+test-suite spec
+  type: exitcode-stdio-1.0
+  main-is: Spec.hs
+  hs-source-dirs:
+      src
+    , test
+  ghc-options: -Wall
+  if !(flag(no-tests))
+    build-depends:
+        base >=4 && <5
+      , hspec >=1.11 && <2.4
+      , QuickCheck >=2.6
+      , containers >=0.5 && <0.6
+  else
+    buildable: False
+  other-modules:
+      System.Drawille
+      DrawilleSpec
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/drawille.nix.golden b/test/golden-test-cases/drawille.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/drawille.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, containers, fetchurl, hspec, QuickCheck }:
+mkDerivation {
+  pname = "drawille";
+  version = "0.1.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base containers ];
+  testHaskellDepends = [ base containers hspec QuickCheck ];
+  homepage = "https://github.com/yamadapc/haskell-drawille#readme";
+  description = "A port of asciimoo's drawille to haskell";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/drifter-postgresql.cabal b/test/golden-test-cases/drifter-postgresql.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/drifter-postgresql.cabal
@@ -0,0 +1,63 @@
+name:                drifter-postgresql
+version:             0.2.1
+synopsis:            PostgreSQL support for the drifter schema migration tool
+description:         Support for postgresql-simple Query migrations as well as
+                     arbitrary Haskell IO functions. Be sure to check the
+                     examples dir for a usage example.
+license:             MIT
+license-file:        LICENSE
+author:              Michael Xavier
+maintainer:          michael@michaelxavier.net
+category:            Database
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:         GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2
+extra-source-files:
+  README.md
+  changelog.md
+  examples/Example.hs
+homepage:           http://github.com/michaelxavier/drifter-postgresql
+bug-reports:        http://github.com/michaelxavier/drifter-postgresql/issues
+
+flag lib-Werror
+  default: False
+  manual: True
+
+library
+  exposed-modules:   Drifter.PostgreSQL
+  build-depends:       base >=4.8 && <5
+                     , postgresql-simple >= 0.2
+                     , containers
+                     , drifter >= 0.2
+                     , time
+                     , mtl
+                     , transformers
+                     , transformers-compat >=0.2
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+  if flag(lib-Werror)
+    ghc-options: -Werror
+
+  ghc-options: -Wall
+
+
+test-suite test
+  type: exitcode-stdio-1.0
+  main-is: Main.hs
+  hs-source-dirs:     test
+  default-language:   Haskell2010
+
+  build-depends:    base
+                  , drifter
+                  , postgresql-simple
+                  , drifter-postgresql
+                  , tasty
+                  , tasty-hunit
+                  , either
+                  , text
+
+  if flag(lib-Werror)
+    ghc-options: -Werror
+
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/drifter-postgresql.nix.golden b/test/golden-test-cases/drifter-postgresql.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/drifter-postgresql.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, containers, drifter, either, fetchurl, mtl
+, postgresql-simple, tasty, tasty-hunit, text, time, transformers
+, transformers-compat
+}:
+mkDerivation {
+  pname = "drifter-postgresql";
+  version = "0.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers drifter mtl postgresql-simple time transformers
+    transformers-compat
+  ];
+  testHaskellDepends = [
+    base drifter either postgresql-simple tasty tasty-hunit text
+  ];
+  homepage = "http://github.com/michaelxavier/drifter-postgresql";
+  description = "PostgreSQL support for the drifter schema migration tool";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/ede.cabal b/test/golden-test-cases/ede.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ede.cabal
@@ -0,0 +1,110 @@
+name:                  ede
+version:               0.2.8.7
+synopsis:              Templating language with similar syntax and features to Liquid or Jinja2.
+homepage:              http://github.com/brendanhay/ede
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2013-2015 Brendan Hay
+stability:             Experimental
+category:              Text, Template, Web
+build-type:            Simple
+cabal-version:         >= 1.10
+
+description:
+    ED-E is a templating language written in Haskell with a specific set of features:
+    .
+    * Logicless within reason. A small set of consistent predicates
+    and expressions for formatting and presentational logic are provided.
+    .
+    * Secure. No arbitrary code evaluation, with input data required to be fully specified
+    at render time.
+    .
+    * Stateless. Parsing and rendering are separate steps so that loading, parsing,
+    include resolution, and embedding of the compiled template can optionally be
+    done ahead of time, amortising cost.
+    .
+    * Markup agnostic. ED-E is used to write out everything from configuration files for
+    system services, to HTML and formatted emails.
+    .
+    * Control over purity. Users can choose pure or IO-based resolution of
+    @include@ expressions.
+    .
+    * No surprises. All parsing, type assurances, and rendering steps report helpful
+    error messages with line/column metadata. Variable shadowing, unprintable expressions,
+    implicit type coercion, and unbound variable access are all treated as errors.
+
+extra-source-files:
+    README.md
+
+data-files:
+      test/resources/*.ede
+    , test/resources/*.golden
+
+source-repository head
+
+    type:     git
+    location: git://github.com/brendanhay/ede.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src
+
+    exposed-modules:
+          Text.EDE
+        , Text.EDE.Filters
+
+    other-modules:
+          Paths_ede
+        , Text.EDE.Internal.AST
+        , Text.EDE.Internal.Eval
+        , Text.EDE.Internal.Filters
+        , Text.EDE.Internal.Parser
+        , Text.EDE.Internal.Quoting
+        , Text.EDE.Internal.Syntax
+        , Text.EDE.Internal.Types
+
+    ghc-options:       -Wall
+
+    build-depends:
+          aeson                >= 0.7
+        , ansi-wl-pprint       >= 0.6.6
+        , base                 >= 4.6   && < 5
+        , bifunctors           >= 4
+        , bytestring           >= 0.9
+        , comonad              >= 4.2
+        , directory            >= 1.2
+        , double-conversion    >= 2.0.2
+        , filepath             >= 1.2
+        , free                 >= 4.8
+        , lens                 >= 4.0
+        , mtl                  >= 2.1.3.1
+        , parsers              >= 0.12.1.1
+        , scientific           >= 0.3.1
+        , semigroups           >= 0.15
+        , text                 >= 1.2
+        , text-format          >= 0.3
+        , text-manipulate      >= 0.1.2
+        , trifecta             >= 1.6
+        , unordered-containers >= 0.2.3
+        , vector               >= 0.7.1
+
+test-suite golden
+    default-language:  Haskell2010
+    type:              exitcode-stdio-1.0
+    hs-source-dirs:    test
+    main-is:           Main.hs
+
+    ghc-options:       -Wall -threaded
+
+    build-depends:
+          aeson
+        , base          >= 4.6 && < 5
+        , bifunctors
+        , bytestring
+        , directory
+        , ede
+        , text
+        , tasty
+        , tasty-golden
diff --git a/test/golden-test-cases/ede.nix.golden b/test/golden-test-cases/ede.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ede.nix.golden
@@ -0,0 +1,27 @@
+{ mkDerivation, aeson, ansi-wl-pprint, base, bifunctors, bytestring
+, comonad, directory, double-conversion, fetchurl, filepath, free
+, lens, mtl, parsers, scientific, semigroups, tasty, tasty-golden
+, text, text-format, text-manipulate, trifecta
+, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "ede";
+  version = "0.2.8.7";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    aeson ansi-wl-pprint base bifunctors bytestring comonad directory
+    double-conversion filepath free lens mtl parsers scientific
+    semigroups text text-format text-manipulate trifecta
+    unordered-containers vector
+  ];
+  testHaskellDepends = [
+    aeson base bifunctors bytestring directory tasty tasty-golden text
+  ];
+  homepage = "http://github.com/brendanhay/ede";
+  description = "Templating language with similar syntax and features to Liquid or Jinja2";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/ekg-cloudwatch.cabal b/test/golden-test-cases/ekg-cloudwatch.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ekg-cloudwatch.cabal
@@ -0,0 +1,46 @@
+-- This file has been generated from package.yaml by hpack version 0.17.1.
+--
+-- see: https://github.com/sol/hpack
+
+name:                ekg-cloudwatch
+version:             0.0.1.6
+synopsis:            An ekg backend for Amazon Cloudwatch
+description:         Push ekg metrics to Amazon Cloudwatch
+homepage:            https://github.com/sellerlabs/ekg-cloudwatch#readme
+bug-reports:         https://github.com/sellerlabs/ekg-cloudwatch/issues
+license:             BSD3
+license-file:        LICENSE
+author:              Matt Parsons
+maintainer:          matt@sellerlabs.com
+copyright:           2016 Seller Labs
+category:            Web
+build-type:          Simple
+cabal-version:       >= 1.10
+
+extra-source-files:
+    CHANGELOG.md
+    README.md
+
+source-repository head
+  type: git
+  location: https://github.com/sellerlabs/ekg-cloudwatch
+
+library
+  hs-source-dirs:
+      src
+  build-depends:
+      base >=4.7 && <5
+    , ekg-core >= 0.1 && < 1.0
+    , amazonka >= 1.0.0
+    , amazonka-cloudwatch >= 1.0.0
+    , amazonka-core >= 1.0.0
+    , bytestring
+    , lens
+    , resourcet
+    , semigroups
+    , text
+    , time
+    , unordered-containers
+  exposed-modules:
+      System.Remote.Monitoring.CloudWatch
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/ekg-cloudwatch.nix.golden b/test/golden-test-cases/ekg-cloudwatch.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ekg-cloudwatch.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, amazonka, amazonka-cloudwatch, amazonka-core, base
+, bytestring, ekg-core, fetchurl, lens, resourcet, semigroups, text
+, time, unordered-containers
+}:
+mkDerivation {
+  pname = "ekg-cloudwatch";
+  version = "0.0.1.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    amazonka amazonka-cloudwatch amazonka-core base bytestring ekg-core
+    lens resourcet semigroups text time unordered-containers
+  ];
+  homepage = "https://github.com/sellerlabs/ekg-cloudwatch#readme";
+  description = "An ekg backend for Amazon Cloudwatch";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/emailaddress.cabal b/test/golden-test-cases/emailaddress.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/emailaddress.cabal
@@ -0,0 +1,49 @@
+name:                emailaddress
+version:             0.2.0.0
+synopsis:            Wrapper around email-validate library adding instances for common type classes.
+description:         Please see README.md
+homepage:            https://github.com/cdepillabout/emailaddress#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Dennis Gosnell
+maintainer:          cdep.illabout@gmail.com
+copyright:           2016 Dennis Gosnell
+category:            Text
+build-type:          Simple
+extra-source-files:  README.md
+                   , CHANGELOG.md
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Text.EmailAddress
+  other-modules:       Text.EmailAddress.Internal
+  build-depends:       base >= 4.6 && < 5
+                     , aeson >= 0.9
+                     , bifunctors >= 5
+                     , bytestring >= 0.9
+                     , email-validate >= 2
+                     , http-api-data >= 0.2
+                     , opaleye >= 0.4
+                     , path-pieces >= 0.2
+                     , persistent >= 2
+                     , postgresql-simple >= 0.5
+                     , product-profunctors >= 0.6
+                     , profunctors >= 0.5
+                     , text >= 1.2
+  default-language:    Haskell2010
+  ghc-options:         -Wall
+
+test-suite emailaddress-doctest
+  type:                exitcode-stdio-1.0
+  main-is:             DocTest.hs
+  hs-source-dirs:      test
+  build-depends:       base
+                     , doctest
+                     , Glob
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+source-repository head
+  type:     git
+  location: git@github.com:cdepillabout/emailaddress.git
diff --git a/test/golden-test-cases/emailaddress.nix.golden b/test/golden-test-cases/emailaddress.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/emailaddress.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, aeson, base, bifunctors, bytestring, doctest
+, email-validate, fetchurl, Glob, http-api-data, opaleye
+, path-pieces, persistent, postgresql-simple, product-profunctors
+, profunctors, text
+}:
+mkDerivation {
+  pname = "emailaddress";
+  version = "0.2.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bifunctors bytestring email-validate http-api-data
+    opaleye path-pieces persistent postgresql-simple
+    product-profunctors profunctors text
+  ];
+  testHaskellDepends = [ base doctest Glob ];
+  homepage = "https://github.com/cdepillabout/emailaddress#readme";
+  description = "Wrapper around email-validate library adding instances for common type classes";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/envelope.cabal b/test/golden-test-cases/envelope.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/envelope.cabal
@@ -0,0 +1,38 @@
+name:                envelope
+version:             0.2.2.0
+synopsis:            Defines generic 'Envelope' type to wrap reponses from a JSON API.
+description:         Please see README.md
+homepage:            https://github.com/cdepillabout/envelope#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Dennis Gosnell
+maintainer:          cdep.illabout@gmail.com
+copyright:           2016-2017 Dennis Gosnell
+category:            Web
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Web.Envelope
+  build-depends:       base >= 4.8 && < 5
+                     , aeson >= 0.11
+                     , http-api-data >= 0.3
+                     , mtl >= 2.2
+                     , text >= 1.2
+  default-language:    Haskell2010
+
+test-suite envelope-doctest
+  type:                exitcode-stdio-1.0
+  main-is:             DocTest.hs
+  hs-source-dirs:      test
+  build-depends:       base
+                     , doctest
+                     , Glob
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+source-repository head
+  type:     git
+  location: git@github.com:cdepillabout/envelope.git
diff --git a/test/golden-test-cases/envelope.nix.golden b/test/golden-test-cases/envelope.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/envelope.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, aeson, base, doctest, fetchurl, Glob, http-api-data
+, mtl, text
+}:
+mkDerivation {
+  pname = "envelope";
+  version = "0.2.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ aeson base http-api-data mtl text ];
+  testHaskellDepends = [ base doctest Glob ];
+  homepage = "https://github.com/cdepillabout/envelope#readme";
+  description = "Defines generic 'Envelope' type to wrap reponses from a JSON API";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/eventful-sqlite.cabal b/test/golden-test-cases/eventful-sqlite.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/eventful-sqlite.cabal
@@ -0,0 +1,69 @@
+-- This file has been generated from package.yaml by hpack version 0.17.0.
+--
+-- see: https://github.com/sol/hpack
+
+name:           eventful-sqlite
+version:        0.2.0
+synopsis:       SQLite implementations for eventful
+description:    SQLite implementations for eventful
+category:       Database,Eventsourcing,SQLite
+stability:      experimental
+homepage:       https://github.com/jdreaver/eventful#readme
+bug-reports:    https://github.com/jdreaver/eventful/issues
+maintainer:     David Reaver
+license:        MIT
+license-file:   LICENSE.md
+build-type:     Simple
+cabal-version:  >= 1.10
+
+extra-source-files:
+    CHANGELOG.md
+    README.md
+
+source-repository head
+  type: git
+  location: https://github.com/jdreaver/eventful
+
+library
+  hs-source-dirs:
+      src
+  ghc-options: -Wall
+  build-depends:
+      base >= 4.9 && < 5
+    , eventful-core
+    , eventful-sql-common
+    , aeson
+    , bytestring
+    , mtl
+    , persistent
+    , text
+    , uuid
+  exposed-modules:
+      Eventful.Store.Sqlite
+  default-language: Haskell2010
+
+test-suite spec
+  type: exitcode-stdio-1.0
+  main-is: Spec.hs
+  hs-source-dirs:
+      tests
+      src
+  ghc-options: -Wall
+  build-depends:
+      base >= 4.9 && < 5
+    , eventful-core
+    , eventful-sql-common
+    , aeson
+    , bytestring
+    , mtl
+    , persistent
+    , text
+    , uuid
+    , hspec
+    , HUnit
+    , eventful-test-helpers
+    , persistent-sqlite
+  other-modules:
+      Eventful.Store.SqliteSpec
+      Eventful.Store.Sqlite
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/eventful-sqlite.nix.golden b/test/golden-test-cases/eventful-sqlite.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/eventful-sqlite.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, aeson, base, bytestring, eventful-core
+, eventful-sql-common, eventful-test-helpers, fetchurl, hspec
+, HUnit, mtl, persistent, persistent-sqlite, text, uuid
+}:
+mkDerivation {
+  pname = "eventful-sqlite";
+  version = "0.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bytestring eventful-core eventful-sql-common mtl
+    persistent text uuid
+  ];
+  testHaskellDepends = [
+    aeson base bytestring eventful-core eventful-sql-common
+    eventful-test-helpers hspec HUnit mtl persistent persistent-sqlite
+    text uuid
+  ];
+  homepage = "https://github.com/jdreaver/eventful#readme";
+  description = "SQLite implementations for eventful";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/exact-pi.cabal b/test/golden-test-cases/exact-pi.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/exact-pi.cabal
@@ -0,0 +1,35 @@
+-- Initial exact-pi.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                exact-pi
+version:             0.4.1.2
+synopsis:            Exact rational multiples of pi (and integer powers of pi)
+description:         Provides an exact representation for rational multiples of pi alongside an approximate representation of all reals.
+                     Useful for storing and computing with conversion factors between physical units.
+homepage:            https://github.com/dmcclean/exact-pi/
+bug-reports:         https://github.com/dmcclean/exact-pi/issues/
+license:             MIT
+license-file:        LICENSE
+author:              Douglas McClean
+maintainer:          douglas.mcclean@gmail.com
+-- copyright:           
+category:            Data
+build-type:          Simple
+extra-source-files:  README.md,
+                     changelog.md
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Data.ExactPi,
+                       Data.ExactPi.TypeLevel
+  -- other-modules:       
+  -- other-extensions:    
+  build-depends:       base >=4.7 && <5,
+                       numtype-dk >= 0.5
+  ghc-options:         -Wall
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+source-repository head
+  type:                git
+  location:            https://github.com/dmcclean/exact-pi.git
diff --git a/test/golden-test-cases/exact-pi.nix.golden b/test/golden-test-cases/exact-pi.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/exact-pi.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, numtype-dk }:
+mkDerivation {
+  pname = "exact-pi";
+  version = "0.4.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base numtype-dk ];
+  homepage = "https://github.com/dmcclean/exact-pi/";
+  description = "Exact rational multiples of pi (and integer powers of pi)";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/expiring-cache-map.cabal b/test/golden-test-cases/expiring-cache-map.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/expiring-cache-map.cabal
@@ -0,0 +1,108 @@
+name:                expiring-cache-map
+version:             0.0.6.1
+synopsis:            General purpose simple caching.
+description:         
+    A simple general purpose shared state cache map with automatic expiration 
+    of values, for caching the results of accessing a resource such as reading 
+    a file. With variations for Ord and Hashable keys using "Data.Map.Strict"
+    and "Data.HashMap.Strict", respectively.
+
+homepage:            https://github.com/elblake/expiring-cache-map
+bug-reports:         https://github.com/elblake/expiring-cache-map/issues
+license:             BSD3
+license-file:        LICENSE
+author:              Edward L. Blake
+maintainer:          edwardlblake@gmail.com
+copyright:           (c) 2014 Edward L. Blake
+category:            Caching
+build-type:          Simple
+cabal-version:       >=1.8
+
+extra-source-files:
+    README.md
+
+library
+  exposed-modules:
+    Caching.ExpiringCacheMap.OrdECM
+    Caching.ExpiringCacheMap.HashECM
+    Caching.ExpiringCacheMap.Internal.Internal
+    Caching.ExpiringCacheMap.Internal.Types
+    Caching.ExpiringCacheMap.Types
+    Caching.ExpiringCacheMap.Utils.TestSequence
+    Caching.ExpiringCacheMap.Utils.Types
+  -- other-modules:       
+  build-depends:       
+    base == 4.*,
+    containers >= 0.5.0.0,
+    hashable >= 1.0.1.1,
+    unordered-containers >= 0.2.0.0
+
+test-suite test-threads
+    type: exitcode-stdio-1.0
+    hs-source-dirs: . tests
+    main-is: TestWithThreads.hs
+    build-depends:
+      base,
+      bytestring >= 0.10.0.0,
+      time >= 1.0,
+      containers >= 0.5.0.0,
+      hashable >= 1.0.1.1,
+      unordered-containers >= 0.2.0.0
+    other-modules:
+      TestHashECMWithThreads
+      TestHashECMWithThreadsInvalidating
+      TestOrdECMWithThreads
+      TestOrdECMWithThreadsInvalidating
+      Caching.ExpiringCacheMap.Internal.Internal
+
+test-suite test-sequence
+    type: exitcode-stdio-1.0
+    hs-source-dirs: . tests
+    main-is: TestWithTestSequence.hs
+    build-depends:
+      base,
+      bytestring >= 0.10.0.0,
+      containers >= 0.5.0.0,
+      hashable >= 1.0.1.1,
+      unordered-containers >= 0.2.0.0
+    other-modules:
+      TestECMWithTestSequenceCommon
+      TestECMWithTestSequenceCommonInvalidating
+      TestHashECMWithTestSequence
+      TestHashECMWithTestSequenceInvalidating
+      TestOrdECMWithTestSequence
+      TestOrdECMWithTestSequenceInvalidating
+
+test-suite invalidate-test
+    type: exitcode-stdio-1.0
+    hs-source-dirs: . tests
+    main-is: InvalidateTest.hs
+    build-depends:
+      base,
+      bytestring >= 0.10.0.0,
+      time >= 1.0,
+      containers >= 0.5.0.0,
+      hashable >= 1.0.1.1,
+      unordered-containers >= 0.2.0.0
+    other-modules:
+      InvalidateTestCommon
+      InvalidateTestHashECM
+      InvalidateTestOrdECM
+      Caching.ExpiringCacheMap.Internal.Internal
+
+test-suite invalidate-cache-test
+    type: exitcode-stdio-1.0
+    hs-source-dirs: . tests
+    main-is: InvalidateCacheTest.hs
+    build-depends:
+      base,
+      bytestring >= 0.10.0.0,
+      time >= 1.0,
+      containers >= 0.5.0.0,
+      hashable >= 1.0.1.1,
+      unordered-containers >= 0.2.0.0
+    other-modules:
+      InvalidateCacheTestCommon
+      InvalidateCacheTestHashECM
+      InvalidateCacheTestOrdECM
+      Caching.ExpiringCacheMap.Internal.Internal
diff --git a/test/golden-test-cases/expiring-cache-map.nix.golden b/test/golden-test-cases/expiring-cache-map.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/expiring-cache-map.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, bytestring, containers, fetchurl, hashable
+, time, unordered-containers
+}:
+mkDerivation {
+  pname = "expiring-cache-map";
+  version = "0.0.6.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers hashable unordered-containers
+  ];
+  testHaskellDepends = [
+    base bytestring containers hashable time unordered-containers
+  ];
+  homepage = "https://github.com/elblake/expiring-cache-map";
+  description = "General purpose simple caching";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/explicit-exception.cabal b/test/golden-test-cases/explicit-exception.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/explicit-exception.cabal
@@ -0,0 +1,124 @@
+Name:             explicit-exception
+Version:          0.1.9
+License:          BSD3
+License-File:     LICENSE
+Author:           Henning Thielemann <haskell@henning-thielemann.de>
+Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
+Homepage:         http://www.haskell.org/haskellwiki/Exception
+Category:         Control
+Stability:        Experimental
+Synopsis:         Exceptions which are explicit in the type signature.
+Description:
+   Synchronous and Asynchronous exceptions which are explicit in the type signature.
+   The first ones are very similar to 'Either' and 'Control.Monad.Error.ErrorT'.
+   The second ones are used for 'System.IO.readFile' and 'System.IO.hGetContents'.
+   This package is a proposal for improved exception handling in Haskell.
+   It strictly separates between handling of
+   exceptional situations (file not found, invalid user input,
+   see <http://www.haskell.org/haskellwiki/Exception>) and
+   (programming) errors (division by zero, index out of range,
+   see <http://www.haskell.org/haskellwiki/Error>).
+   Handling of the first one is called \"exception handling\",
+   whereas handling of errors is better known as \"debugging\".
+   .
+   For applications see the packages @midi@, @spreadsheet@, @http-monad@.
+   .
+   Although I'm not happy with the identifier style of the Monad Transformer Library
+   (partially intended for unqualified use)
+   I have tried to adopt it for this library,
+   in order to let Haskell programmers get accustomed easily to it.
+   .
+   See also: @unexceptionalio@
+Tested-With:       GHC==6.8.2
+Tested-With:       GHC==7.4.2, GHC==7.6.1, GHC==7.8.2
+Tested-With:       GHC==8.0.1
+Cabal-Version:     >=1.6
+Build-Type:        Simple
+
+Source-Repository head
+  type:     darcs
+  location: http://code.haskell.org/explicit-exception/
+
+Source-Repository this
+  type:     darcs
+  location: http://code.haskell.org/explicit-exception/
+  tag:      0.1.9
+
+Flag buildTests
+  description: Build executables that demonstrate some space leaks
+  default:     False
+
+Flag splitBase
+  description: Choose the smaller, split-up base package from version 2 on.
+
+
+Library
+  Build-Depends:
+    transformers >=0.2 && <0.6,
+    deepseq >=1.1 && <1.5
+  If impl(jhc)
+    Build-Depends:
+      applicative >=1.0 && <1.1,
+      base >= 1 && <2
+  Else
+    If flag(splitBase)
+      Build-Depends: base >= 2 && <5
+    Else
+      Build-Depends:
+        special-functors >=1.0 && <1.1,
+        base >= 1 && <2
+
+  GHC-Options:      -Wall
+  Hs-Source-Dirs:   src
+  Exposed-Modules:
+    Control.Monad.Exception.Asynchronous
+    Control.Monad.Exception.Asynchronous.Lazy
+    Control.Monad.Exception.Asynchronous.Strict
+    Control.Monad.Exception.Synchronous
+  If !impl(jhc)
+    Other-Modules:
+      Control.Monad.Exception.Warning
+      Control.Monad.Exception.Label
+      Control.Monad.Label
+      System.IO.Straight
+      System.IO.Exception.File
+      System.IO.Exception.BinaryFile
+      System.IO.Exception.TextFile
+--    System.IO.Exception.Std
+--    Debug.Error
+
+Executable ee-tar
+  If flag(buildTests)
+    Build-Depends:
+      bytestring >=0.9.0.1 && <0.11,
+      tar >=0.3 && <0.4
+  Else
+    Buildable: False
+  GHC-Options: -Wall
+  Hs-Source-Dirs: src, spaceleak
+  Main-Is: Tar.hs
+
+Executable ee-test
+  If flag(buildTests)
+    Build-Depends:
+      bytestring >=0.9.0.1 && <0.11
+  Else
+    Buildable: False
+  GHC-Options: -Wall
+  Hs-Source-Dirs: src, spaceleak
+  Main-Is: Example.hs
+
+Executable ee-unzip
+  If !flag(buildTests)
+    Buildable: False
+  GHC-Options: -Wall
+  Hs-Source-Dirs: spaceleak
+  Main-Is: Unzip.hs
+
+Executable ee-writer
+  If !flag(buildTests)
+    Buildable: False
+    Buildable: False
+  GHC-Options: -Wall
+  Hs-Source-Dirs: spaceleak
+  Main-Is: Writer.hs
diff --git a/test/golden-test-cases/explicit-exception.nix.golden b/test/golden-test-cases/explicit-exception.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/explicit-exception.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, deepseq, fetchurl, transformers }:
+mkDerivation {
+  pname = "explicit-exception";
+  version = "0.1.9";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base deepseq transformers ];
+  homepage = "http://www.haskell.org/haskellwiki/Exception";
+  description = "Exceptions which are explicit in the type signature";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/fdo-notify.cabal b/test/golden-test-cases/fdo-notify.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fdo-notify.cabal
@@ -0,0 +1,26 @@
+name:               fdo-notify
+version:            0.3.1
+synopsis:           Desktop Notifications client
+description:
+    A library for issuing notifications using FreeDesktop.org's Desktop
+    Notifications protcol. This protocol is supported by services such
+    as Ubuntu's NotifyOSD.
+category:           Desktop
+license:            BSD3
+license-file:       LICENSE
+author:             Max Rabkin
+maintainer:         max.rabkin@gmail.com
+homepage:           http://bitbucket.org/taejo/fdo-notify/
+cabal-version:      >= 1.2.1
+build-type:         Simple
+
+extra-source-files:
+    examples/fib.hs
+
+library
+    build-depends:
+        base >= 3 && < 5
+      , containers >= 0.1
+      , dbus >= 0.10.7
+
+    exposed-modules: DBus.Notify
diff --git a/test/golden-test-cases/fdo-notify.nix.golden b/test/golden-test-cases/fdo-notify.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fdo-notify.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, containers, dbus, fetchurl }:
+mkDerivation {
+  pname = "fdo-notify";
+  version = "0.3.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers dbus ];
+  homepage = "http://bitbucket.org/taejo/fdo-notify/";
+  description = "Desktop Notifications client";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/fgl.cabal b/test/golden-test-cases/fgl.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fgl.cabal
@@ -0,0 +1,134 @@
+name:          fgl
+version:       5.5.4.0
+license:       BSD3
+license-file:  LICENSE
+author:        Martin Erwig, Ivan Lazar Miljenovic
+maintainer:    Ivan.Miljenovic@gmail.com
+category:      Data Structures, Graphs
+synopsis:      Martin Erwig's Functional Graph Library
+
+description:   {
+An inductive representation of manipulating graph data structures.
+.
+Original website can be found at <http://web.engr.oregonstate.edu/~erwig/fgl/haskell>.
+}
+cabal-version: >= 1.10
+build-type:    Simple
+extra-source-files:
+               ChangeLog
+
+tested-with:   GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3,
+               GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.1.*
+
+source-repository head
+    type:         git
+    location:     https://github.com/haskell/fgl.git
+
+flag containers042 {
+    manual:  False
+    default: True
+}
+
+library {
+    default-language: Haskell98
+
+    exposed-modules:
+        Data.Graph.Inductive.Internal.Heap,
+        Data.Graph.Inductive.Internal.Queue,
+        Data.Graph.Inductive.Internal.RootPath,
+        Data.Graph.Inductive.Internal.Thread,
+        Data.Graph.Inductive.Basic,
+        Data.Graph.Inductive.Example,
+        Data.Graph.Inductive.Graph,
+        Data.Graph.Inductive.Monad,
+        Data.Graph.Inductive.NodeMap,
+        Data.Graph.Inductive.PatriciaTree,
+        Data.Graph.Inductive.Query,
+        Data.Graph.Inductive.Tree,
+        Data.Graph.Inductive.Monad.IOArray,
+        Data.Graph.Inductive.Monad.STArray,
+        Data.Graph.Inductive.Query.ArtPoint,
+        Data.Graph.Inductive.Query.BCC,
+        Data.Graph.Inductive.Query.BFS,
+        Data.Graph.Inductive.Query.DFS,
+        Data.Graph.Inductive.Query.Dominators,
+        Data.Graph.Inductive.Query.GVD,
+        Data.Graph.Inductive.Query.Indep,
+        Data.Graph.Inductive.Query.MST,
+        Data.Graph.Inductive.Query.MaxFlow,
+        Data.Graph.Inductive.Query.MaxFlow2,
+        Data.Graph.Inductive.Query.Monad,
+        Data.Graph.Inductive.Query.SP,
+        Data.Graph.Inductive.Query.TransClos,
+        Data.Graph.Inductive
+
+    other-modules:
+        Paths_fgl
+
+    build-depends:    base < 5
+                    , transformers
+                    , array
+
+    if flag(containers042)
+        build-depends:    containers >= 0.4.2
+                        , deepseq >= 1.1.0.0 && < 1.5
+    else
+        build-depends:    containers < 0.4.2
+
+    if impl(ghc >= 7.2) && impl(ghc < 7.6)
+        build-depends:
+            ghc-prim
+
+    ghc-options:      -Wall
+
+}
+
+test-suite fgl-tests {
+    default-language: Haskell98
+
+    type:             exitcode-stdio-1.0
+
+    build-depends:    fgl
+                    , base
+                    , QuickCheck >= 2.8 && < 2.10
+                    , hspec >= 2.1 && < 2.5
+                    , containers
+
+    hs-source-dirs:   test
+                      fgl-arbitrary
+
+    main-is:          TestSuite.hs
+
+    other-modules:    Data.Graph.Inductive.Arbitrary
+                    , Data.Graph.Inductive.Graph.Properties
+                    , Data.Graph.Inductive.Proxy
+                    , Data.Graph.Inductive.Query.Properties
+
+    ghc-options:      -Wall
+
+}
+
+benchmark fgl-benchmark {
+    if flag(containers042)
+        buildable:    True
+    else
+        buildable:    False
+
+    default-language: Haskell98
+
+    type:             exitcode-stdio-1.0
+
+    hs-source-dirs:   test
+
+    main-is:          benchmark.hs
+
+    other-modules:    Data.Graph.Inductive.Proxy
+
+    build-depends:    fgl
+                    , base
+                    , microbench
+                    , deepseq
+
+    ghc-options:      -Wall
+
+}
diff --git a/test/golden-test-cases/fgl.nix.golden b/test/golden-test-cases/fgl.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fgl.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, array, base, containers, deepseq, fetchurl, hspec
+, microbench, QuickCheck, transformers
+}:
+mkDerivation {
+  pname = "fgl";
+  version = "5.5.4.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base containers deepseq transformers
+  ];
+  testHaskellDepends = [ base containers hspec QuickCheck ];
+  benchmarkHaskellDepends = [ base deepseq microbench ];
+  description = "Martin Erwig's Functional Graph Library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/file-modules.cabal b/test/golden-test-cases/file-modules.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/file-modules.cabal
@@ -0,0 +1,46 @@
+name: file-modules
+version: 0.1.2.4
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: Copyright (c) Pedro Tacla Yamada 2015
+maintainer: tacla.yamada@gmail.com
+homepage: https://github.com/yamadapc/stack-run-auto
+synopsis: Takes a Haskell source-code file and outputs its modules.
+description:
+    Uses @haskell-src-exts@ to parse module imports and follows links
+    . to local modules in order to build a list of module dependencies.
+category: Development
+author: Pedro Tacla Yamada
+
+library
+    exposed-modules:
+        Development.FileModules
+    build-depends:
+                  MissingH,
+                  async,
+                  base >=4.5 && <5,
+                  directory,
+                  filepath,
+                  haskell-src-exts >=1.17 && <2,
+                  regex-compat >= 0.95.1,
+                  regex-pcre
+    default-language: Haskell2010
+    hs-source-dirs: src
+
+executable file-modules
+    main-is: Main.hs
+    build-depends:
+                  MissingH,
+                  async,
+                  base >=4.5 && <5,
+                  directory,
+                  filepath,
+                  haskell-src-exts >=1.17 && <2,
+                  regex-compat >= 0.95.1,
+                  regex-pcre
+    default-language: Haskell2010
+    hs-source-dirs: src
+    ghc-options: -O2 -threaded
+
diff --git a/test/golden-test-cases/file-modules.nix.golden b/test/golden-test-cases/file-modules.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/file-modules.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, async, base, directory, fetchurl, filepath
+, haskell-src-exts, MissingH, regex-compat, regex-pcre
+}:
+mkDerivation {
+  pname = "file-modules";
+  version = "0.1.2.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    async base directory filepath haskell-src-exts MissingH
+    regex-compat regex-pcre
+  ];
+  executableHaskellDepends = [
+    async base directory filepath haskell-src-exts MissingH
+    regex-compat regex-pcre
+  ];
+  homepage = "https://github.com/yamadapc/stack-run-auto";
+  description = "Takes a Haskell source-code file and outputs its modules";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/fingertree.cabal b/test/golden-test-cases/fingertree.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fingertree.cabal
@@ -0,0 +1,59 @@
+Name:           fingertree
+Version:        0.1.3.1
+Cabal-Version:  >= 1.18
+Copyright:      (c) 2006 Ross Paterson, Ralf Hinze
+License:        BSD3
+License-File:   LICENSE
+Maintainer:     Ross Paterson <R.Paterson@city.ac.uk>
+bug-reports:    http://hub.darcs.net/ross/fingertree/issues
+Category:       Data Structures
+Synopsis:       Generic finger-tree structure, with example instances
+Description:
+                A general sequence representation with arbitrary
+                annotations, for use as a base for implementations of
+                various collection types, with examples, as described
+                in section 4 of
+                .
+                 * Ralf Hinze and Ross Paterson,
+                   \"Finger trees: a simple general-purpose data structure\",
+                   /Journal of Functional Programming/ 16:2 (2006) pp 197-217.
+                   <http://staff.city.ac.uk/~ross/papers/FingerTree.html>
+                .
+                For a tuned sequence type, see @Data.Sequence@ in the
+                @containers@ package, which is a specialization of
+                this structure.
+Build-Type:     Simple
+Extra-Source-Files:
+                changelog
+Extra-Doc-Files:
+                images/search.svg
+
+Source-Repository head
+  Type: darcs
+  Location: http://hub.darcs.net/ross/fingertree
+
+Library
+  Build-Depends: base < 6
+  Default-Language: Haskell2010
+  Other-Extensions:
+                MultiParamTypeClasses
+                FunctionalDependencies
+                FlexibleInstances
+                UndecidableInstances
+  Exposed-Modules:
+                Data.FingerTree
+                Data.IntervalMap.FingerTree
+                Data.PriorityQueue.FingerTree
+
+Test-suite ft-properties
+  type: exitcode-stdio-1.0
+  main-is: tests/ft-properties.hs
+  cpp-options: -DTESTING
+  default-language: Haskell2010
+  build-depends:
+                base >= 4.2 && < 6,
+                HUnit,
+                QuickCheck,
+                test-framework,
+                test-framework-hunit,
+                test-framework-quickcheck2
diff --git a/test/golden-test-cases/fingertree.nix.golden b/test/golden-test-cases/fingertree.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fingertree.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, fetchurl, HUnit, QuickCheck, test-framework
+, test-framework-hunit, test-framework-quickcheck2
+}:
+mkDerivation {
+  pname = "fingertree";
+  version = "0.1.3.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base HUnit QuickCheck test-framework test-framework-hunit
+    test-framework-quickcheck2
+  ];
+  description = "Generic finger-tree structure, with example instances";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/fixed-vector.cabal b/test/golden-test-cases/fixed-vector.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fixed-vector.cabal
@@ -0,0 +1,87 @@
+Name:           fixed-vector
+Version:        1.0.0.0
+Synopsis:       Generic vectors with statically known size.
+Description:
+  Generic library for vectors with statically known
+  size. Implementation is based on
+  <http://unlines.wordpress.com/2010/11/15/generics-for-small-fixed-size-vectors/>
+  Same functions could be used to work with both ADT based vector like
+  .
+  > data Vec3 a = a a a
+  .
+  Tuples are vectors too:
+  .
+  >>> sum (1,2,3)
+  6
+  .
+  Vectors which are represented internally by arrays are provided by
+  library. Both boxed and unboxed arrays are supported.
+  .
+  Library is structured as follows:
+  .
+  * Data.Vector.Fixed
+  Generic API. It's suitable for both ADT-based vector like Complex
+  and array-based ones.
+  .
+  * Data.Vector.Fixed.Cont
+  Continuation based vectors. Internally all functions use them.
+  .
+  * Data.Vector.Fixed.Mutable
+  Type classes for array-based implementation and API for working with
+  mutable state.
+  .
+  * Data.Vector.Fixed.Unboxed
+  Unboxed vectors.
+  .
+  * Data.Vector.Fixed.Boxed
+  Boxed vector which can hold elements of any type.
+  .
+  * Data.Vector.Fixed.Storable
+  Unboxed vectors of Storable  types.
+  .
+  * Data.Vector.Fixed.Primitive
+  Unboxed vectors based on pritimive package.
+
+Cabal-Version:  >= 1.8
+License:        BSD3
+License-File:   LICENSE
+Author:         Aleksey Khudyakov <alexey.skladnoy@gmail.com>
+Maintainer:     Aleksey Khudyakov <alexey.skladnoy@gmail.com>
+Bug-reports:    https://github.com/Shimuuar/fixed-vector/issues
+Category:       Data
+Build-Type:     Simple
+extra-source-files:
+  ChangeLog.md
+
+source-repository head
+  type:     git
+  location: http://github.com/Shimuuar/fixed-vector
+
+Library
+  Ghc-options:          -Wall
+  Build-Depends: base      >=4.8 && <5
+               , primitive >=0.6.2
+               , deepseq
+  Exposed-modules:
+    -- API
+    Data.Vector.Fixed.Cont
+    Data.Vector.Fixed
+    Data.Vector.Fixed.Generic
+    -- Arrays
+    Data.Vector.Fixed.Mutable
+    Data.Vector.Fixed.Boxed
+    Data.Vector.Fixed.Primitive
+    Data.Vector.Fixed.Unboxed
+    Data.Vector.Fixed.Storable
+  Other-modules:
+    Data.Vector.Fixed.Internal
+
+Test-Suite doctests
+  Type:           exitcode-stdio-1.0
+  Hs-source-dirs: test
+  Main-is:        Doctests.hs
+  Build-Depends: base >=4.8 && <5
+               , primitive >=0.6.2
+                 -- Additional test dependencies.
+               , doctest   >= 0.9
+               , filemanip == 0.3.6.*
diff --git a/test/golden-test-cases/fixed-vector.nix.golden b/test/golden-test-cases/fixed-vector.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fixed-vector.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, deepseq, doctest, fetchurl, filemanip
+, primitive
+}:
+mkDerivation {
+  pname = "fixed-vector";
+  version = "1.0.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base deepseq primitive ];
+  testHaskellDepends = [ base doctest filemanip primitive ];
+  description = "Generic vectors with statically known size";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/fixed.cabal b/test/golden-test-cases/fixed.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fixed.cabal
@@ -0,0 +1,32 @@
+name:          fixed
+category:      Numeric
+version:       0.2.1.1
+license:       BSD3
+cabal-version: >= 1.8
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     provisional
+homepage:      http://github.com/ekmett/fixed
+bug-reports:   http://github.com/ekmett/fixed/issues
+copyright:     Copyright (C) 2014 Edward A. Kmett
+build-type:    Simple
+tested-with:   GHC == 7.8.3
+synopsis:      Signed 15.16 precision fixed point arithmetic
+description:   Signed 15.16 precision fixed point arithmetic
+
+extra-source-files:
+  .travis.yml
+  .gitignore
+  README.markdown
+  CHANGELOG.markdown
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/fixed.git
+
+library
+  hs-source-dirs: src
+  build-depends: base >= 4.7 && < 5
+  ghc-options: -Wall -fwarn-tabs -O2
+  exposed-modules: Numeric.Fixed
diff --git a/test/golden-test-cases/fixed.nix.golden b/test/golden-test-cases/fixed.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/fixed.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "fixed";
+  version = "0.2.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "http://github.com/ekmett/fixed";
+  description = "Signed 15.16 precision fixed point arithmetic";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/foundation.cabal b/test/golden-test-cases/foundation.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/foundation.cabal
@@ -0,0 +1,280 @@
+name:                foundation
+version:             0.0.17
+synopsis:            Alternative prelude with batteries and no dependencies
+description:
+    A custom prelude with no dependencies apart from base.
+    .
+    This package has the following goals:
+    .
+    * provide a base like sets of modules that provide a consistent set of features and bugfixes across multiple versions of GHC (unlike base).
+    .
+    * provide a better and more efficient prelude than base's prelude.
+    .
+    * be self-sufficient: no external dependencies apart from base.
+    .
+    * provide better data-types: packed unicode string by default, arrays.
+    .
+    * Better numerical classes that better represent mathematical thing (No more all-in-one Num).
+    .
+    * Better I/O system with less Lazy IO
+    .
+    * Usual partial functions distinguished through type system
+license:             BSD3
+license-file:        LICENSE
+copyright:           2015-2017 Vincent Hanquez <vincent@snarc.org>
+                     2017      Foundation Maintainers
+author:              Vincent Hanquez <vincent@snarc.org>
+maintainer:          vincent@snarc.org
+category:            foundation
+build-type:          Simple
+homepage:            https://github.com/haskell-foundation/foundation
+bug-reports:         https://github.com/haskell-foundation/foundation/issues
+cabal-version:       >=1.18
+tested-with:         GHC==8.2.1, GHC==8.0.2, GHC==7.10.3
+extra-source-files:  cbits/*.h
+extra-doc-files:     README.md
+                     CHANGELOG.md
+
+source-repository head
+  type: git
+  location: https://github.com/haskell-foundation/foundation.git
+
+flag experimental
+  description:       Enable building experimental features, known as highly unstable or without good support cross-platform
+  default:           False
+  manual:            True
+
+flag bench-all
+  description:       Add some comparaison benchmarks against other haskell libraries
+  default:           False
+  manual:            True
+
+flag minimal-deps
+  description:       Build fully with minimal deps (no criterion, no quickcheck, no doctest)
+  default:           False
+  manual:            True
+
+flag bounds-check
+  description:       Add extra friendly boundary check for unsafe array operations
+  default:           False
+  manual:            True
+
+flag doctest
+  description:       Add extra friendly boundary check for unsafe array operations
+  default:           False
+  manual:            True
+
+library
+  exposed-modules:   Foundation
+                     Foundation.Numerical
+                     Foundation.Array
+                     Foundation.Array.Internal
+                     Foundation.Bits
+                     Foundation.Class.Bifunctor
+                     Foundation.Class.Storable
+                     Foundation.Conduit
+                     Foundation.Conduit.Textual
+                     Foundation.Exception
+                     Foundation.String
+                     Foundation.String.Read
+                     Foundation.String.Builder
+                     Foundation.IO
+                     Foundation.IO.FileMap
+                     Foundation.IO.Terminal
+                     Foundation.VFS
+                     Foundation.VFS.Path
+                     Foundation.VFS.FilePath
+                     Foundation.VFS.URI
+                     Foundation.Math.Trigonometry
+                     Foundation.Hashing
+                     Foundation.Foreign
+                     Foundation.Collection
+                     Foundation.Primitive
+                     Foundation.List.DList
+                     Foundation.Monad
+                     Foundation.Monad.Except
+                     Foundation.Monad.Reader
+                     Foundation.Monad.State
+                     Foundation.Network.IPv4
+                     Foundation.Network.IPv6
+                     Foundation.System.Info
+                     Foundation.Strict
+                     Foundation.Parser
+                     Foundation.Random
+                     Foundation.Check
+                     Foundation.Check.Main
+                     Foundation.Timing
+                     Foundation.Timing.Main
+                     Foundation.Time.Types
+                     Foundation.Time.Bindings
+                     Foundation.Time.StopWatch
+                     Foundation.UUID
+                     Foundation.System.Entropy
+                     Foundation.System.Bindings
+  other-modules:     
+                     Foundation.Tuple
+                     Foundation.Hashing.FNV
+                     Foundation.Hashing.SipHash
+                     Foundation.Hashing.Hasher
+                     Foundation.Hashing.Hashable
+                     Foundation.Check.Gen
+                     Foundation.Check.Print
+                     Foundation.Check.Arbitrary
+                     Foundation.Check.Property
+                     Foundation.Check.Config
+                     Foundation.Check.Types
+                     Foundation.Collection.Buildable
+                     Foundation.Collection.List
+                     Foundation.Collection.Element
+                     Foundation.Collection.InnerFunctor
+                     Foundation.Collection.Collection
+                     Foundation.Collection.Copy
+                     Foundation.Collection.Sequential
+                     Foundation.Collection.Keyed
+                     Foundation.Collection.Indexed
+                     Foundation.Collection.Foldable
+                     Foundation.Collection.Mutable
+                     Foundation.Collection.Zippable
+                     Foundation.Collection.Mappable
+                     Foundation.Conduit.Internal
+                     Foundation.Numerical.Floating
+                     Foundation.IO.File
+                     Foundation.Monad.MonadIO
+                     Foundation.Monad.Exception
+                     Foundation.Monad.Transformer
+                     Foundation.Monad.Identity
+                     Foundation.Monad.Base
+                     Foundation.Random.Class
+                     Foundation.Random.DRG
+                     Foundation.Random.ChaChaDRG
+                     Foundation.Random.XorShift
+                     Foundation.Array.Chunked.Unboxed
+                     Foundation.Array.Bitmap
+                     Foundation.Foreign.Alloc
+                     Foundation.Foreign.MemoryMap
+                     Foundation.Foreign.MemoryMap.Types
+                     Foundation.Partial
+                     -- Foundation.Time.Bindings
+                     Foundation.System.Entropy.Common
+                     Foundation.System.Bindings.Network
+                     Foundation.System.Bindings.Time
+                     Foundation.System.Bindings.Hs
+
+  include-dirs:      cbits
+  c-sources:         cbits/foundation_random.c
+                     cbits/foundation_network.c
+                     cbits/foundation_time.c
+                     cbits/foundation_utf8.c
+
+  if flag(experimental)
+    exposed-modules: Foundation.Network.HostName
+  if os(windows)
+    exposed-modules: Foundation.System.Bindings.Windows
+    other-modules:   Foundation.Foreign.MemoryMap.Windows
+                     Foundation.System.Entropy.Windows
+  else
+    exposed-modules: Foundation.System.Bindings.Posix
+                     Foundation.System.Bindings.PosixDef
+    other-modules:   Foundation.Foreign.MemoryMap.Posix
+                     Foundation.System.Entropy.Unix
+  if os(linux)
+    exposed-modules: Foundation.System.Bindings.Linux
+  if os(osx)
+    exposed-modules: Foundation.System.Bindings.Macos
+
+  if impl(ghc >= 7.10)
+    exposed-modules: Foundation.Tuple.Nth
+                     Foundation.List.ListN
+
+  default-extensions: NoImplicitPrelude
+                      RebindableSyntax
+                      TypeFamilies
+                      BangPatterns
+                      DeriveDataTypeable
+  build-depends:     base >= 4.7 && < 5
+                   , basement == 0.0.4
+                   , ghc-prim
+  -- FIXME add suport for armel mipsel
+  --  CPP-options: -DARCH_IS_LITTLE_ENDIAN
+  -- FIXME add support for powerpc powerpc64 armeb mipseb
+  --  CPP-options: -DARCH_IS_BIG_ENDIAN
+  if (arch(i386) || arch(x86_64))
+    cpp-options: -DARCH_IS_LITTLE_ENDIAN
+  else
+    cpp-options: -DARCH_IS_UNKNOWN_ENDIAN
+  if os(windows)
+    build-depends:    Win32
+  ghc-options:       -Wall -fwarn-tabs
+  default-language:  Haskell2010
+  if impl(ghc >= 8.0)
+    ghc-options:     -Wno-redundant-constraints
+  if flag(bounds-check)
+    cpp-options: -DFOUNDATION_BOUNDS_CHECK
+
+test-suite check-foundation
+  type:              exitcode-stdio-1.0
+  hs-source-dirs:    tests
+  main-is:           Checks.hs
+  other-modules:     Test.Checks.Property.Collection
+                     Test.Foundation.Random
+                     Test.Foundation.Misc
+                     Test.Foundation.Conduit
+                     Test.Foundation.Primitive.BlockN
+                     Test.Foundation.Storable
+                     Test.Foundation.Number
+                     Test.Foundation.String.Base64
+                     Test.Foundation.String
+                     Test.Foundation.Bits
+                     Test.Data.Network
+                     Test.Data.List
+                     Test.Foundation.Network.IPv4
+                     Test.Foundation.Network.IPv6
+  default-extensions: NoImplicitPrelude
+                      RebindableSyntax
+                      OverloadedStrings
+  build-depends:     base >= 3 && < 5
+                   , basement
+                   , foundation
+  ghc-options:       -Wall -fno-warn-orphans -fno-warn-missing-signatures
+  default-language:  Haskell2010
+  if impl(ghc >= 8.0)
+    ghc-options:     -Wno-redundant-constraints
+
+test-suite doctest
+  type:              exitcode-stdio-1.0
+  hs-source-dirs:    tests
+  default-language:  Haskell2010
+  main-is:           DocTest.hs
+  default-extensions: NoImplicitPrelude
+                      RebindableSyntax
+  if flag(minimal-deps)
+    -- TODO: for no, force unbuildable anyway
+    buildable:       False
+  else
+    if flag(doctest)
+      build-depends:     base >= 3 && < 5
+                       , doctest >= 0.9
+      buildable:     True
+    else
+      buildable:     False
+
+Benchmark bench
+  main-is:           Main.hs
+  other-modules:     BenchUtil.Common
+                     BenchUtil.RefData
+                     Sys
+                     Fake.ByteString
+                     Fake.Text
+                     Fake.Vector
+  hs-source-dirs:    benchs
+  default-language:  Haskell2010
+  type:              exitcode-stdio-1.0
+  default-extensions: NoImplicitPrelude
+                      BangPatterns
+  if flag(minimal-deps) || impl(ghc < 7.10)
+    buildable: False
+  else
+    build-depends:     base >= 4, gauge, basement, foundation
+    if flag(bench-all)
+      cpp-options:     -DBENCH_ALL
+      build-depends:   text, attoparsec, vector, bytestring
diff --git a/test/golden-test-cases/foundation.nix.golden b/test/golden-test-cases/foundation.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/foundation.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, basement, fetchurl, gauge, ghc-prim }:
+mkDerivation {
+  pname = "foundation";
+  version = "0.0.17";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base basement ghc-prim ];
+  testHaskellDepends = [ base basement ];
+  benchmarkHaskellDepends = [ base basement gauge ];
+  homepage = "https://github.com/haskell-foundation/foundation";
+  description = "Alternative prelude with batteries and no dependencies";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/frisby.cabal b/test/golden-test-cases/frisby.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/frisby.cabal
@@ -0,0 +1,37 @@
+name:                frisby
+version:             0.2.2
+cabal-version:       >=1.6
+license:             BSD3
+copyright:           John Meacham (2006)
+author:              John Meacham <john@repetae.net>
+maintainer:          Ben Gamari <ben@smart-cactus.org>
+stability:           experimental
+homepage:            http://repetae.net/computer/frisby/
+homepage:            http://repetae.net/computer/frisby/
+package-url:         http://repetae.net/repos/frisby
+synopsis:            Linear time composable parser for PEG grammars
+description:         frisby is a parser library that can parse arbitrary PEG
+                     grammars in linear time. Unlike other parsers of PEG grammars,
+                     frisby need not be supplied with all possible rules up front,
+                     allowing composition of smaller parsers.
+                     .
+                     PEG parsers are never ambiguous and allow infinite lookahead
+                     with no backtracking penalty. Since PEG parsers can look ahead
+                     arbitrarily, they can easily express rules such as the maximal
+                     munch rule used in lexers, meaning no separate lexer is needed.
+                     .
+                     In addition to many standard combinators, frisby provides
+                     routines to translate standard regex syntax into frisby parsers.
+extra-source-files:  Changelog.md
+category:            Text
+tested-with:         GHC == 7.6.*, GHC == 7.8.*, GHC == 7.10.*, GHC == 8.0.*, GHC == 8.2.*
+license-file:        LICENSE
+build-type:          Simple
+
+library
+  exposed-modules:     Text.Parsers.Frisby, Text.Parsers.Frisby.Char
+  build-depends:       base>=4 && <5, containers, mtl, array, semigroups
+
+source-repository head
+  type:     git
+  location: https://github.com/bgamari/frisby
diff --git a/test/golden-test-cases/frisby.nix.golden b/test/golden-test-cases/frisby.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/frisby.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, array, base, containers, fetchurl, mtl, semigroups
+}:
+mkDerivation {
+  pname = "frisby";
+  version = "0.2.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ array base containers mtl semigroups ];
+  homepage = "http://repetae.net/computer/frisby/";
+  description = "Linear time composable parser for PEG grammars";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/funcmp.cabal b/test/golden-test-cases/funcmp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/funcmp.cabal
@@ -0,0 +1,92 @@
+-- Copyright (c) 2005-2010 Peter Simons
+--
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Name:                   funcmp
+Version:                1.8
+License:                GPL-3
+License-File:           COPYING
+Author:                 Meik Hellmund, Ralf Hinze, Joachim Korittky,
+                        Marco Kuhlmann, Ferenc Wágner, Peter Simons,
+                        Robin Green
+Maintainer:             Peter Simons <simons@cryp.to>
+Homepage:               http://savannah.nongnu.org/projects/funcmp/
+Bug-Reports:            http://savannah.nongnu.org/bugs/?func=additem&group=funcmp
+Category:               Graphics
+Synopsis:               Functional MetaPost
+Description:            Functional MetaPost is a Haskell frontend to the
+                        MetaPost language by John Hobby. Users write their
+                        graphics as Haskell programs, which then emit MetaPost
+                        code that can be compiled into encapsulated PostScript
+                        files and smoothly included into e.g. LaTeX.
+                        .
+                        A collection of useful examples how to use Functional
+                        MetaPost can be found in the user's manual at
+                        <http://download.savannah.nongnu.org/releases/funcmp/Manual_eng.ps>. The
+                        document doesn't offer very much detail in terms of
+                        explanations, but the code samples are quite helpful.
+                        .
+                        Further documentation can be found in the original
+                        thesis that describes the implementation. The text is
+                        available in German at
+                        <http://download.savannah.nongnu.org/releases/funcmp/Thesis.ps> and in
+                        English at
+                        <http://download.savannah.nongnu.org/releases/funcmp/Thesis_eng.ps>.
+                        .
+                        Last but not least, there is a tutorial that offers many
+                        helpful examples available in German at
+                        <http://download.savannah.nongnu.org/releases/funcmp/Tutorial.ps> and in
+                        English at
+                        <http://download.savannah.nongnu.org/releases/funcmp/Tutorial_eng.ps>.
+Cabal-Version:          >= 1.6
+Build-Type:             Simple
+Tested-With:            GHC >= 6.10.4 && <= 7.10.1
+
+Data-files:             doc/FMPMain.hs
+                        doc/Manual.lhs
+                        doc/Manual_eng.lhs
+                        doc/README.doc
+                        doc/Tutorial.lhs
+                        doc/Tutorial_eng.lhs
+                        doc/fmp.ini
+                        doc/lhs2TeX.fmt
+                        texmf/FuncMP.mp
+                        texmf/fmp1.mf
+                        texmf/fmp24.mf
+                        texmf/fmp8.mf
+
+Source-Repository head
+  Type:                 git
+  Location:             git://git.savannah.nongnu.org/funcmp.git
+
+Library
+  Build-Depends:        base >= 3 && <= 5, process >= 1.0.1.1, filepath
+  Exposed-Modules:      FMP
+                        FMP.Canvas
+                        FMP.Color
+                        FMP.Core
+                        FMP.File
+                        FMP.Frames
+                        FMP.Matrix
+                        FMP.PP
+                        FMP.Picture
+                        FMP.RedBlack
+                        FMP.Resolve
+                        FMP.Symbols
+                        FMP.Syntax
+                        FMP.Term
+                        FMP.Tree
+                        FMP.Turtle
+                        FMP.Types
+  Other-Modules:        Paths_funcmp
diff --git a/test/golden-test-cases/funcmp.nix.golden b/test/golden-test-cases/funcmp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/funcmp.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, filepath, process }:
+mkDerivation {
+  pname = "funcmp";
+  version = "1.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [ base filepath process ];
+  homepage = "http://savannah.nongnu.org/projects/funcmp/";
+  description = "Functional MetaPost";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/functor-classes-compat.cabal b/test/golden-test-cases/functor-classes-compat.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/functor-classes-compat.cabal
@@ -0,0 +1,147 @@
+name:                functor-classes-compat
+version:             1
+synopsis:            Data.Functor.Classes instances for core packages
+description:
+  "Data.Functor.Classes" instances for core packages:
+  .
+  * containers
+  .
+  * vector
+  .
+  * unordered-containers
+homepage:            https://github.com/phadej/functor-classes-compat#readme
+bug-reports:         https://github.com/phadej/functor-classes-compat/issues
+license:             BSD3
+license-file:        LICENSE
+author:              Oleg Grenrus <oleg.grenrus@iki.fi>
+maintainer:          Oleg Grenrus <oleg.grenrus@iki.fi>
+copyright:           2016 Oleg Grenrus
+category:            Data
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+tested-with:
+  GHC==7.4.2,
+  GHC==7.6.3,
+  GHC==7.8.4,
+  GHC==7.10.3,
+  GHC==8.0.1,
+  GHC==8.0.2
+
+flag base-transformers-1
+  description: Together with base-transformers-1 pick: base >= 4.9, transformers < 0.4, 0.4.*, or >= 0.5. See cabal file for precise assignments.
+  manual: False
+  default: True
+
+flag base-transformers-2
+  description: See base-transformers-1 flag
+  manual: False
+  default: True
+
+flag vector
+  description: 'vector >= 0.12'
+  manual: False
+  default: True
+
+flag containers
+  description: 'containers >= 0.5.9.1'
+  manual: False
+  default: True
+
+flag unordered-containers
+  description: 'unordered-containers >= 0.2.8.0'
+  manual: False
+  default: True
+
+source-repository head
+  type:     git
+  location: https://github.com/phadej/functor-classes-compat
+
+library
+  exposed-modules:
+    Data.Map.Functor.Classes
+    Data.Set.Functor.Classes
+    Data.IntMap.Functor.Classes
+    Data.Vector.Functor.Classes
+    Data.HashSet.Functor.Classes
+    Data.HashMap.Functor.Classes
+  default-language:    Haskell2010
+  ghc-options: -Wall
+
+  build-depends:  hashable >=1.0.1.1 && <1.3
+
+  -- base and transformer dependencies:
+  -- t t: base >= 4.9
+  -- t f: transformers >= 0.5
+  -- f t: transformers < 0.4
+  -- f f: transformers == 0.4.*
+  --
+  -- The order is chosen so 'f f' combination is only requiring src-old
+  if flag(base-transformers-1)
+    if flag(base-transformers-2)
+      build-depends: base         >=4.9 && <4.10
+    else
+      build-depends: base         >= 4.5 && <4.9,
+                     transformers >= 0.5 && <0.6
+  else
+    if flag(base-transformers-2)
+      -- we don't really care about transformers version, as long as it <0.4
+      -- to make flag selection deterministic
+      build-depends: base                >= 4.5 && <4.9,
+                     transformers        <  0.4,
+                     transformers-compat >= 0.5 && <0.6
+    else
+      build-depends: base                >= 4.5 && <4.9,
+                     transformers        >= 0.4 && <0.5
+
+
+  -- containers
+  if flag(containers)
+    build-depends: containers >= 0.5.9.1 && <0.6
+    if flag(base-transformers-1) && flag(base-transformers-2)
+        hs-source-dirs: src-none/containers
+    else
+      if !flag(base-transformers-1) && !flag(base-transformers-2)
+        hs-source-dirs: src-implicit/containers
+      else
+        hs-source-dirs: src-explicit/containers
+  else
+    build-depends: containers >= 0.4 && <0.5.9.1
+    if !flag(base-transformers-1) && !flag(base-transformers-2)
+      hs-source-dirs: src-implicit/containers
+    else
+      hs-source-dirs: src-explicit/containers
+
+  -- unordered-containers
+  if flag(unordered-containers)
+    build-depends: unordered-containers >= 0.2.8.0 && <0.3
+    if flag(base-transformers-1) && flag(base-transformers-2)
+        hs-source-dirs: src-none/unordered-containers
+    else
+      if !flag(base-transformers-1) && !flag(base-transformers-2)
+        hs-source-dirs: src-implicit/unordered-containers
+      else
+        hs-source-dirs: src-explicit/unordered-containers
+  else
+    build-depends: unordered-containers >= 0.2.7.1 && <0.2.8.0
+    if !flag(base-transformers-1) && !flag(base-transformers-2)
+      hs-source-dirs: src-implicit/unordered-containers
+    else
+      hs-source-dirs: src-explicit/unordered-containers
+
+  -- vector
+  if flag(vector)
+    build-depends: vector >= 0.12 && <0.13
+    if flag(base-transformers-1) && flag(base-transformers-2)
+        hs-source-dirs: src-none/vector
+    else
+      if !flag(base-transformers-1) && !flag(base-transformers-2)
+        hs-source-dirs: src-implicit/vector
+      else
+        hs-source-dirs: src-explicit/vector
+  else
+    build-depends: vector >= 0.11.0.0 && <0.12
+    if !flag(base-transformers-1) && !flag(base-transformers-2)
+      hs-source-dirs: src-implicit/vector
+    else
+      hs-source-dirs: src-explicit/vector
diff --git a/test/golden-test-cases/functor-classes-compat.nix.golden b/test/golden-test-cases/functor-classes-compat.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/functor-classes-compat.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, containers, fetchurl, hashable
+, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "functor-classes-compat";
+  version = "1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers hashable unordered-containers vector
+  ];
+  homepage = "https://github.com/phadej/functor-classes-compat#readme";
+  description = "Data.Functor.Classes instances for core packages";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/general-games.cabal b/test/golden-test-cases/general-games.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/general-games.cabal
@@ -0,0 +1,53 @@
+name:                general-games
+version:             1.0.5
+synopsis:            Library supporting simulation of a number of games
+homepage:            https://github.com/cgorski/general-games
+bug-reports:         https://github.com/cgorski/general-games/issues
+license:             MIT
+license-file:        LICENSE
+author:              Christopher A. Gorski
+maintainer:          cgorski@cgorski.org
+copyright:           2017 Christopher A. Gorski
+category:            Game, Poker
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+description:
+   Library providing framework for simulating outcomes of a variety
+   of games, including Poker.
+
+source-repository head
+    type:     git
+    location: git://github.com/cgorski/general-games.git
+                      
+library
+  hs-source-dirs:      src
+  exposed-modules:     Game.Implement.Card
+                     , Game.Implement.Card.Standard
+                     , Game.Implement.Card.Standard.Poker
+                     , Game.Game.Poker
+
+  build-depends:       base >= 4.7 && < 5
+                     , random-shuffle
+                     , MonadRandom
+                     , random
+                     , monad-loops
+  default-language:    Haskell2010
+  ghc-options:         -Wall
+
+test-suite general-games-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base
+                     , general-games
+                     , HUnit
+                     , hspec
+                     , MonadRandom
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N1 -O
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/cgorski/general-games
diff --git a/test/golden-test-cases/general-games.nix.golden b/test/golden-test-cases/general-games.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/general-games.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, fetchurl, hspec, HUnit, monad-loops
+, MonadRandom, random, random-shuffle
+}:
+mkDerivation {
+  pname = "general-games";
+  version = "1.0.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base monad-loops MonadRandom random random-shuffle
+  ];
+  testHaskellDepends = [ base hspec HUnit MonadRandom ];
+  homepage = "https://github.com/cgorski/general-games";
+  description = "Library supporting simulation of a number of games";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/generic-lens.cabal b/test/golden-test-cases/generic-lens.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/generic-lens.cabal
@@ -0,0 +1,123 @@
+name:                 generic-lens
+version:              0.5.1.0
+synopsis:             Generic data-structure operations exposed as lenses.
+description:          This package uses the GHC 8 Generic representation to derive various operations on data structures with a lens interface, including structural subtype relationship between records and positional indexing into arbitrary product types.
+
+homepage:             https://github.com/kcsongor/generic-lens
+license:              BSD3
+license-file:         LICENSE
+author:               Csongor Kiss
+maintainer:           kiss.csongor.kiss@gmail.com
+category:             Generics, Records, Lens
+build-type:           Simple
+cabal-version:        >= 1.10
+Tested-With:          GHC == 8.0.2, GHC == 8.2.1
+
+extra-source-files:   ChangeLog.md
+                    , examples/StarWars.hs
+                    , examples/Examples.hs
+                    , README.md
+
+library
+  exposed-modules:    Data.Generics.Product
+                    , Data.Generics.Product.Any
+                    , Data.Generics.Product.Fields
+                    , Data.Generics.Product.Positions
+                    , Data.Generics.Product.Subtype
+                    , Data.Generics.Product.Typed
+                    --, Data.Generics.Labels
+
+                    , Data.Generics.Sum
+                    , Data.Generics.Sum.Any
+                    , Data.Generics.Sum.Constructors
+                    , Data.Generics.Sum.Typed
+                    , Data.Generics.Sum.Subtype
+                    , Data.Generics.Internal.Lens
+
+  other-modules:      Data.Generics.Internal.Families
+                    , Data.Generics.Internal.Families.Changing
+                    , Data.Generics.Internal.Families.Collect
+                    , Data.Generics.Internal.Families.Has
+                    , Data.Generics.Internal.HList
+                    , Data.Generics.Internal.Void
+
+                    , Data.Generics.Sum.Internal.Constructors
+                    , Data.Generics.Sum.Internal.Typed
+                    , Data.Generics.Sum.Internal.Subtype
+
+                    , Data.Generics.Product.Internal.Fields
+                    , Data.Generics.Product.Internal.Positions
+                    , Data.Generics.Product.Internal.Subtype
+                    , Data.Generics.Product.Internal.Typed
+
+  build-depends:      base        >= 4.9 && <= 5.0
+                    , profunctors >= 5.0 && <= 6.0
+                    , tagged      >= 0.8 && <= 0.9
+
+  hs-source-dirs:     src
+  default-language:   Haskell2010
+  ghc-options:        -Wall
+
+source-repository head
+  type:               git
+  location:           https://github.com/kcsongor/generic-lens
+
+test-suite generic-lens-test
+  type:               exitcode-stdio-1.0
+  hs-source-dirs:     test
+  main-is:            Spec.hs
+
+  build-depends:      base          >= 4.9 && <= 5.0
+                    , generic-lens
+                    , inspection-testing >= 0.1
+
+  default-language:   Haskell2010
+  ghc-options:        -Wall
+
+test-suite generic-lens-test-25
+  type:               exitcode-stdio-1.0
+  hs-source-dirs:     test
+  main-is:            25.hs
+
+  build-depends:      base          >= 4.9 && <= 5.0
+                    , generic-lens
+                    , lens
+
+  default-language:   Haskell2010
+  ghc-options:        -Wall
+
+test-suite generic-lens-test-24
+  type:               exitcode-stdio-1.0
+  hs-source-dirs:     test
+  main-is:            24.hs
+
+  build-depends:      base          >= 4.9 && <= 5.0
+                    , generic-lens
+                    , lens
+
+  default-language:   Haskell2010
+  ghc-options:        -Wall
+
+test-suite doctests
+  default-language:   Haskell2010
+  type:               exitcode-stdio-1.0
+  ghc-options:        -threaded
+  main-is:            doctest.hs
+  build-depends:      base >4 && <5, doctest
+  hs-source-dirs:     test
+
+benchmark generic-lens-bench
+  type:               exitcode-stdio-1.0
+  hs-source-dirs:     benchmarks
+  main-is:            Bench.hs
+
+  build-depends:      generic-lens
+
+                    , base        >= 4.9 && <= 5.0
+                    , QuickCheck
+                    , criterion
+                    , deepseq
+                    , lens
+
+  default-language:   Haskell2010
+  ghc-options:        -Wall
diff --git a/test/golden-test-cases/generic-lens.nix.golden b/test/golden-test-cases/generic-lens.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/generic-lens.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, criterion, deepseq, doctest, fetchurl
+, inspection-testing, lens, profunctors, QuickCheck, tagged
+}:
+mkDerivation {
+  pname = "generic-lens";
+  version = "0.5.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base profunctors tagged ];
+  testHaskellDepends = [ base doctest inspection-testing lens ];
+  benchmarkHaskellDepends = [
+    base criterion deepseq lens QuickCheck
+  ];
+  homepage = "https://github.com/kcsongor/generic-lens";
+  description = "Generic data-structure operations exposed as lenses";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/genvalidity-aeson.cabal b/test/golden-test-cases/genvalidity-aeson.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-aeson.cabal
@@ -0,0 +1,51 @@
+name: genvalidity-aeson
+version: 0.1.0.0
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: Copyright: (c) 2017 Tom Sydney Kerckhove
+maintainer: syd.kerckhove@gmail.com
+homepage: https://github.com/NorfairKing/validity#readme
+synopsis: GenValidity support for aeson
+description:
+    Please see README.md
+category: Testing
+author: Tom Sydney Kerckhove
+
+source-repository head
+    type: git
+    location: https://github.com/NorfairKing/validity
+
+library
+    exposed-modules:
+        Data.GenValidity.Aeson
+    build-depends:
+        base <5,
+        QuickCheck -any,
+        genvalidity >=0.4 && <0.5,
+        validity >=0.4 && <0.5,
+        validity-aeson >=0.1 && <0.2,
+        genvalidity-text >=0.4 && <0.5,
+        genvalidity-vector >=0.1 && <0.2,
+        genvalidity-unordered-containers >=0.1 && <0.2,
+        genvalidity-scientific >=0.1 && <0.2,
+        aeson -any
+    default-language: Haskell2010
+    hs-source-dirs: src
+
+test-suite genvalidity-aeson-test
+    type: exitcode-stdio-1.0
+    main-is: Spec.hs
+    build-depends:
+        base >=4.9 && <=5,
+        genvalidity -any,
+        genvalidity-hspec -any,
+        genvalidity-aeson -any,
+        hspec >=2.2 && <2.5,
+        aeson -any
+    default-language: Haskell2010
+    hs-source-dirs: test/
+    other-modules:
+        Test.Validity.AesonSpec
+    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
diff --git a/test/golden-test-cases/genvalidity-aeson.nix.golden b/test/golden-test-cases/genvalidity-aeson.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-aeson.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, aeson, base, fetchurl, genvalidity
+, genvalidity-hspec, genvalidity-scientific, genvalidity-text
+, genvalidity-unordered-containers, genvalidity-vector, hspec
+, QuickCheck, validity, validity-aeson
+}:
+mkDerivation {
+  pname = "genvalidity-aeson";
+  version = "0.1.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base genvalidity genvalidity-scientific genvalidity-text
+    genvalidity-unordered-containers genvalidity-vector QuickCheck
+    validity validity-aeson
+  ];
+  testHaskellDepends = [
+    aeson base genvalidity genvalidity-hspec hspec
+  ];
+  homepage = "https://github.com/NorfairKing/validity#readme";
+  description = "GenValidity support for aeson";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/genvalidity-hspec-aeson.cabal b/test/golden-test-cases/genvalidity-hspec-aeson.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-hspec-aeson.cabal
@@ -0,0 +1,63 @@
+name: genvalidity-hspec-aeson
+version: 0.1.0.1
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: Copyright: (c) 2016 Tom Sydney Kerckhove
+maintainer: syd.kerckhove@gmail.com
+homepage: http://cs-syd.eu
+synopsis: Standard spec's for aeson-related instances
+description:
+    Standard spec's for aeson-related Instances
+category: Testing
+author: Tom Sydney Kerckhove
+
+source-repository head
+    type: git
+    location: https://github.com/NorfairKing/validity
+
+library
+    exposed-modules:
+        Test.Validity.Aeson
+    build-depends:
+        base >=4.9 && <=5,
+        genvalidity-hspec >=0.5 && <0.6,
+        genvalidity >=0.4 && <0.5,
+        hspec -any,
+        aeson >=0.11 && <1.3,
+        QuickCheck -any,
+        deepseq >=1.4 && <1.5,
+        bytestring -any
+    default-language: Haskell2010
+    hs-source-dirs: src/
+    ghc-options: -Wall
+
+test-suite genvalidity-hspec-aeson-doctests
+    type: exitcode-stdio-1.0
+    main-is: DocTest.hs
+    build-depends:
+        base -any,
+        doctest >=0.11 && <0.12,
+        genvalidity-hspec-aeson -any
+    default-language: Haskell2010
+    hs-source-dirs: test
+    ghc-options: -threaded
+test-suite genvalidity-hspec-aeson-test
+    type: exitcode-stdio-1.0
+    main-is: Spec.hs
+    build-depends:
+        aeson -any,
+        base -any,
+        genvalidity -any,
+        genvalidity-aeson -any,
+        genvalidity-hspec -any,
+        genvalidity-hspec-aeson -any,
+        genvalidity-text -any,
+        hspec -any,
+        text -any
+    default-language: Haskell2010
+    hs-source-dirs: test/
+    other-modules:
+        Test.Validity.AesonSpec
+    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
diff --git a/test/golden-test-cases/genvalidity-hspec-aeson.nix.golden b/test/golden-test-cases/genvalidity-hspec-aeson.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-hspec-aeson.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, aeson, base, bytestring, deepseq, doctest, fetchurl
+, genvalidity, genvalidity-aeson, genvalidity-hspec
+, genvalidity-text, hspec, QuickCheck, text
+}:
+mkDerivation {
+  pname = "genvalidity-hspec-aeson";
+  version = "0.1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bytestring deepseq genvalidity genvalidity-hspec hspec
+    QuickCheck
+  ];
+  testHaskellDepends = [
+    aeson base doctest genvalidity genvalidity-aeson genvalidity-hspec
+    genvalidity-text hspec text
+  ];
+  homepage = "http://cs-syd.eu";
+  description = "Standard spec's for aeson-related instances";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/genvalidity-hspec-binary.cabal b/test/golden-test-cases/genvalidity-hspec-binary.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-hspec-binary.cabal
@@ -0,0 +1,59 @@
+name: genvalidity-hspec-binary
+version: 0.1.0.0
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: 2017 Tom Sydney Kerckhove
+maintainer: syd.kerckhove@gmail.com
+homepage: https://github.com/NorfairKing/validity#readme
+synopsis: Standard spec's for binary-related Instances
+description:
+    Standard spec's for cereal-related Instances, see https://hackage.haskell.org/package/binary.
+category: Testing
+author: Nick Van den Broeck
+extra-source-files:
+    README.md
+
+source-repository head
+    type: git
+    location: https://github.com/NorfairKing/validity
+
+library
+    exposed-modules:
+        Test.Validity.Binary
+    build-depends:
+        base >=4.9 && <=5,
+        QuickCheck -any,
+        binary >=0.5 && <0.9,
+        deepseq >=1.4 && <1.5,
+        genvalidity >=0.4 && <0.5,
+        genvalidity-hspec >=0.5 && <0.6,
+        hspec -any
+    default-language: Haskell2010
+    hs-source-dirs: src/
+    ghc-options: -Wall
+
+test-suite genvalidity-hspec-binary-doctests
+    type: exitcode-stdio-1.0
+    main-is: DocTest.hs
+    build-depends:
+        base -any,
+        doctest >=0.11 && <0.12,
+        genvalidity-hspec-binary -any
+    default-language: Haskell2010
+    hs-source-dirs: test
+    ghc-options: -threaded
+test-suite genvalidity-hspec-binary-test
+    type: exitcode-stdio-1.0
+    main-is: Spec.hs
+    build-depends:
+        base -any,
+        genvalidity -any,
+        genvalidity-hspec-binary -any,
+        hspec -any
+    default-language: Haskell2010
+    hs-source-dirs: test/
+    other-modules:
+        Test.Validity.BinarySpec
+    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
diff --git a/test/golden-test-cases/genvalidity-hspec-binary.nix.golden b/test/golden-test-cases/genvalidity-hspec-binary.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-hspec-binary.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, binary, deepseq, doctest, fetchurl
+, genvalidity, genvalidity-hspec, hspec, QuickCheck
+}:
+mkDerivation {
+  pname = "genvalidity-hspec-binary";
+  version = "0.1.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base binary deepseq genvalidity genvalidity-hspec hspec QuickCheck
+  ];
+  testHaskellDepends = [ base doctest genvalidity hspec ];
+  homepage = "https://github.com/NorfairKing/validity#readme";
+  description = "Standard spec's for binary-related Instances";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/genvalidity-scientific.cabal b/test/golden-test-cases/genvalidity-scientific.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-scientific.cabal
@@ -0,0 +1,48 @@
+name: genvalidity-scientific
+version: 0.1.0.0
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: Copyright: (c) 2017 Tom Sydney Kerckhove
+maintainer: syd.kerckhove@gmail.com
+homepage: https://github.com/NorfairKing/validity#readme
+synopsis: GenValidity support for Scientific
+description:
+    Please see README.md
+category: Testing
+author: Tom Sydney Kerckhove
+
+source-repository head
+    type: git
+    location: https://github.com/NorfairKing/validity
+
+library
+    exposed-modules:
+        Data.GenValidity.Scientific
+    build-depends:
+        base >=4.7 && <5,
+        QuickCheck -any,
+        genvalidity >=0.4 && <0.5,
+        scientific -any,
+        validity >=0.4 && <0.5,
+        validity-scientific >=0.1 && <0.2
+    default-language: Haskell2010
+    hs-source-dirs: src
+
+test-suite genvalidity-scientific-test
+    type: exitcode-stdio-1.0
+    main-is: Spec.hs
+    build-depends:
+        base -any,
+        QuickCheck -any,
+        genvalidity -any,
+        genvalidity-hspec -any,
+        genvalidity-scientific -any,
+        hspec -any,
+        scientific -any
+    default-language: Haskell2010
+    hs-source-dirs: test
+    other-modules:
+        Data.GenValidity.ScientificSpec
+    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -fno-warn-name-shadowing
diff --git a/test/golden-test-cases/genvalidity-scientific.nix.golden b/test/golden-test-cases/genvalidity-scientific.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-scientific.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, fetchurl, genvalidity, genvalidity-hspec
+, hspec, QuickCheck, scientific, validity, validity-scientific
+}:
+mkDerivation {
+  pname = "genvalidity-scientific";
+  version = "0.1.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base genvalidity QuickCheck scientific validity validity-scientific
+  ];
+  testHaskellDepends = [
+    base genvalidity genvalidity-hspec hspec QuickCheck scientific
+  ];
+  homepage = "https://github.com/NorfairKing/validity#readme";
+  description = "GenValidity support for Scientific";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/genvalidity-uuid.cabal b/test/golden-test-cases/genvalidity-uuid.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-uuid.cabal
@@ -0,0 +1,48 @@
+name: genvalidity-uuid
+version: 0.0.0.0
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: Copyright: (c) 2017 Tom Sydney Kerckhove
+maintainer: syd.kerckhove@gmail.com
+homepage: https://github.com/NorfairKing/validity#readme
+synopsis: GenValidity support for UUID
+description:
+    Please see README.md
+category: Testing
+author: Tom Sydney Kerckhove
+
+source-repository head
+    type: git
+    location: https://github.com/NorfairKing/validity
+
+library
+    exposed-modules:
+        Data.GenValidity.UUID
+    build-depends:
+        base >=4.7 && <5,
+        QuickCheck -any,
+        genvalidity >=0.4 && <0.5,
+        uuid -any,
+        validity >= 0.4 && <0.5,
+        validity-uuid >= 0.0 && <0.1
+    default-language: Haskell2010
+    hs-source-dirs: src
+
+test-suite genvalidity-uuid-test
+    type: exitcode-stdio-1.0
+    main-is: Spec.hs
+    build-depends:
+        base -any,
+        QuickCheck -any,
+        genvalidity -any,
+        genvalidity-hspec -any,
+        genvalidity-uuid -any,
+        hspec -any,
+        uuid -any
+    default-language: Haskell2010
+    hs-source-dirs: test
+    other-modules:
+        Data.GenValidity.UUIDSpec
+    ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -fno-warn-name-shadowing
diff --git a/test/golden-test-cases/genvalidity-uuid.nix.golden b/test/golden-test-cases/genvalidity-uuid.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/genvalidity-uuid.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, fetchurl, genvalidity, genvalidity-hspec
+, hspec, QuickCheck, uuid, validity, validity-uuid
+}:
+mkDerivation {
+  pname = "genvalidity-uuid";
+  version = "0.0.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base genvalidity QuickCheck uuid validity validity-uuid
+  ];
+  testHaskellDepends = [
+    base genvalidity genvalidity-hspec hspec QuickCheck uuid
+  ];
+  homepage = "https://github.com/NorfairKing/validity#readme";
+  description = "GenValidity support for UUID";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/ghc-syb-utils.cabal b/test/golden-test-cases/ghc-syb-utils.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ghc-syb-utils.cabal
@@ -0,0 +1,51 @@
+name:            ghc-syb-utils
+version:         0.2.3.3
+license:         BSD3
+license-file:    LICENSE
+author:          Claus Reinke
+copyright:       (c) Claus Reinke 2008
+maintainer:      Thomas Schilling <nominolo@googlemail.com>
+homepage:        http://github.com/nominolo/ghc-syb
+description:     Scrap Your Boilerplate utilities for the GHC API.
+synopsis:        Scrap Your Boilerplate utilities for the GHC API.
+category:        Development
+stability:       provisional
+build-type:      Simple
+cabal-version:   >= 1.10
+tested-with:     GHC ==7.8.3, GHC ==7.10.0
+
+extra-source-files: test/test-cases/*.hs
+
+library
+  build-depends:   base >= 4 && < 5
+                 , syb >= 0.1.0
+
+  if impl(ghc >= 7.0)
+    build-depends:
+      ghc
+  else
+    build-depends:
+      ghc >= 6.10,
+      ghc-syb == 0.2.*
+
+  hs-source-dirs:  .
+  default-language: Haskell2010
+  default-extensions: Rank2Types, CPP
+  ghc-options:    -Wall
+
+  exposed-modules: GHC.SYB.Utils
+
+
+
+test-suite regression-tests
+  type: exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is: Regression.hs
+  default-language: Haskell2010
+  build-depends:
+                base,
+                directory,
+                filepath,
+                ghc,
+                ghc-paths,
+                ghc-syb-utils
diff --git a/test/golden-test-cases/ghc-syb-utils.nix.golden b/test/golden-test-cases/ghc-syb-utils.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ghc-syb-utils.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, directory, fetchurl, filepath, ghc, ghc-paths
+, syb
+}:
+mkDerivation {
+  pname = "ghc-syb-utils";
+  version = "0.2.3.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ghc syb ];
+  testHaskellDepends = [ base directory filepath ghc ghc-paths ];
+  homepage = "http://github.com/nominolo/ghc-syb";
+  description = "Scrap Your Boilerplate utilities for the GHC API";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/ghcid.cabal b/test/golden-test-cases/ghcid.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ghcid.cabal
@@ -0,0 +1,117 @@
+cabal-version:      >= 1.18
+build-type:         Simple
+name:               ghcid
+version:            0.6.8
+license:            BSD3
+license-file:       LICENSE
+category:           Development
+author:             Neil Mitchell <ndmitchell@gmail.com>, jpmoresmau
+maintainer:         Neil Mitchell <ndmitchell@gmail.com>
+copyright:          Neil Mitchell 2014-2017
+synopsis:           GHCi based bare bones IDE
+description:
+    Either \"GHCi as a daemon\" or \"GHC + a bit of an IDE\". A very simple Haskell development tool which shows you the errors in your project and updates them whenever you save. Run @ghcid --topmost --command=ghci@, where @--topmost@ makes the window on top of all others (Windows only) and @--command@ is the command to start GHCi on your project (defaults to @ghci@ if you have a @.ghci@ file, or else to @cabal repl@).
+homepage:           https://github.com/ndmitchell/ghcid#readme
+bug-reports:        https://github.com/ndmitchell/ghcid/issues
+tested-with:        GHC==8.2.1, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
+extra-doc-files:
+    CHANGES.txt
+    README.md
+
+source-repository head
+    type:     git
+    location: https://github.com/ndmitchell/ghcid.git
+
+library
+    hs-source-dirs:  src
+    default-language: Haskell2010
+    build-depends:
+        base >= 4,
+        filepath,
+        time,
+        directory,
+        extra >= 1.2,
+        process >= 1.1,
+        cmdargs >= 0.10
+    if os(windows)
+        build-depends: Win32
+    else
+        build-depends: unix
+
+    exposed-modules:
+        Language.Haskell.Ghcid
+    other-modules:
+        Paths_ghcid
+        Language.Haskell.Ghcid.Types
+        Language.Haskell.Ghcid.Parser
+        Language.Haskell.Ghcid.Util
+
+executable ghcid
+    hs-source-dirs: src
+    default-language: Haskell2010
+    ghc-options: -main-is Ghcid.main -threaded
+    main-is: Ghcid.hs
+    build-depends:
+        base == 4.*,
+        filepath,
+        time,
+        directory,
+        containers,
+        fsnotify,
+        extra >= 1.2,
+        process >= 1.1,
+        cmdargs >= 0.10,
+        ansi-terminal,
+        terminal-size >= 0.3
+    if os(windows)
+        build-depends: Win32
+    else
+        build-depends: unix
+    other-modules:
+        Language.Haskell.Ghcid.Types
+        Language.Haskell.Ghcid.Parser
+        Language.Haskell.Ghcid.Terminal
+        Language.Haskell.Ghcid.Util
+        Language.Haskell.Ghcid
+        Paths_ghcid
+        Session
+        Wait
+
+test-suite ghcid_test
+    type:            exitcode-stdio-1.0
+    hs-source-dirs:  src
+    main-is:         Test.hs
+    ghc-options:     -rtsopts -main-is Test.main -threaded -with-rtsopts=-K1K
+    default-language: Haskell2010
+    build-depends:
+        base >= 4,
+        filepath,
+        time,
+        directory,
+        process,
+        containers,
+        fsnotify,
+        extra >= 1.2,
+        ansi-terminal,
+        terminal-size >= 0.3,
+        cmdargs,
+        tasty,
+        tasty-hunit
+    if os(windows)
+        build-depends: Win32
+    else
+        build-depends: unix
+    other-modules:
+        Ghcid
+        Language.Haskell.Ghcid
+        Language.Haskell.Ghcid.Parser
+        Language.Haskell.Ghcid.Terminal
+        Language.Haskell.Ghcid.Types
+        Language.Haskell.Ghcid.Util
+        Paths_ghcid
+        Session
+        Test.API
+        Test.Ghcid
+        Test.Parser
+        Test.Util
+        Wait
diff --git a/test/golden-test-cases/ghcid.nix.golden b/test/golden-test-cases/ghcid.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ghcid.nix.golden
@@ -0,0 +1,28 @@
+{ mkDerivation, ansi-terminal, base, cmdargs, containers, directory
+, extra, fetchurl, filepath, fsnotify, process, tasty, tasty-hunit
+, terminal-size, time, unix
+}:
+mkDerivation {
+  pname = "ghcid";
+  version = "0.6.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base cmdargs directory extra filepath process time unix
+  ];
+  executableHaskellDepends = [
+    ansi-terminal base cmdargs containers directory extra filepath
+    fsnotify process terminal-size time unix
+  ];
+  testHaskellDepends = [
+    ansi-terminal base cmdargs containers directory extra filepath
+    fsnotify process tasty tasty-hunit terminal-size time unix
+  ];
+  homepage = "https://github.com/ndmitchell/ghcid#readme";
+  description = "GHCi based bare bones IDE";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/giphy-api.cabal b/test/golden-test-cases/giphy-api.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/giphy-api.cabal
@@ -0,0 +1,94 @@
+-- This file has been generated from package.yaml by hpack version 0.15.0.
+--
+-- see: https://github.com/sol/hpack
+
+name:           giphy-api
+version:        0.5.2.0
+synopsis:       Giphy HTTP API wrapper and CLI search tool.
+description:    Please see README.md
+category:       Web
+homepage:       http://github.com/passy/giphy-api#readme
+author:         Pascal Hartig
+maintainer:     Pascal Hartig <phartig@rdrei.net>
+license:        BSD3
+license-file:   LICENSE
+build-type:     Simple
+cabal-version:  >= 1.10
+
+extra-source-files:
+    changelog.md
+    README.md
+    stack.yaml
+    test/fixtures/random_response.json
+    test/fixtures/search_response.json
+    test/fixtures/translate_response.json
+
+flag buildSample
+  description: Build the sample application.
+  manual: True
+  default: False
+
+library
+  hs-source-dirs:
+      src
+  ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-monomorphism-restriction -fwarn-unused-do-bind
+  build-depends:
+      base >= 4.7 && < 5
+    , text
+    , network-uri
+    , aeson
+    , containers
+    , microlens
+    , microlens-th
+    , mtl
+    , servant >= 0.9
+    , servant-client >= 0.9
+    , transformers
+    , http-api-data
+    , http-client
+    , http-client-tls
+  exposed-modules:
+      Web.Giphy
+  other-modules:
+      Paths_giphy_api
+  default-language: Haskell2010
+
+executable giphy-search
+  main-is: Main.hs
+  hs-source-dirs:
+      app
+  ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-monomorphism-restriction -fwarn-unused-do-bind -threaded -rtsopts -with-rtsopts=-N
+  build-depends:
+      base >= 4.7 && < 5
+    , text
+    , network-uri
+  if flag(buildSample)
+    build-depends:
+        giphy-api
+      , lens
+      , optparse-applicative
+  else
+    buildable: False
+  other-modules:
+      Sample
+  default-language: Haskell2010
+
+test-suite spec
+  type: exitcode-stdio-1.0
+  main-is: Spec.hs
+  hs-source-dirs:
+      test
+  ghc-options: -Wall -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-monomorphism-restriction -fwarn-unused-do-bind -threaded -rtsopts -with-rtsopts=-N
+  build-depends:
+      base >= 4.7 && < 5
+    , text
+    , network-uri
+    , giphy-api
+    , aeson
+    , basic-prelude
+    , bytestring
+    , containers
+    , directory
+    , hspec
+    , lens
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/giphy-api.nix.golden b/test/golden-test-cases/giphy-api.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/giphy-api.nix.golden
@@ -0,0 +1,28 @@
+{ mkDerivation, aeson, base, basic-prelude, bytestring, containers
+, directory, fetchurl, hspec, http-api-data, http-client
+, http-client-tls, lens, microlens, microlens-th, mtl, network-uri
+, servant, servant-client, text, transformers
+}:
+mkDerivation {
+  pname = "giphy-api";
+  version = "0.5.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base containers http-api-data http-client http-client-tls
+    microlens microlens-th mtl network-uri servant servant-client text
+    transformers
+  ];
+  executableHaskellDepends = [ base network-uri text ];
+  testHaskellDepends = [
+    aeson base basic-prelude bytestring containers directory hspec lens
+    network-uri text
+  ];
+  homepage = "http://github.com/passy/giphy-api#readme";
+  description = "Giphy HTTP API wrapper and CLI search tool";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/github.cabal b/test/golden-test-cases/github.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/github.cabal
@@ -0,0 +1,202 @@
+name:                github
+version:             0.18
+synopsis:            Access to the GitHub API, v3.
+description:
+  The GitHub API provides programmatic access to the full
+  GitHub Web site, from Issues to Gists to repos down to the underlying git data
+  like references and trees. This library wraps all of that, exposing a basic but
+  Haskell-friendly set of functions and data structures.
+  .
+  For supported endpoints see "GitHub" module.
+  .
+  > import qualified GitHub as GH
+  >
+  > main :: IO ()
+  > main = do
+  >     possibleUser <- GH.executeRequest' $ GH.userInfoR "phadej"
+  >     print possibleUser
+  .
+  For more of an overview please see the README: <https://github.com/phadej/github/blob/master/README.md>
+license:             BSD3
+license-file:        LICENSE
+author:              Mike Burns, John Wiegley, Oleg Grenrus
+maintainer:          Oleg Grenrus <oleg.grenrus@iki.fi>
+homepage:            https://github.com/phadej/github
+copyright:           Copyright 2012-2013 Mike Burns, Copyright 2013-2015 John Wiegley, Copyright 2016 Oleg Grenrus
+category:            Network
+build-type:          Simple
+tested-with:         GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
+cabal-version:       >=1.10
+extra-source-files:
+  README.md,
+  CHANGELOG.md,
+  fixtures/issue-search.json,
+  fixtures/list-teams.json,
+  fixtures/members-list.json,
+  fixtures/pull-request-opened.json,
+  fixtures/pull-request-review-requested.json,
+  fixtures/user-organizations.json,
+  fixtures/user.json
+
+flag aeson-compat
+  description: Whether to use aeson-compat or aeson-extra
+  default: True
+  manual: False
+
+source-repository head
+  type: git
+  location: git://github.com/phadej/github.git
+
+Library
+  default-language: Haskell2010
+  ghc-options: -Wall
+  hs-source-dirs: src
+  default-extensions:
+    DataKinds
+    DeriveDataTypeable
+    DeriveGeneric
+    OverloadedStrings
+    ScopedTypeVariables
+  other-extensions:
+    CPP
+    FlexibleContexts
+    FlexibleInstances
+    GADTs
+    KindSignatures
+    StandaloneDeriving
+  exposed-modules:
+    GitHub
+    GitHub.Internal.Prelude
+    GitHub.Auth
+    GitHub.Data
+    GitHub.Data.Activities
+    GitHub.Data.Comments
+    GitHub.Data.Content
+    GitHub.Data.Definitions
+    GitHub.Data.DeployKeys
+    GitHub.Data.Events
+    GitHub.Data.Gists
+    GitHub.Data.GitData
+    GitHub.Data.Id
+    GitHub.Data.Issues
+    GitHub.Data.Milestone
+    GitHub.Data.Name
+    GitHub.Data.Options
+    GitHub.Data.PullRequests
+    GitHub.Data.Releases
+    GitHub.Data.Repos
+    GitHub.Data.Request
+    GitHub.Data.Reviews
+    GitHub.Data.Search
+    GitHub.Data.Statuses
+    GitHub.Data.Teams
+    GitHub.Data.URL
+    GitHub.Data.Webhooks
+    GitHub.Data.Webhooks.Validate
+    GitHub.Endpoints.Activity.Events
+    GitHub.Endpoints.Activity.Starring
+    GitHub.Endpoints.Activity.Watching
+    GitHub.Endpoints.Gists
+    GitHub.Endpoints.Gists.Comments
+    GitHub.Endpoints.GitData.Blobs
+    GitHub.Endpoints.GitData.Commits
+    GitHub.Endpoints.GitData.References
+    GitHub.Endpoints.GitData.Trees
+    GitHub.Endpoints.Issues
+    GitHub.Endpoints.Issues.Comments
+    GitHub.Endpoints.Issues.Events
+    GitHub.Endpoints.Issues.Labels
+    GitHub.Endpoints.Issues.Milestones
+    GitHub.Endpoints.Organizations
+    GitHub.Endpoints.Organizations.Members
+    GitHub.Endpoints.Organizations.Teams
+    GitHub.Endpoints.PullRequests
+    GitHub.Endpoints.PullRequests.Reviews
+    GitHub.Endpoints.PullRequests.Comments
+    GitHub.Endpoints.Repos
+    GitHub.Endpoints.Repos.Collaborators
+    GitHub.Endpoints.Repos.Comments
+    GitHub.Endpoints.Repos.Commits
+    GitHub.Endpoints.Repos.Contents
+    GitHub.Endpoints.Repos.DeployKeys
+    GitHub.Endpoints.Repos.Forks
+    GitHub.Endpoints.Repos.Releases
+    GitHub.Endpoints.Repos.Statuses
+    GitHub.Endpoints.Repos.Webhooks
+    GitHub.Endpoints.Search
+    GitHub.Endpoints.Users
+    GitHub.Endpoints.Users.Followers
+    GitHub.Request
+
+  -- Packages needed in order to build this package.
+  build-depends: base                  >=4.7       && <4.11,
+                 aeson                 >=0.7.0.6   && <1.3,
+                 base-compat           >=0.9.1     && <0.10,
+                 base16-bytestring     >=0.1.1.6   && <0.2,
+                 binary                >=0.7.1.0   && <0.10,
+                 binary-orphans        >=0.1.0.0   && <0.2,
+                 byteable              >=0.1.1     && <0.2,
+                 bytestring            >=0.10.4.0  && <0.11,
+                 containers            >=0.5.5.1   && <0.6,
+                 cryptohash            >=0.11      && <0.12,
+                 deepseq               >=1.3.0.2   && <1.5,
+                 deepseq-generics      >=0.1.1.2   && <0.3,
+                 exceptions            >=0.8.0.2   && <0.9,
+                 hashable              >=1.2.3.3   && <1.3,
+                 http-client           >=0.4.8.1   && <0.6,
+                 http-client-tls       >=0.2.2     && <0.4,
+                 http-link-header      >=1.0.1     && <1.1,
+                 http-types            >=0.8.6     && <0.11,
+                 iso8601-time          >=0.1.4     && <0.2,
+                 mtl                   >=2.1.3.1   && <2.3,
+                 network-uri           >=2.6.0.3   && <2.7,
+                 semigroups            >=0.16.2.2  && <0.19,
+                 text                  >=1.2.0.6   && <1.3,
+                 time                  >=1.4       && <1.9,
+                 transformers          >=0.3.0.0   && <0.6,
+                 transformers-compat   >=0.4.0.3   && <0.6,
+                 unordered-containers  >=0.2       && <0.3,
+                 vector                >=0.10.12.3 && <0.13,
+                 vector-instances      >=3.3.0.1   && <3.5,
+
+                 tls                   >=1.3.5
+
+  if flag(aeson-compat)
+    build-depends: aeson-compat >=0.3.0.0 && <0.4
+  else
+    build-depends: aeson-extra  >=0.2.0.0 && <0.3
+
+test-suite github-test
+  default-language: Haskell2010
+  type: exitcode-stdio-1.0
+  hs-source-dirs: spec
+  other-extensions:
+    TemplateHaskell
+  other-modules:
+    GitHub.ActivitySpec
+    GitHub.CommitsSpec
+    GitHub.OrganizationsSpec
+    GitHub.IssuesSpec
+    GitHub.PullRequestsSpec
+    GitHub.PullRequestReviewsSpec
+    GitHub.ReleasesSpec
+    GitHub.ReposSpec
+    GitHub.SearchSpec
+    GitHub.UsersSpec
+    GitHub.EventsSpec
+  main-is: Spec.hs
+  ghc-options: -Wall
+  build-tool-depends: hspec-discover:hspec-discover
+  build-depends: base,
+                 base-compat,
+                 bytestring,
+                 github,
+                 vector,
+                 unordered-containers,
+                 file-embed,
+                 hspec
+  if flag(aeson-compat)
+    build-depends: aeson-compat
+  else
+    build-depends: aeson-extra
+
diff --git a/test/golden-test-cases/github.nix.golden b/test/golden-test-cases/github.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/github.nix.golden
@@ -0,0 +1,33 @@
+{ mkDerivation, aeson, aeson-compat, base, base-compat
+, base16-bytestring, binary, binary-orphans, byteable, bytestring
+, containers, cryptohash, deepseq, deepseq-generics, exceptions
+, fetchurl, file-embed, hashable, hspec, hspec-discover
+, http-client, http-client-tls, http-link-header, http-types
+, iso8601-time, mtl, network-uri, semigroups, text, time, tls
+, transformers, transformers-compat, unordered-containers, vector
+, vector-instances
+}:
+mkDerivation {
+  pname = "github";
+  version = "0.18";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson aeson-compat base base-compat base16-bytestring binary
+    binary-orphans byteable bytestring containers cryptohash deepseq
+    deepseq-generics exceptions hashable http-client http-client-tls
+    http-link-header http-types iso8601-time mtl network-uri semigroups
+    text time tls transformers transformers-compat unordered-containers
+    vector vector-instances
+  ];
+  testHaskellDepends = [
+    aeson-compat base base-compat bytestring file-embed hspec
+    unordered-containers vector
+  ];
+  testToolDepends = [ hspec-discover ];
+  homepage = "https://github.com/phadej/github";
+  description = "Access to the GitHub API, v3";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/gl.cabal b/test/golden-test-cases/gl.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gl.cabal
@@ -0,0 +1,917 @@
+name:          gl
+version:       0.8.0
+synopsis:      Complete OpenGL raw bindings
+description:   Complete OpenGL raw bindings
+license:       BSD3
+license-file:  LICENSE
+author:        Edward A. Kmett, Gabríel Arthúr Pétursson, Sven Panne
+maintainer:    ekmett@gmail.com
+copyright:     Copyright © 2014-2017 Edward A. Kmett,
+               Copyright © 2014-2017 Gabríel Arthúr Pétursson,
+               Copyright © 2013 Sven Panne
+category:      Graphics
+build-type:    Custom
+cabal-version: >=1.24
+extra-source-files:
+  gl.xml man.txt extensions.txt
+  CHANGELOG.markdown README.markdown TODO.markdown
+  Generator.hs Module.hs Parser.hs Registry.hs Utils.hs
+
+source-repository head
+  type:     git
+  location: https://github.com/ekmett/gl
+
+custom-setup
+  setup-depends:
+      base == 4.*
+    , Cabal >= 1.24
+    , directory >= 1.2 && <= 1.4
+    , filepath >= 1.3 && < 1.5
+    , hxt == 9.3.*
+    , transformers >= 0.2 && < 0.6
+    , containers == 0.5.*
+
+flag UseNativeWindowsLibraries
+   description:
+      When compiling under Windows, use the native libraries instead of e.g. the
+      ones coming with Cygwin.
+
+flag UseGlXGetProcAddress
+   description:
+      Use glXGetProcAddress instead of dlsym on non-Windows/-Darwin platforms.
+
+library
+  hs-source-dirs: src
+  c-sources: cbits/gl.c
+  ghc-options: -Wall -O2
+
+  build-depends:
+      base == 4.*
+    , containers == 0.5.*
+    , fixed >= 0.2.1 && < 0.3
+    , half >= 0.2 && < 0.3
+    , transformers >= 0.2 && < 0.6
+
+  -- for Setup.hs
+  build-depends:
+
+  default-language: Haskell2010
+
+  if impl(ghc >= 8)
+    ghc-options: -Wno-missing-pattern-synonym-signatures
+
+  if os(windows) && flag(UseNativeWindowsLibraries)
+    if arch(i386)
+      cpp-options: "-DCALLCONV=stdcall"
+    else
+      cpp-options: "-DCALLCONV=ccall"
+    cc-options: "-DUSE_WGLGETPROCADDRESS"
+    extra-libraries: opengl32
+  else
+    cpp-options: "-DCALLCONV=ccall"
+    if !os(darwin) && !os(ios) && flag(UseGlXGetProcAddress)
+      cc-options: "-DUSE_GLXGETPROCADDRESS"
+    else
+      cc-options: "-DUSE_DLSYM"
+    if os(darwin)
+      frameworks: OpenGL
+    else
+      if os(ios)
+        frameworks: OpenGLES
+      else
+        extra-libraries: GL
+
+  exposed-modules:
+    Graphics.GL
+    Graphics.GL.Compatibility32
+    Graphics.GL.Compatibility33
+    Graphics.GL.Compatibility40
+    Graphics.GL.Compatibility41
+    Graphics.GL.Compatibility42
+    Graphics.GL.Compatibility43
+    Graphics.GL.Compatibility44
+    Graphics.GL.Compatibility45
+    Graphics.GL.Core32
+    Graphics.GL.Core33
+    Graphics.GL.Core40
+    Graphics.GL.Core41
+    Graphics.GL.Core42
+    Graphics.GL.Core43
+    Graphics.GL.Core44
+    Graphics.GL.Core45
+    Graphics.GL.Embedded20
+    Graphics.GL.Embedded30
+    Graphics.GL.Embedded31
+    Graphics.GL.Embedded32
+    Graphics.GL.EmbeddedCommon11
+    Graphics.GL.EmbeddedLite11
+    Graphics.GL.Ext
+    Graphics.GL.Ext.AMD
+    Graphics.GL.Ext.AMD.BlendMinmaxFactor
+    Graphics.GL.Ext.AMD.Compressed3DCTexture
+    Graphics.GL.Ext.AMD.CompressedATCTexture
+    Graphics.GL.Ext.AMD.ConservativeDepth
+    Graphics.GL.Ext.AMD.DebugOutput
+    Graphics.GL.Ext.AMD.DepthClampSeparate
+    Graphics.GL.Ext.AMD.DrawBuffersBlend
+    Graphics.GL.Ext.AMD.FramebufferSamplePositions
+    Graphics.GL.Ext.AMD.GcnShader
+    Graphics.GL.Ext.AMD.GpuShaderHalfFloat
+    Graphics.GL.Ext.AMD.GpuShaderInt64
+    Graphics.GL.Ext.AMD.InterleavedElements
+    Graphics.GL.Ext.AMD.MultiDrawIndirect
+    Graphics.GL.Ext.AMD.NameGenDelete
+    Graphics.GL.Ext.AMD.OcclusionQueryEvent
+    Graphics.GL.Ext.AMD.PerformanceMonitor
+    Graphics.GL.Ext.AMD.PinnedMemory
+    Graphics.GL.Ext.AMD.ProgramBinaryZ400
+    Graphics.GL.Ext.AMD.QueryBufferObject
+    Graphics.GL.Ext.AMD.SamplePositions
+    Graphics.GL.Ext.AMD.SeamlessCubemapPerTexture
+    Graphics.GL.Ext.AMD.ShaderAtomicCounterOps
+    Graphics.GL.Ext.AMD.ShaderBallot
+    Graphics.GL.Ext.AMD.ShaderExplicitVertexParameter
+    Graphics.GL.Ext.AMD.ShaderStencilExport
+    Graphics.GL.Ext.AMD.ShaderTrinaryMinmax
+    Graphics.GL.Ext.AMD.SparseTexture
+    Graphics.GL.Ext.AMD.StencilOperationExtended
+    Graphics.GL.Ext.AMD.TextureTexture4
+    Graphics.GL.Ext.AMD.TransformFeedback3LinesTriangles
+    Graphics.GL.Ext.AMD.TransformFeedback4
+    Graphics.GL.Ext.AMD.VertexShaderLayer
+    Graphics.GL.Ext.AMD.VertexShaderTessellator
+    Graphics.GL.Ext.AMD.VertexShaderViewportIndex
+    Graphics.GL.Ext.ANDROID
+    Graphics.GL.Ext.ANDROID.ExtensionPackEs31a
+    Graphics.GL.Ext.ANGLE
+    Graphics.GL.Ext.ANGLE.DepthTexture
+    Graphics.GL.Ext.ANGLE.FramebufferBlit
+    Graphics.GL.Ext.ANGLE.FramebufferMultisample
+    Graphics.GL.Ext.ANGLE.InstancedArrays
+    Graphics.GL.Ext.ANGLE.PackReverseRowOrder
+    Graphics.GL.Ext.ANGLE.ProgramBinary
+    Graphics.GL.Ext.ANGLE.TextureCompressionDxt3
+    Graphics.GL.Ext.ANGLE.TextureCompressionDxt5
+    Graphics.GL.Ext.ANGLE.TextureUsage
+    Graphics.GL.Ext.ANGLE.TranslatedShaderSource
+    Graphics.GL.Ext.APPLE
+    Graphics.GL.Ext.APPLE.AuxDepthStencil
+    Graphics.GL.Ext.APPLE.ClientStorage
+    Graphics.GL.Ext.APPLE.ClipDistance
+    Graphics.GL.Ext.APPLE.ColorBufferPackedFloat
+    Graphics.GL.Ext.APPLE.CopyTextureLevels
+    Graphics.GL.Ext.APPLE.ElementArray
+    Graphics.GL.Ext.APPLE.Fence
+    Graphics.GL.Ext.APPLE.FloatPixels
+    Graphics.GL.Ext.APPLE.FlushBufferRange
+    Graphics.GL.Ext.APPLE.FramebufferMultisample
+    Graphics.GL.Ext.APPLE.ObjectPurgeable
+    Graphics.GL.Ext.APPLE.Rgb422
+    Graphics.GL.Ext.APPLE.RowBytes
+    Graphics.GL.Ext.APPLE.SpecularVector
+    Graphics.GL.Ext.APPLE.Sync
+    Graphics.GL.Ext.APPLE.Texture2DLimitedNpot
+    Graphics.GL.Ext.APPLE.TextureFormatBGRA8888
+    Graphics.GL.Ext.APPLE.TextureMaxLevel
+    Graphics.GL.Ext.APPLE.TexturePackedFloat
+    Graphics.GL.Ext.APPLE.TextureRange
+    Graphics.GL.Ext.APPLE.TransformHint
+    Graphics.GL.Ext.APPLE.VertexArrayObject
+    Graphics.GL.Ext.APPLE.VertexArrayRange
+    Graphics.GL.Ext.APPLE.VertexProgramEvaluators
+    Graphics.GL.Ext.APPLE.Ycbcr422
+    Graphics.GL.Ext.ARB
+    Graphics.GL.Ext.ARB.ArraysOfArrays
+    Graphics.GL.Ext.ARB.BaseInstance
+    Graphics.GL.Ext.ARB.BindlessTexture
+    Graphics.GL.Ext.ARB.BlendFuncExtended
+    Graphics.GL.Ext.ARB.BufferStorage
+    Graphics.GL.Ext.ARB.ClEvent
+    Graphics.GL.Ext.ARB.ClearBufferObject
+    Graphics.GL.Ext.ARB.ClearTexture
+    Graphics.GL.Ext.ARB.ClipControl
+    Graphics.GL.Ext.ARB.ColorBufferFloat
+    Graphics.GL.Ext.ARB.Compatibility
+    Graphics.GL.Ext.ARB.CompressedTexturePixelStorage
+    Graphics.GL.Ext.ARB.ComputeShader
+    Graphics.GL.Ext.ARB.ComputeVariableGroupSize
+    Graphics.GL.Ext.ARB.ConditionalRenderInverted
+    Graphics.GL.Ext.ARB.ConservativeDepth
+    Graphics.GL.Ext.ARB.CopyBuffer
+    Graphics.GL.Ext.ARB.CopyImage
+    Graphics.GL.Ext.ARB.CullDistance
+    Graphics.GL.Ext.ARB.DebugOutput
+    Graphics.GL.Ext.ARB.DepthBufferFloat
+    Graphics.GL.Ext.ARB.DepthClamp
+    Graphics.GL.Ext.ARB.DepthTexture
+    Graphics.GL.Ext.ARB.DerivativeControl
+    Graphics.GL.Ext.ARB.DirectStateAccess
+    Graphics.GL.Ext.ARB.DrawBuffers
+    Graphics.GL.Ext.ARB.DrawBuffersBlend
+    Graphics.GL.Ext.ARB.DrawElementsBaseVertex
+    Graphics.GL.Ext.ARB.DrawIndirect
+    Graphics.GL.Ext.ARB.DrawInstanced
+    Graphics.GL.Ext.ARB.ES2Compatibility
+    Graphics.GL.Ext.ARB.ES31Compatibility
+    Graphics.GL.Ext.ARB.ES32Compatibility
+    Graphics.GL.Ext.ARB.ES3Compatibility
+    Graphics.GL.Ext.ARB.EnhancedLayouts
+    Graphics.GL.Ext.ARB.ExplicitAttribLocation
+    Graphics.GL.Ext.ARB.ExplicitUniformLocation
+    Graphics.GL.Ext.ARB.FragmentCoordConventions
+    Graphics.GL.Ext.ARB.FragmentLayerViewport
+    Graphics.GL.Ext.ARB.FragmentProgram
+    Graphics.GL.Ext.ARB.FragmentProgramShadow
+    Graphics.GL.Ext.ARB.FragmentShader
+    Graphics.GL.Ext.ARB.FragmentShaderInterlock
+    Graphics.GL.Ext.ARB.FramebufferNoAttachments
+    Graphics.GL.Ext.ARB.FramebufferObject
+    Graphics.GL.Ext.ARB.FramebufferSRGB
+    Graphics.GL.Ext.ARB.GeometryShader4
+    Graphics.GL.Ext.ARB.GetProgramBinary
+    Graphics.GL.Ext.ARB.GetTextureSubImage
+    Graphics.GL.Ext.ARB.GpuShader5
+    Graphics.GL.Ext.ARB.GpuShaderFp64
+    Graphics.GL.Ext.ARB.GpuShaderInt64
+    Graphics.GL.Ext.ARB.HalfFloatPixel
+    Graphics.GL.Ext.ARB.HalfFloatVertex
+    Graphics.GL.Ext.ARB.Imaging
+    Graphics.GL.Ext.ARB.IndirectParameters
+    Graphics.GL.Ext.ARB.InstancedArrays
+    Graphics.GL.Ext.ARB.InternalformatQuery
+    Graphics.GL.Ext.ARB.InternalformatQuery2
+    Graphics.GL.Ext.ARB.InvalidateSubdata
+    Graphics.GL.Ext.ARB.MapBufferAlignment
+    Graphics.GL.Ext.ARB.MapBufferRange
+    Graphics.GL.Ext.ARB.MatrixPalette
+    Graphics.GL.Ext.ARB.MultiBind
+    Graphics.GL.Ext.ARB.MultiDrawIndirect
+    Graphics.GL.Ext.ARB.Multisample
+    Graphics.GL.Ext.ARB.Multitexture
+    Graphics.GL.Ext.ARB.OcclusionQuery
+    Graphics.GL.Ext.ARB.OcclusionQuery2
+    Graphics.GL.Ext.ARB.ParallelShaderCompile
+    Graphics.GL.Ext.ARB.PipelineStatisticsQuery
+    Graphics.GL.Ext.ARB.PixelBufferObject
+    Graphics.GL.Ext.ARB.PointParameters
+    Graphics.GL.Ext.ARB.PointSprite
+    Graphics.GL.Ext.ARB.PostDepthCoverage
+    Graphics.GL.Ext.ARB.ProgramInterfaceQuery
+    Graphics.GL.Ext.ARB.ProvokingVertex
+    Graphics.GL.Ext.ARB.QueryBufferObject
+    Graphics.GL.Ext.ARB.RobustBufferAccessBehavior
+    Graphics.GL.Ext.ARB.Robustness
+    Graphics.GL.Ext.ARB.RobustnessIsolation
+    Graphics.GL.Ext.ARB.SampleLocations
+    Graphics.GL.Ext.ARB.SampleShading
+    Graphics.GL.Ext.ARB.SamplerObjects
+    Graphics.GL.Ext.ARB.SeamlessCubeMap
+    Graphics.GL.Ext.ARB.SeamlessCubemapPerTexture
+    Graphics.GL.Ext.ARB.SeparateShaderObjects
+    Graphics.GL.Ext.ARB.ShaderAtomicCounters
+    Graphics.GL.Ext.ARB.ShaderAtomicCounterOps
+    Graphics.GL.Ext.ARB.ShaderBallot
+    Graphics.GL.Ext.ARB.ShaderBitEncoding
+    Graphics.GL.Ext.ARB.ShaderClock
+    Graphics.GL.Ext.ARB.ShaderDrawParameters
+    Graphics.GL.Ext.ARB.ShaderGroupVote
+    Graphics.GL.Ext.ARB.ShaderImageLoadStore
+    Graphics.GL.Ext.ARB.ShaderImageSize
+    Graphics.GL.Ext.ARB.ShaderObjects
+    Graphics.GL.Ext.ARB.ShaderPrecision
+    Graphics.GL.Ext.ARB.ShaderStencilExport
+    Graphics.GL.Ext.ARB.ShaderStorageBufferObject
+    Graphics.GL.Ext.ARB.ShaderSubroutine
+    Graphics.GL.Ext.ARB.ShaderTextureImageSamples
+    Graphics.GL.Ext.ARB.ShaderTextureLod
+    Graphics.GL.Ext.ARB.ShaderViewportLayerArray
+    Graphics.GL.Ext.ARB.ShadingLanguage100
+    Graphics.GL.Ext.ARB.ShadingLanguage420pack
+    Graphics.GL.Ext.ARB.ShadingLanguageInclude
+    Graphics.GL.Ext.ARB.ShadingLanguagePacking
+    Graphics.GL.Ext.ARB.Shadow
+    Graphics.GL.Ext.ARB.ShadowAmbient
+    Graphics.GL.Ext.ARB.SparseBuffer
+    Graphics.GL.Ext.ARB.SparseTexture
+    Graphics.GL.Ext.ARB.SparseTexture2
+    Graphics.GL.Ext.ARB.SparseTextureClamp
+    Graphics.GL.Ext.ARB.StencilTexturing
+    Graphics.GL.Ext.ARB.Sync
+    Graphics.GL.Ext.ARB.TessellationShader
+    Graphics.GL.Ext.ARB.TextureBarrier
+    Graphics.GL.Ext.ARB.TextureBorderClamp
+    Graphics.GL.Ext.ARB.TextureBufferObject
+    Graphics.GL.Ext.ARB.TextureBufferObjectRgb32
+    Graphics.GL.Ext.ARB.TextureBufferRange
+    Graphics.GL.Ext.ARB.TextureCompression
+    Graphics.GL.Ext.ARB.TextureCompressionBptc
+    Graphics.GL.Ext.ARB.TextureCompressionRgtc
+    Graphics.GL.Ext.ARB.TextureCubeMap
+    Graphics.GL.Ext.ARB.TextureCubeMapArray
+    Graphics.GL.Ext.ARB.TextureEnvAdd
+    Graphics.GL.Ext.ARB.TextureEnvCombine
+    Graphics.GL.Ext.ARB.TextureEnvCrossbar
+    Graphics.GL.Ext.ARB.TextureEnvDot3
+    Graphics.GL.Ext.ARB.TextureFilterMinmax
+    Graphics.GL.Ext.ARB.TextureFloat
+    Graphics.GL.Ext.ARB.TextureGather
+    Graphics.GL.Ext.ARB.TextureMirrorClampToEdge
+    Graphics.GL.Ext.ARB.TextureMirroredRepeat
+    Graphics.GL.Ext.ARB.TextureMultisample
+    Graphics.GL.Ext.ARB.TextureNonPowerOfTwo
+    Graphics.GL.Ext.ARB.TextureQueryLevels
+    Graphics.GL.Ext.ARB.TextureQueryLod
+    Graphics.GL.Ext.ARB.TextureRectangle
+    Graphics.GL.Ext.ARB.TextureRg
+    Graphics.GL.Ext.ARB.TextureRgb10A2ui
+    Graphics.GL.Ext.ARB.TextureStencil8
+    Graphics.GL.Ext.ARB.TextureStorage
+    Graphics.GL.Ext.ARB.TextureStorageMultisample
+    Graphics.GL.Ext.ARB.TextureSwizzle
+    Graphics.GL.Ext.ARB.TextureView
+    Graphics.GL.Ext.ARB.TimerQuery
+    Graphics.GL.Ext.ARB.TransformFeedback2
+    Graphics.GL.Ext.ARB.TransformFeedback3
+    Graphics.GL.Ext.ARB.TransformFeedbackInstanced
+    Graphics.GL.Ext.ARB.TransformFeedbackOverflowQuery
+    Graphics.GL.Ext.ARB.TransposeMatrix
+    Graphics.GL.Ext.ARB.UniformBufferObject
+    Graphics.GL.Ext.ARB.VertexArrayBgra
+    Graphics.GL.Ext.ARB.VertexArrayObject
+    Graphics.GL.Ext.ARB.VertexAttrib64bit
+    Graphics.GL.Ext.ARB.VertexAttribBinding
+    Graphics.GL.Ext.ARB.VertexBlend
+    Graphics.GL.Ext.ARB.VertexBufferObject
+    Graphics.GL.Ext.ARB.VertexProgram
+    Graphics.GL.Ext.ARB.VertexShader
+    Graphics.GL.Ext.ARB.VertexType10f11f11fRev
+    Graphics.GL.Ext.ARB.VertexType2101010Rev
+    Graphics.GL.Ext.ARB.ViewportArray
+    Graphics.GL.Ext.ARB.WindowPos
+    Graphics.GL.Ext.ARM
+    Graphics.GL.Ext.ARM.MaliProgramBinary
+    Graphics.GL.Ext.ARM.MaliShaderBinary
+    Graphics.GL.Ext.ARM.Rgba8
+    Graphics.GL.Ext.ARM.ShaderFramebufferFetch
+    Graphics.GL.Ext.ARM.ShaderFramebufferFetchDepthStencil
+    Graphics.GL.Ext.ATI
+    Graphics.GL.Ext.ATI.DrawBuffers
+    Graphics.GL.Ext.ATI.ElementArray
+    Graphics.GL.Ext.ATI.EnvmapBumpmap
+    Graphics.GL.Ext.ATI.FragmentShader
+    Graphics.GL.Ext.ATI.MapObjectBuffer
+    Graphics.GL.Ext.ATI.Meminfo
+    Graphics.GL.Ext.ATI.PixelFormatFloat
+    Graphics.GL.Ext.ATI.PnTriangles
+    Graphics.GL.Ext.ATI.SeparateStencil
+    Graphics.GL.Ext.ATI.TextFragmentShader
+    Graphics.GL.Ext.ATI.TextureEnvCombine3
+    Graphics.GL.Ext.ATI.TextureFloat
+    Graphics.GL.Ext.ATI.TextureMirrorOnce
+    Graphics.GL.Ext.ATI.VertexArrayObject
+    Graphics.GL.Ext.ATI.VertexAttribArrayObject
+    Graphics.GL.Ext.ATI.VertexStreams
+    Graphics.GL.Ext.DMP
+    Graphics.GL.Ext.DMP.ProgramBinary
+    Graphics.GL.Ext.DMP.ShaderBinary
+    Graphics.GL.Ext.EXT
+    Graphics.GL.Ext.EXT.Abgr
+    Graphics.GL.Ext.EXT.BaseInstance
+    Graphics.GL.Ext.EXT.Bgra
+    Graphics.GL.Ext.EXT.BindableUniform
+    Graphics.GL.Ext.EXT.BlendColor
+    Graphics.GL.Ext.EXT.BlendEquationSeparate
+    Graphics.GL.Ext.EXT.BlendFuncExtended
+    Graphics.GL.Ext.EXT.BlendFuncSeparate
+    Graphics.GL.Ext.EXT.BlendLogicOp
+    Graphics.GL.Ext.EXT.BlendMinmax
+    Graphics.GL.Ext.EXT.BlendSubtract
+    Graphics.GL.Ext.EXT.BufferStorage
+    Graphics.GL.Ext.EXT.ClearTexture
+    Graphics.GL.Ext.EXT.ClipCullDistance
+    Graphics.GL.Ext.EXT.ClipVolumeHint
+    Graphics.GL.Ext.EXT.Cmyka
+    Graphics.GL.Ext.EXT.ColorBufferFloat
+    Graphics.GL.Ext.EXT.ColorBufferHalfFloat
+    Graphics.GL.Ext.EXT.ColorSubtable
+    Graphics.GL.Ext.EXT.CompiledVertexArray
+    Graphics.GL.Ext.EXT.ConservativeDepth
+    Graphics.GL.Ext.EXT.Convolution
+    Graphics.GL.Ext.EXT.CoordinateFrame
+    Graphics.GL.Ext.EXT.CopyImage
+    Graphics.GL.Ext.EXT.CopyTexture
+    Graphics.GL.Ext.EXT.CullVertex
+    Graphics.GL.Ext.EXT.DebugLabel
+    Graphics.GL.Ext.EXT.DebugMarker
+    Graphics.GL.Ext.EXT.DepthBoundsTest
+    Graphics.GL.Ext.EXT.DirectStateAccess
+    Graphics.GL.Ext.EXT.DiscardFramebuffer
+    Graphics.GL.Ext.EXT.DisjointTimerQuery
+    Graphics.GL.Ext.EXT.DrawBuffers
+    Graphics.GL.Ext.EXT.DrawBuffers2
+    Graphics.GL.Ext.EXT.DrawBuffersIndexed
+    Graphics.GL.Ext.EXT.DrawElementsBaseVertex
+    Graphics.GL.Ext.EXT.DrawInstanced
+    Graphics.GL.Ext.EXT.DrawRangeElements
+    Graphics.GL.Ext.EXT.DrawTransformFeedback
+    Graphics.GL.Ext.EXT.FogCoord
+    Graphics.GL.Ext.EXT.FourTwoTwoPixels
+    Graphics.GL.Ext.EXT.FloatBlend
+    Graphics.GL.Ext.EXT.FramebufferBlit
+    Graphics.GL.Ext.EXT.FramebufferMultisample
+    Graphics.GL.Ext.EXT.FramebufferMultisampleBlitScaled
+    Graphics.GL.Ext.EXT.FramebufferObject
+    Graphics.GL.Ext.EXT.FramebufferSRGB
+    Graphics.GL.Ext.EXT.GeometryPointSize
+    Graphics.GL.Ext.EXT.GeometryShader
+    Graphics.GL.Ext.EXT.GeometryShader4
+    Graphics.GL.Ext.EXT.GpuProgramParameters
+    Graphics.GL.Ext.EXT.GpuShader4
+    Graphics.GL.Ext.EXT.GpuShader5
+    Graphics.GL.Ext.EXT.Histogram
+    Graphics.GL.Ext.EXT.IndexArrayFormats
+    Graphics.GL.Ext.EXT.IndexFunc
+    Graphics.GL.Ext.EXT.IndexMaterial
+    Graphics.GL.Ext.EXT.IndexTexture
+    Graphics.GL.Ext.EXT.InstancedArrays
+    Graphics.GL.Ext.EXT.LightTexture
+    Graphics.GL.Ext.EXT.MapBufferRange
+    Graphics.GL.Ext.EXT.MiscAttribute
+    Graphics.GL.Ext.EXT.MultiDrawArrays
+    Graphics.GL.Ext.EXT.MultiDrawIndirect
+    Graphics.GL.Ext.EXT.Multisample
+    Graphics.GL.Ext.EXT.MultisampleCompatibility
+    Graphics.GL.Ext.EXT.MultisampledRenderToTexture
+    Graphics.GL.Ext.EXT.MultiviewDrawBuffers
+    Graphics.GL.Ext.EXT.OcclusionQueryBoolean
+    Graphics.GL.Ext.EXT.PackedDepthStencil
+    Graphics.GL.Ext.EXT.PackedFloat
+    Graphics.GL.Ext.EXT.PackedPixels
+    Graphics.GL.Ext.EXT.PalettedTexture
+    Graphics.GL.Ext.EXT.PixelBufferObject
+    Graphics.GL.Ext.EXT.PixelTransform
+    Graphics.GL.Ext.EXT.PixelTransformColorTable
+    Graphics.GL.Ext.EXT.PointParameters
+    Graphics.GL.Ext.EXT.PolygonOffset
+    Graphics.GL.Ext.EXT.PolygonOffsetClamp
+    Graphics.GL.Ext.EXT.PostDepthCoverage
+    Graphics.GL.Ext.EXT.PrimitiveBoundingBox
+    Graphics.GL.Ext.EXT.ProtectedTextures
+    Graphics.GL.Ext.EXT.ProvokingVertex
+    Graphics.GL.Ext.EXT.PvrtcSRGB
+    Graphics.GL.Ext.EXT.RasterMultisample
+    Graphics.GL.Ext.EXT.ReadFormatBgra
+    Graphics.GL.Ext.EXT.RenderSnorm
+    Graphics.GL.Ext.EXT.RescaleNormal
+    Graphics.GL.Ext.EXT.Robustness
+    Graphics.GL.Ext.EXT.SRGB
+    Graphics.GL.Ext.EXT.SRGBWriteControl
+    Graphics.GL.Ext.EXT.SecondaryColor
+    Graphics.GL.Ext.EXT.SeparateShaderObjects
+    Graphics.GL.Ext.EXT.SeparateSpecularColor
+    Graphics.GL.Ext.EXT.ShaderFramebufferFetch
+    Graphics.GL.Ext.EXT.ShaderGroupVote
+    Graphics.GL.Ext.EXT.ShaderImageLoadFormatted
+    Graphics.GL.Ext.EXT.ShaderImageLoadStore
+    Graphics.GL.Ext.EXT.ShaderImplicitConversions
+    Graphics.GL.Ext.EXT.ShaderIntegerMix
+    Graphics.GL.Ext.EXT.ShaderIoBlocks
+    Graphics.GL.Ext.EXT.ShaderNonConstantGlobalInitializers
+    Graphics.GL.Ext.EXT.ShaderPixelLocalStorage
+    Graphics.GL.Ext.EXT.ShaderPixelLocalStorage2
+    Graphics.GL.Ext.EXT.ShaderTextureLod
+    Graphics.GL.Ext.EXT.ShadowFuncs
+    Graphics.GL.Ext.EXT.ShadowSamplers
+    Graphics.GL.Ext.EXT.SharedTexturePalette
+    Graphics.GL.Ext.EXT.SparseTexture
+    Graphics.GL.Ext.EXT.SparseTexture2
+    Graphics.GL.Ext.EXT.StencilClearTag
+    Graphics.GL.Ext.EXT.StencilTwoSide
+    Graphics.GL.Ext.EXT.StencilWrap
+    Graphics.GL.Ext.EXT.Subtexture
+    Graphics.GL.Ext.EXT.TessellationPointSize
+    Graphics.GL.Ext.EXT.TessellationShader
+    Graphics.GL.Ext.EXT.Texture
+    Graphics.GL.Ext.EXT.Texture3D
+    Graphics.GL.Ext.EXT.TextureArray
+    Graphics.GL.Ext.EXT.TextureBorderClamp
+    Graphics.GL.Ext.EXT.TextureBuffer
+    Graphics.GL.Ext.EXT.TextureBufferObject
+    Graphics.GL.Ext.EXT.TextureCompressionDxt1
+    Graphics.GL.Ext.EXT.TextureCompressionLatc
+    Graphics.GL.Ext.EXT.TextureCompressionRgtc
+    Graphics.GL.Ext.EXT.TextureCompressionS3tc
+    Graphics.GL.Ext.EXT.TextureCubeMap
+    Graphics.GL.Ext.EXT.TextureCubeMapArray
+    Graphics.GL.Ext.EXT.TextureEnvAdd
+    Graphics.GL.Ext.EXT.TextureEnvCombine
+    Graphics.GL.Ext.EXT.TextureEnvDot3
+    Graphics.GL.Ext.EXT.TextureFilterAnisotropic
+    Graphics.GL.Ext.EXT.TextureFilterMinmax
+    Graphics.GL.Ext.EXT.TextureFormatBGRA8888
+    Graphics.GL.Ext.EXT.TextureInteger
+    Graphics.GL.Ext.EXT.TextureLodBias
+    Graphics.GL.Ext.EXT.TextureMirrorClamp
+    Graphics.GL.Ext.EXT.TextureNorm16
+    Graphics.GL.Ext.EXT.TextureObject
+    Graphics.GL.Ext.EXT.TexturePerturbNormal
+    Graphics.GL.Ext.EXT.TextureRg
+    Graphics.GL.Ext.EXT.TextureSRGB
+    Graphics.GL.Ext.EXT.TextureSRGBDecode
+    Graphics.GL.Ext.EXT.TextureSRGBR8
+    Graphics.GL.Ext.EXT.TextureSRGBRG8
+    Graphics.GL.Ext.EXT.TextureSharedExponent
+    Graphics.GL.Ext.EXT.TextureSnorm
+    Graphics.GL.Ext.EXT.TextureStorage
+    Graphics.GL.Ext.EXT.TextureSwizzle
+    Graphics.GL.Ext.EXT.TextureType2101010REV
+    Graphics.GL.Ext.EXT.TextureView
+    Graphics.GL.Ext.EXT.TimerQuery
+    Graphics.GL.Ext.EXT.TransformFeedback
+    Graphics.GL.Ext.EXT.UnpackSubimage
+    Graphics.GL.Ext.EXT.VertexArray
+    Graphics.GL.Ext.EXT.VertexArrayBgra
+    Graphics.GL.Ext.EXT.VertexAttrib64bit
+    Graphics.GL.Ext.EXT.VertexShader
+    Graphics.GL.Ext.EXT.VertexWeighting
+    Graphics.GL.Ext.EXT.WindowRectangles
+    Graphics.GL.Ext.EXT.X11SyncObject
+    Graphics.GL.Ext.EXT.YUVTarget
+    Graphics.GL.Ext.FJ
+    Graphics.GL.Ext.FJ.ShaderBinaryGCCSO
+    Graphics.GL.Ext.GREMEDY
+    Graphics.GL.Ext.GREMEDY.FrameTerminator
+    Graphics.GL.Ext.GREMEDY.StringMarker
+    Graphics.GL.Ext.HP
+    Graphics.GL.Ext.HP.ConvolutionBorderModes
+    Graphics.GL.Ext.HP.ImageTransform
+    Graphics.GL.Ext.HP.OcclusionTest
+    Graphics.GL.Ext.HP.TextureLighting
+    Graphics.GL.Ext.IBM
+    Graphics.GL.Ext.IBM.CullVertex
+    Graphics.GL.Ext.IBM.MultimodeDrawArrays
+    Graphics.GL.Ext.IBM.RasterposClip
+    Graphics.GL.Ext.IBM.StaticData
+    Graphics.GL.Ext.IBM.TextureMirroredRepeat
+    Graphics.GL.Ext.IBM.VertexArrayLists
+    Graphics.GL.Ext.IMG
+    Graphics.GL.Ext.IMG.BindlessTexture
+    Graphics.GL.Ext.IMG.FramebufferDownsample
+    Graphics.GL.Ext.IMG.MultisampledRenderToTexture
+    Graphics.GL.Ext.IMG.ProgramBinary
+    Graphics.GL.Ext.IMG.ReadFormat
+    Graphics.GL.Ext.IMG.ShaderBinary
+    Graphics.GL.Ext.IMG.TextureCompressionPvrtc
+    Graphics.GL.Ext.IMG.TextureCompressionPvrtc2
+    Graphics.GL.Ext.IMG.TextureEnvEnhancedFixedFunction
+    Graphics.GL.Ext.IMG.TextureFilterCubic
+    Graphics.GL.Ext.IMG.UserClipPlane
+    Graphics.GL.Ext.INGR
+    Graphics.GL.Ext.INGR.BlendFuncSeparate
+    Graphics.GL.Ext.INGR.ColorClamp
+    Graphics.GL.Ext.INGR.InterlaceRead
+    Graphics.GL.Ext.INTEL
+    Graphics.GL.Ext.INTEL.ConservativeRasterization
+    Graphics.GL.Ext.INTEL.FragmentShaderOrdering
+    Graphics.GL.Ext.INTEL.FramebufferCMAA
+    Graphics.GL.Ext.INTEL.MapTexture
+    Graphics.GL.Ext.INTEL.ParallelArrays
+    Graphics.GL.Ext.INTEL.PerformanceQuery
+    Graphics.GL.Ext.KHR
+    Graphics.GL.Ext.KHR.BlendEquationAdvanced
+    Graphics.GL.Ext.KHR.BlendEquationAdvancedCoherent
+    Graphics.GL.Ext.KHR.ContextFlushControl
+    Graphics.GL.Ext.KHR.Debug
+    Graphics.GL.Ext.KHR.NoError
+    Graphics.GL.Ext.KHR.RobustBufferAccessBehavior
+    Graphics.GL.Ext.KHR.Robustness
+    Graphics.GL.Ext.KHR.TextureCompressionAstcHdr
+    Graphics.GL.Ext.KHR.TextureCompressionAstcLdr
+    Graphics.GL.Ext.KHR.TextureCompressionAstcSliced3d
+    Graphics.GL.Ext.MESA
+    Graphics.GL.Ext.MESA.PackInvert
+    Graphics.GL.Ext.MESA.ResizeBuffers
+    Graphics.GL.Ext.MESA.WindowPos
+    Graphics.GL.Ext.MESA.YcbcrTexture
+    Graphics.GL.Ext.MESAX
+    Graphics.GL.Ext.MESAX.TextureStack
+    Graphics.GL.Ext.NV
+    Graphics.GL.Ext.NV.BindlessMultiDrawIndirect
+    Graphics.GL.Ext.NV.BindlessMultiDrawIndirectCount
+    Graphics.GL.Ext.NV.BindlessTexture
+    Graphics.GL.Ext.NV.BlendEquationAdvanced
+    Graphics.GL.Ext.NV.BlendEquationAdvancedCoherent
+    Graphics.GL.Ext.NV.BlendSquare
+    Graphics.GL.Ext.NV.ClipSpaceWScaling
+    Graphics.GL.Ext.NV.CommandList
+    Graphics.GL.Ext.NV.ComputeProgram5
+    Graphics.GL.Ext.NV.ConditionalRender
+    Graphics.GL.Ext.NV.ConservativeRaster
+    Graphics.GL.Ext.NV.ConservativeRasterDilate
+    Graphics.GL.Ext.NV.ConservativeRasterPreSnapTriangles
+    Graphics.GL.Ext.NV.CopyBuffer
+    Graphics.GL.Ext.NV.CopyDepthToColor
+    Graphics.GL.Ext.NV.CopyImage
+    Graphics.GL.Ext.NV.CoverageSample
+    Graphics.GL.Ext.NV.DeepTexture3D
+    Graphics.GL.Ext.NV.DepthBufferFloat
+    Graphics.GL.Ext.NV.DepthClamp
+    Graphics.GL.Ext.NV.DepthNonlinear
+    Graphics.GL.Ext.NV.DrawBuffers
+    Graphics.GL.Ext.NV.DrawInstanced
+    Graphics.GL.Ext.NV.DrawTexture
+    Graphics.GL.Ext.NV.Evaluators
+    Graphics.GL.Ext.NV.ExplicitAttribLocation
+    Graphics.GL.Ext.NV.ExplicitMultisample
+    Graphics.GL.Ext.NV.FboColorAttachments
+    Graphics.GL.Ext.NV.Fence
+    Graphics.GL.Ext.NV.FillRectangle
+    Graphics.GL.Ext.NV.FloatBuffer
+    Graphics.GL.Ext.NV.FogDistance
+    Graphics.GL.Ext.NV.FragmentCoverageToColor
+    Graphics.GL.Ext.NV.FragmentProgram
+    Graphics.GL.Ext.NV.FragmentProgram2
+    Graphics.GL.Ext.NV.FragmentProgram4
+    Graphics.GL.Ext.NV.FragmentProgramOption
+    Graphics.GL.Ext.NV.FragmentShaderInterlock
+    Graphics.GL.Ext.NV.FramebufferBlit
+    Graphics.GL.Ext.NV.FramebufferMixedSamples
+    Graphics.GL.Ext.NV.FramebufferMultisample
+    Graphics.GL.Ext.NV.FramebufferMultisampleCoverage
+    Graphics.GL.Ext.NV.GenerateMipmapSRGB
+    Graphics.GL.Ext.NV.GeometryProgram4
+    Graphics.GL.Ext.NV.GeometryShader4
+    Graphics.GL.Ext.NV.GeometryShaderPassthrough
+    Graphics.GL.Ext.NV.GpuProgram4
+    Graphics.GL.Ext.NV.GpuProgram5
+    Graphics.GL.Ext.NV.GpuProgram5MemExtended
+    Graphics.GL.Ext.NV.GpuShader5
+    Graphics.GL.Ext.NV.HalfFloat
+    Graphics.GL.Ext.NV.ImageFormats
+    Graphics.GL.Ext.NV.InstancedArrays
+    Graphics.GL.Ext.NV.InternalformatSampleQuery
+    Graphics.GL.Ext.NV.LightMaxExponent
+    Graphics.GL.Ext.NV.MultisampleCoverage
+    Graphics.GL.Ext.NV.MultisampleFilterHint
+    Graphics.GL.Ext.NV.NonSquareMatrices
+    Graphics.GL.Ext.NV.OcclusionQuery
+    Graphics.GL.Ext.NV.PackedDepthStencil
+    Graphics.GL.Ext.NV.ParameterBufferObject
+    Graphics.GL.Ext.NV.ParameterBufferObject2
+    Graphics.GL.Ext.NV.PathRendering
+    Graphics.GL.Ext.NV.PathRenderingSharedEdge
+    Graphics.GL.Ext.NV.PixelDataRange
+    Graphics.GL.Ext.NV.PointSprite
+    Graphics.GL.Ext.NV.PolygonMode
+    Graphics.GL.Ext.NV.PresentVideo
+    Graphics.GL.Ext.NV.PrimitiveRestart
+    Graphics.GL.Ext.NV.ReadBuffer
+    Graphics.GL.Ext.NV.ReadBufferFront
+    Graphics.GL.Ext.NV.ReadDepth
+    Graphics.GL.Ext.NV.ReadDepthStencil
+    Graphics.GL.Ext.NV.ReadStencil
+    Graphics.GL.Ext.NV.RegisterCombiners
+    Graphics.GL.Ext.NV.RegisterCombiners2
+    Graphics.GL.Ext.NV.RobustnessVideoMemoryPurge
+    Graphics.GL.Ext.NV.SRGBFormats
+    Graphics.GL.Ext.NV.SampleLocations
+    Graphics.GL.Ext.NV.SampleMaskOverrideCoverage
+    Graphics.GL.Ext.NV.ShaderAtomicCounters
+    Graphics.GL.Ext.NV.ShaderAtomicFloat
+    Graphics.GL.Ext.NV.ShaderAtomicFloat64
+    Graphics.GL.Ext.NV.ShaderAtomicFp16Vector
+    Graphics.GL.Ext.NV.ShaderAtomicInt64
+    Graphics.GL.Ext.NV.ShaderBufferLoad
+    Graphics.GL.Ext.NV.ShaderBufferStore
+    Graphics.GL.Ext.NV.ShaderNoperspectiveInterpolation
+    Graphics.GL.Ext.NV.ShaderStorageBufferObject
+    Graphics.GL.Ext.NV.ShaderThreadGroup
+    Graphics.GL.Ext.NV.ShaderThreadShuffle
+    Graphics.GL.Ext.NV.ShadowSamplersArray
+    Graphics.GL.Ext.NV.ShadowSamplersCube
+    Graphics.GL.Ext.NV.StereoViewRendering
+    Graphics.GL.Ext.NV.TessellationProgram5
+    Graphics.GL.Ext.NV.TexgenEmboss
+    Graphics.GL.Ext.NV.TexgenReflection
+    Graphics.GL.Ext.NV.TextureBarrier
+    Graphics.GL.Ext.NV.TextureBorderClamp
+    Graphics.GL.Ext.NV.TextureCompressionS3tcUpdate
+    Graphics.GL.Ext.NV.TextureCompressionVtc
+    Graphics.GL.Ext.NV.TextureEnvCombine4
+    Graphics.GL.Ext.NV.TextureExpandNormal
+    Graphics.GL.Ext.NV.TextureMultisample
+    Graphics.GL.Ext.NV.TextureNpot2DMipmap
+    Graphics.GL.Ext.NV.TextureRectangle
+    Graphics.GL.Ext.NV.TextureShader
+    Graphics.GL.Ext.NV.TextureShader2
+    Graphics.GL.Ext.NV.TextureShader3
+    Graphics.GL.Ext.NV.TransformFeedback
+    Graphics.GL.Ext.NV.TransformFeedback2
+    Graphics.GL.Ext.NV.UniformBufferUnifiedMemory
+    Graphics.GL.Ext.NV.VdpauInterop
+    Graphics.GL.Ext.NV.VertexArrayRange
+    Graphics.GL.Ext.NV.VertexArrayRange2
+    Graphics.GL.Ext.NV.VertexAttribInteger64bit
+    Graphics.GL.Ext.NV.VertexBufferUnifiedMemory
+    Graphics.GL.Ext.NV.VertexProgram
+    Graphics.GL.Ext.NV.VertexProgram11
+    Graphics.GL.Ext.NV.VertexProgram2
+    Graphics.GL.Ext.NV.VertexProgram2Option
+    Graphics.GL.Ext.NV.VertexProgram3
+    Graphics.GL.Ext.NV.VertexProgram4
+    Graphics.GL.Ext.NV.VideoCapture
+    Graphics.GL.Ext.NV.ViewportArray
+    Graphics.GL.Ext.NV.ViewportArray2
+    Graphics.GL.Ext.NV.ViewportSwizzle
+    Graphics.GL.Ext.NVX
+    Graphics.GL.Ext.NVX.ConditionalRender
+    Graphics.GL.Ext.NVX.GpuMemoryInfo
+    Graphics.GL.Ext.OES
+    Graphics.GL.Ext.OES.BlendEquationSeparate
+    Graphics.GL.Ext.OES.BlendFuncSeparate
+    Graphics.GL.Ext.OES.BlendSubtract
+    Graphics.GL.Ext.OES.ByteCoordinates
+    Graphics.GL.Ext.OES.CompressedETC1RGB8SubTexture
+    Graphics.GL.Ext.OES.CompressedETC1RGB8Texture
+    Graphics.GL.Ext.OES.CompressedPalettedTexture
+    Graphics.GL.Ext.OES.CopyImage
+    Graphics.GL.Ext.OES.Depth24
+    Graphics.GL.Ext.OES.Depth32
+    Graphics.GL.Ext.OES.DepthTexture
+    Graphics.GL.Ext.OES.DrawBuffersIndexed
+    Graphics.GL.Ext.OES.DrawElementsBaseVertex
+    Graphics.GL.Ext.OES.DrawTexture
+    Graphics.GL.Ext.OES.EGLImage
+    Graphics.GL.Ext.OES.EGLImageExternal
+    Graphics.GL.Ext.OES.EGLImageExternalEssl3
+    Graphics.GL.Ext.OES.ElementIndexUint
+    Graphics.GL.Ext.OES.ExtendedMatrixPalette
+    Graphics.GL.Ext.OES.FboRenderMipmap
+    Graphics.GL.Ext.OES.FixedPoint
+    Graphics.GL.Ext.OES.FragmentPrecisionHigh
+    Graphics.GL.Ext.OES.FramebufferObject
+    Graphics.GL.Ext.OES.GeometryPointSize
+    Graphics.GL.Ext.OES.GeometryShader
+    Graphics.GL.Ext.OES.GetProgramBinary
+    Graphics.GL.Ext.OES.GpuShader5
+    Graphics.GL.Ext.OES.Mapbuffer
+    Graphics.GL.Ext.OES.MatrixGet
+    Graphics.GL.Ext.OES.MatrixPalette
+    Graphics.GL.Ext.OES.PackedDepthStencil
+    Graphics.GL.Ext.OES.PointSizeArray
+    Graphics.GL.Ext.OES.PointSprite
+    Graphics.GL.Ext.OES.PrimitiveBoundingBox
+    Graphics.GL.Ext.OES.QueryMatrix
+    Graphics.GL.Ext.OES.ReadFormat
+    Graphics.GL.Ext.OES.RequiredInternalformat
+    Graphics.GL.Ext.OES.Rgb8Rgba8
+    Graphics.GL.Ext.OES.SampleShading
+    Graphics.GL.Ext.OES.SampleVariables
+    Graphics.GL.Ext.OES.ShaderImageAtomic
+    Graphics.GL.Ext.OES.ShaderIoBlocks
+    Graphics.GL.Ext.OES.ShaderMultisampleInterpolation
+    Graphics.GL.Ext.OES.SinglePrecision
+    Graphics.GL.Ext.OES.StandardDerivatives
+    Graphics.GL.Ext.OES.Stencil1
+    Graphics.GL.Ext.OES.Stencil4
+    Graphics.GL.Ext.OES.Stencil8
+    Graphics.GL.Ext.OES.StencilWrap
+    Graphics.GL.Ext.OES.SurfacelessContext
+    Graphics.GL.Ext.OES.TessellationPointSize
+    Graphics.GL.Ext.OES.TessellationShader
+    Graphics.GL.Ext.OES.Texture3D
+    Graphics.GL.Ext.OES.TextureBorderClamp
+    Graphics.GL.Ext.OES.TextureBuffer
+    Graphics.GL.Ext.OES.TextureCompressionAstc
+    Graphics.GL.Ext.OES.TextureCubeMap
+    Graphics.GL.Ext.OES.TextureCubeMapArray
+    Graphics.GL.Ext.OES.TextureEnvCrossbar
+    Graphics.GL.Ext.OES.TextureFloat
+    Graphics.GL.Ext.OES.TextureFloatLinear
+    Graphics.GL.Ext.OES.TextureHalfFloat
+    Graphics.GL.Ext.OES.TextureHalfFloatLinear
+    Graphics.GL.Ext.OES.TextureMirroredRepeat
+    Graphics.GL.Ext.OES.TextureNpot
+    Graphics.GL.Ext.OES.TextureStencil8
+    Graphics.GL.Ext.OES.TextureStorageMultisample2dArray
+    Graphics.GL.Ext.OES.TextureView
+    Graphics.GL.Ext.OES.VertexArrayObject
+    Graphics.GL.Ext.OES.VertexHalfFloat
+    Graphics.GL.Ext.OES.VertexType1010102
+    Graphics.GL.Ext.OES.ViewportArray
+    Graphics.GL.Ext.OML
+    Graphics.GL.Ext.OML.Interlace
+    Graphics.GL.Ext.OML.Resample
+    Graphics.GL.Ext.OML.Subsample
+    Graphics.GL.Ext.OVR
+    Graphics.GL.Ext.OVR.Multiview
+    Graphics.GL.Ext.OVR.Multiview2
+    Graphics.GL.Ext.OVR.MultiviewMultisampledRenderToTexture
+    Graphics.GL.Ext.PGI
+    Graphics.GL.Ext.PGI.MiscHints
+    Graphics.GL.Ext.PGI.VertexHints
+    Graphics.GL.Ext.QCOM
+    Graphics.GL.Ext.QCOM.AlphaTest
+    Graphics.GL.Ext.QCOM.BinningControl
+    Graphics.GL.Ext.QCOM.DriverControl
+    Graphics.GL.Ext.QCOM.ExtendedGet
+    Graphics.GL.Ext.QCOM.ExtendedGet2
+    Graphics.GL.Ext.QCOM.PerfmonGlobalMode
+    Graphics.GL.Ext.QCOM.TiledRendering
+    Graphics.GL.Ext.QCOM.WriteonlyRendering
+    Graphics.GL.Ext.REND
+    Graphics.GL.Ext.REND.ScreenCoordinates
+    Graphics.GL.Ext.S3
+    Graphics.GL.Ext.S3.S3tc
+    Graphics.GL.Ext.SGI
+    Graphics.GL.Ext.SGI.ColorMatrix
+    Graphics.GL.Ext.SGI.ColorTable
+    Graphics.GL.Ext.SGI.TextureColorTable
+    Graphics.GL.Ext.SGIS
+    Graphics.GL.Ext.SGIS.DetailTexture
+    Graphics.GL.Ext.SGIS.FogFunction
+    Graphics.GL.Ext.SGIS.GenerateMipmap
+    Graphics.GL.Ext.SGIS.Multisample
+    Graphics.GL.Ext.SGIS.PixelTexture
+    Graphics.GL.Ext.SGIS.PointLineTexgen
+    Graphics.GL.Ext.SGIS.PointParameters
+    Graphics.GL.Ext.SGIS.SharpenTexture
+    Graphics.GL.Ext.SGIS.Texture4D
+    Graphics.GL.Ext.SGIS.TextureBorderClamp
+    Graphics.GL.Ext.SGIS.TextureColorMask
+    Graphics.GL.Ext.SGIS.TextureEdgeClamp
+    Graphics.GL.Ext.SGIS.TextureFilter4
+    Graphics.GL.Ext.SGIS.TextureLod
+    Graphics.GL.Ext.SGIS.TextureSelect
+    Graphics.GL.Ext.SGIX
+    Graphics.GL.Ext.SGIX.Async
+    Graphics.GL.Ext.SGIX.AsyncHistogram
+    Graphics.GL.Ext.SGIX.AsyncPixel
+    Graphics.GL.Ext.SGIX.BlendAlphaMinmax
+    Graphics.GL.Ext.SGIX.CalligraphicFragment
+    Graphics.GL.Ext.SGIX.Clipmap
+    Graphics.GL.Ext.SGIX.ConvolutionAccuracy
+    Graphics.GL.Ext.SGIX.DepthPassInstrument
+    Graphics.GL.Ext.SGIX.DepthTexture
+    Graphics.GL.Ext.SGIX.FlushRaster
+    Graphics.GL.Ext.SGIX.FogOffset
+    Graphics.GL.Ext.SGIX.FragmentLighting
+    Graphics.GL.Ext.SGIX.Framezoom
+    Graphics.GL.Ext.SGIX.IglooInterface
+    Graphics.GL.Ext.SGIX.Instruments
+    Graphics.GL.Ext.SGIX.Interlace
+    Graphics.GL.Ext.SGIX.IrInstrument1
+    Graphics.GL.Ext.SGIX.ListPriority
+    Graphics.GL.Ext.SGIX.PixelTexture
+    Graphics.GL.Ext.SGIX.PixelTiles
+    Graphics.GL.Ext.SGIX.PolynomialFfd
+    Graphics.GL.Ext.SGIX.ReferencePlane
+    Graphics.GL.Ext.SGIX.Resample
+    Graphics.GL.Ext.SGIX.ScalebiasHint
+    Graphics.GL.Ext.SGIX.Shadow
+    Graphics.GL.Ext.SGIX.ShadowAmbient
+    Graphics.GL.Ext.SGIX.Sprite
+    Graphics.GL.Ext.SGIX.Subsample
+    Graphics.GL.Ext.SGIX.TagSampleBuffer
+    Graphics.GL.Ext.SGIX.TextureAddEnv
+    Graphics.GL.Ext.SGIX.TextureCoordinateClamp
+    Graphics.GL.Ext.SGIX.TextureLodBias
+    Graphics.GL.Ext.SGIX.TextureMultiBuffer
+    Graphics.GL.Ext.SGIX.TextureScaleBias
+    Graphics.GL.Ext.SGIX.VertexPreclip
+    Graphics.GL.Ext.SGIX.Ycrcb
+    Graphics.GL.Ext.SGIX.YcrcbSubsample
+    Graphics.GL.Ext.SGIX.Ycrcba
+    Graphics.GL.Ext.SUN
+    Graphics.GL.Ext.SUN.ConvolutionBorderModes
+    Graphics.GL.Ext.SUN.GlobalAlpha
+    Graphics.GL.Ext.SUN.MeshArray
+    Graphics.GL.Ext.SUN.SliceAccum
+    Graphics.GL.Ext.SUN.TriangleList
+    Graphics.GL.Ext.SUN.Vertex
+    Graphics.GL.Ext.SUNX
+    Graphics.GL.Ext.SUNX.ConstantData
+    Graphics.GL.Ext.ThreeDFX
+    Graphics.GL.Ext.ThreeDFX.Multisample
+    Graphics.GL.Ext.ThreeDFX.Tbuffer
+    Graphics.GL.Ext.ThreeDFX.TextureCompressionFXT1
+    Graphics.GL.Ext.VIV
+    Graphics.GL.Ext.VIV.ShaderBinary
+    Graphics.GL.Ext.WIN
+    Graphics.GL.Ext.WIN.PhongShading
+    Graphics.GL.Ext.WIN.SpecularFog
+    Graphics.GL.Internal.FFI
+    Graphics.GL.Internal.Proc
+    Graphics.GL.Internal.Shared
+    Graphics.GL.SafetyCritical20
+    Graphics.GL.Standard10
+    Graphics.GL.Standard11
+    Graphics.GL.Standard12
+    Graphics.GL.Standard13
+    Graphics.GL.Standard14
+    Graphics.GL.Standard15
+    Graphics.GL.Standard20
+    Graphics.GL.Standard21
+    Graphics.GL.Standard30
+    Graphics.GL.Standard31
+    Graphics.GL.Types
diff --git a/test/golden-test-cases/gl.nix.golden b/test/golden-test-cases/gl.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gl.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, Cabal, containers, directory, fetchurl
+, filepath, fixed, half, hxt, mesa, transformers
+}:
+mkDerivation {
+  pname = "gl";
+  version = "0.8.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  setupHaskellDepends = [
+    base Cabal containers directory filepath hxt transformers
+  ];
+  libraryHaskellDepends = [
+    base containers fixed half transformers
+  ];
+  librarySystemDepends = [ mesa ];
+  description = "Complete OpenGL raw bindings";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/gogol-adexchange-buyer.cabal b/test/golden-test-cases/gogol-adexchange-buyer.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-adexchange-buyer.cabal
@@ -0,0 +1,85 @@
+name:                  gogol-adexchange-buyer
+version:               0.3.0
+synopsis:              Google Ad Exchange Buyer SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Accesses your bidding-account information, submits creatives for
+    validation, finds available direct deals, and retrieves performance
+    reports.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1.4@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.AdExchangeBuyer
+        , Network.Google.AdExchangeBuyer.Types
+        , Network.Google.Resource.AdExchangeBuyer.Accounts.Get
+        , Network.Google.Resource.AdExchangeBuyer.Accounts.List
+        , Network.Google.Resource.AdExchangeBuyer.Accounts.Patch
+        , Network.Google.Resource.AdExchangeBuyer.Accounts.Update
+        , Network.Google.Resource.AdExchangeBuyer.BillingInfo.Get
+        , Network.Google.Resource.AdExchangeBuyer.BillingInfo.List
+        , Network.Google.Resource.AdExchangeBuyer.Budget.Get
+        , Network.Google.Resource.AdExchangeBuyer.Budget.Patch
+        , Network.Google.Resource.AdExchangeBuyer.Budget.Update
+        , Network.Google.Resource.AdExchangeBuyer.Creatives.AddDeal
+        , Network.Google.Resource.AdExchangeBuyer.Creatives.Get
+        , Network.Google.Resource.AdExchangeBuyer.Creatives.Insert
+        , Network.Google.Resource.AdExchangeBuyer.Creatives.List
+        , Network.Google.Resource.AdExchangeBuyer.Creatives.ListDeals
+        , Network.Google.Resource.AdExchangeBuyer.Creatives.RemoveDeal
+        , Network.Google.Resource.AdExchangeBuyer.MarketplaceDeals.Delete
+        , Network.Google.Resource.AdExchangeBuyer.MarketplaceDeals.Insert
+        , Network.Google.Resource.AdExchangeBuyer.MarketplaceDeals.List
+        , Network.Google.Resource.AdExchangeBuyer.MarketplaceDeals.Update
+        , Network.Google.Resource.AdExchangeBuyer.MarketplaceNotes.Insert
+        , Network.Google.Resource.AdExchangeBuyer.MarketplaceNotes.List
+        , Network.Google.Resource.AdExchangeBuyer.Marketplaceprivateauction.Updateproposal
+        , Network.Google.Resource.AdExchangeBuyer.PerformanceReport.List
+        , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Delete
+        , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Get
+        , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Insert
+        , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.List
+        , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Patch
+        , Network.Google.Resource.AdExchangeBuyer.PretargetingConfig.Update
+        , Network.Google.Resource.AdExchangeBuyer.Products.Get
+        , Network.Google.Resource.AdExchangeBuyer.Products.Search
+        , Network.Google.Resource.AdExchangeBuyer.Proposals.Get
+        , Network.Google.Resource.AdExchangeBuyer.Proposals.Insert
+        , Network.Google.Resource.AdExchangeBuyer.Proposals.Patch
+        , Network.Google.Resource.AdExchangeBuyer.Proposals.Search
+        , Network.Google.Resource.AdExchangeBuyer.Proposals.Setupcomplete
+        , Network.Google.Resource.AdExchangeBuyer.Proposals.Update
+        , Network.Google.Resource.AdExchangeBuyer.PubproFiles.List
+
+    other-modules:
+          Network.Google.AdExchangeBuyer.Types.Product
+        , Network.Google.AdExchangeBuyer.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-adexchange-buyer.nix.golden b/test/golden-test-cases/gogol-adexchange-buyer.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-adexchange-buyer.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-adexchange-buyer";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Ad Exchange Buyer SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-admin-emailmigration.cabal b/test/golden-test-cases/gogol-admin-emailmigration.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-admin-emailmigration.cabal
@@ -0,0 +1,46 @@
+name:                  gogol-admin-emailmigration
+version:               0.3.0
+synopsis:              Google Email Migration API v2 SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Email Migration API lets you migrate emails of users to Google backends.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @email_migration_v2@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.EmailMigration
+        , Network.Google.EmailMigration.Types
+        , Network.Google.Resource.EmailMigration.Mail.Insert
+
+    other-modules:
+          Network.Google.EmailMigration.Types.Product
+        , Network.Google.EmailMigration.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-admin-emailmigration.nix.golden b/test/golden-test-cases/gogol-admin-emailmigration.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-admin-emailmigration.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-admin-emailmigration";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Email Migration API v2 SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-affiliates.cabal b/test/golden-test-cases/gogol-affiliates.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-affiliates.cabal
@@ -0,0 +1,55 @@
+name:                  gogol-affiliates
+version:               0.3.0
+synopsis:              Google Affiliate Network SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Lets you have programmatic access to your Google Affiliate Network data.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1beta1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Affiliates
+        , Network.Google.Affiliates.Types
+        , Network.Google.Resource.GAN.Advertisers.Get
+        , Network.Google.Resource.GAN.Advertisers.List
+        , Network.Google.Resource.GAN.CcOffers.List
+        , Network.Google.Resource.GAN.Events.List
+        , Network.Google.Resource.GAN.Links.Get
+        , Network.Google.Resource.GAN.Links.Insert
+        , Network.Google.Resource.GAN.Links.List
+        , Network.Google.Resource.GAN.Publishers.Get
+        , Network.Google.Resource.GAN.Publishers.List
+        , Network.Google.Resource.GAN.Reports.Get
+
+    other-modules:
+          Network.Google.Affiliates.Types.Product
+        , Network.Google.Affiliates.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-affiliates.nix.golden b/test/golden-test-cases/gogol-affiliates.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-affiliates.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-affiliates";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Affiliate Network SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-apps-tasks.cabal b/test/golden-test-cases/gogol-apps-tasks.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-apps-tasks.cabal
@@ -0,0 +1,59 @@
+name:                  gogol-apps-tasks
+version:               0.3.0
+synopsis:              Google Tasks SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Lets you manage your tasks and task lists.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.AppsTasks
+        , Network.Google.AppsTasks.Types
+        , Network.Google.Resource.Tasks.TaskLists.Delete
+        , Network.Google.Resource.Tasks.TaskLists.Get
+        , Network.Google.Resource.Tasks.TaskLists.Insert
+        , Network.Google.Resource.Tasks.TaskLists.List
+        , Network.Google.Resource.Tasks.TaskLists.Patch
+        , Network.Google.Resource.Tasks.TaskLists.Update
+        , Network.Google.Resource.Tasks.Tasks.Clear
+        , Network.Google.Resource.Tasks.Tasks.Delete
+        , Network.Google.Resource.Tasks.Tasks.Get
+        , Network.Google.Resource.Tasks.Tasks.Insert
+        , Network.Google.Resource.Tasks.Tasks.List
+        , Network.Google.Resource.Tasks.Tasks.Move
+        , Network.Google.Resource.Tasks.Tasks.Patch
+        , Network.Google.Resource.Tasks.Tasks.Update
+
+    other-modules:
+          Network.Google.AppsTasks.Types.Product
+        , Network.Google.AppsTasks.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-apps-tasks.nix.golden b/test/golden-test-cases/gogol-apps-tasks.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-apps-tasks.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-apps-tasks";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Tasks SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-appstate.cabal b/test/golden-test-cases/gogol-appstate.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-appstate.cabal
@@ -0,0 +1,50 @@
+name:                  gogol-appstate
+version:               0.3.0
+synopsis:              Google App State SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    The Google App State API.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.AppState
+        , Network.Google.AppState.Types
+        , Network.Google.Resource.AppState.States.Clear
+        , Network.Google.Resource.AppState.States.Delete
+        , Network.Google.Resource.AppState.States.Get
+        , Network.Google.Resource.AppState.States.List
+        , Network.Google.Resource.AppState.States.Update
+
+    other-modules:
+          Network.Google.AppState.Types.Product
+        , Network.Google.AppState.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-appstate.nix.golden b/test/golden-test-cases/gogol-appstate.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-appstate.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-appstate";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google App State SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-blogger.cabal b/test/golden-test-cases/gogol-blogger.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-blogger.cabal
@@ -0,0 +1,82 @@
+name:                  gogol-blogger
+version:               0.3.0
+synopsis:              Google Blogger SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    API for access to the data within Blogger.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v3@
+    of the API.
+    .
+    Labels:
+    .
+    * Limited Availability
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Blogger
+        , Network.Google.Blogger.Types
+        , Network.Google.Resource.Blogger.BlogUserInfos.Get
+        , Network.Google.Resource.Blogger.Blogs.Get
+        , Network.Google.Resource.Blogger.Blogs.GetByURL
+        , Network.Google.Resource.Blogger.Blogs.ListByUser
+        , Network.Google.Resource.Blogger.Comments.Approve
+        , Network.Google.Resource.Blogger.Comments.Delete
+        , Network.Google.Resource.Blogger.Comments.Get
+        , Network.Google.Resource.Blogger.Comments.List
+        , Network.Google.Resource.Blogger.Comments.ListByBlog
+        , Network.Google.Resource.Blogger.Comments.MarkAsSpam
+        , Network.Google.Resource.Blogger.Comments.RemoveContent
+        , Network.Google.Resource.Blogger.PageViews.Get
+        , Network.Google.Resource.Blogger.Pages.Delete
+        , Network.Google.Resource.Blogger.Pages.Get
+        , Network.Google.Resource.Blogger.Pages.Insert
+        , Network.Google.Resource.Blogger.Pages.List
+        , Network.Google.Resource.Blogger.Pages.Patch
+        , Network.Google.Resource.Blogger.Pages.Publish
+        , Network.Google.Resource.Blogger.Pages.Revert
+        , Network.Google.Resource.Blogger.Pages.Update
+        , Network.Google.Resource.Blogger.PostUserInfos.Get
+        , Network.Google.Resource.Blogger.PostUserInfos.List
+        , Network.Google.Resource.Blogger.Posts.Delete
+        , Network.Google.Resource.Blogger.Posts.Get
+        , Network.Google.Resource.Blogger.Posts.GetByPath
+        , Network.Google.Resource.Blogger.Posts.Insert
+        , Network.Google.Resource.Blogger.Posts.List
+        , Network.Google.Resource.Blogger.Posts.Patch
+        , Network.Google.Resource.Blogger.Posts.Publish
+        , Network.Google.Resource.Blogger.Posts.Revert
+        , Network.Google.Resource.Blogger.Posts.Search
+        , Network.Google.Resource.Blogger.Posts.Update
+        , Network.Google.Resource.Blogger.Users.Get
+
+    other-modules:
+          Network.Google.Blogger.Types.Product
+        , Network.Google.Blogger.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-blogger.nix.golden b/test/golden-test-cases/gogol-blogger.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-blogger.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-blogger";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Blogger SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-datastore.cabal b/test/golden-test-cases/gogol-datastore.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-datastore.cabal
@@ -0,0 +1,52 @@
+name:                  gogol-datastore
+version:               0.3.0
+synopsis:              Google Cloud Datastore SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Accesses the schemaless NoSQL database to provide fully managed, robust,
+    scalable storage for your application.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Datastore
+        , Network.Google.Datastore.Types
+        , Network.Google.Resource.Datastore.Projects.AllocateIds
+        , Network.Google.Resource.Datastore.Projects.BeginTransaction
+        , Network.Google.Resource.Datastore.Projects.Commit
+        , Network.Google.Resource.Datastore.Projects.Lookup
+        , Network.Google.Resource.Datastore.Projects.Rollback
+        , Network.Google.Resource.Datastore.Projects.RunQuery
+
+    other-modules:
+          Network.Google.Datastore.Types.Product
+        , Network.Google.Datastore.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-datastore.nix.golden b/test/golden-test-cases/gogol-datastore.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-datastore.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-datastore";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Cloud Datastore SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-dfareporting.cabal b/test/golden-test-cases/gogol-dfareporting.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-dfareporting.cabal
@@ -0,0 +1,249 @@
+name:                  gogol-dfareporting
+version:               0.3.0
+synopsis:              Google DCM/DFA Reporting And Trafficking SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Manages your DoubleClick Campaign Manager ad campaigns and reports.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v2.7@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.DFAReporting
+        , Network.Google.DFAReporting.Types
+        , Network.Google.Resource.DFAReporting.AccountActiveAdSummaries.Get
+        , Network.Google.Resource.DFAReporting.AccountPermissionGroups.Get
+        , Network.Google.Resource.DFAReporting.AccountPermissionGroups.List
+        , Network.Google.Resource.DFAReporting.AccountPermissions.Get
+        , Network.Google.Resource.DFAReporting.AccountPermissions.List
+        , Network.Google.Resource.DFAReporting.AccountUserProFiles.Get
+        , Network.Google.Resource.DFAReporting.AccountUserProFiles.Insert
+        , Network.Google.Resource.DFAReporting.AccountUserProFiles.List
+        , Network.Google.Resource.DFAReporting.AccountUserProFiles.Patch
+        , Network.Google.Resource.DFAReporting.AccountUserProFiles.Update
+        , Network.Google.Resource.DFAReporting.Accounts.Get
+        , Network.Google.Resource.DFAReporting.Accounts.List
+        , Network.Google.Resource.DFAReporting.Accounts.Patch
+        , Network.Google.Resource.DFAReporting.Accounts.Update
+        , Network.Google.Resource.DFAReporting.Ads.Get
+        , Network.Google.Resource.DFAReporting.Ads.Insert
+        , Network.Google.Resource.DFAReporting.Ads.List
+        , Network.Google.Resource.DFAReporting.Ads.Patch
+        , Network.Google.Resource.DFAReporting.Ads.Update
+        , Network.Google.Resource.DFAReporting.AdvertiserGroups.Delete
+        , Network.Google.Resource.DFAReporting.AdvertiserGroups.Get
+        , Network.Google.Resource.DFAReporting.AdvertiserGroups.Insert
+        , Network.Google.Resource.DFAReporting.AdvertiserGroups.List
+        , Network.Google.Resource.DFAReporting.AdvertiserGroups.Patch
+        , Network.Google.Resource.DFAReporting.AdvertiserGroups.Update
+        , Network.Google.Resource.DFAReporting.Advertisers.Get
+        , Network.Google.Resource.DFAReporting.Advertisers.Insert
+        , Network.Google.Resource.DFAReporting.Advertisers.List
+        , Network.Google.Resource.DFAReporting.Advertisers.Patch
+        , Network.Google.Resource.DFAReporting.Advertisers.Update
+        , Network.Google.Resource.DFAReporting.Browsers.List
+        , Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.Insert
+        , Network.Google.Resource.DFAReporting.CampaignCreativeAssociations.List
+        , Network.Google.Resource.DFAReporting.Campaigns.Get
+        , Network.Google.Resource.DFAReporting.Campaigns.Insert
+        , Network.Google.Resource.DFAReporting.Campaigns.List
+        , Network.Google.Resource.DFAReporting.Campaigns.Patch
+        , Network.Google.Resource.DFAReporting.Campaigns.Update
+        , Network.Google.Resource.DFAReporting.ChangeLogs.Get
+        , Network.Google.Resource.DFAReporting.ChangeLogs.List
+        , Network.Google.Resource.DFAReporting.Cities.List
+        , Network.Google.Resource.DFAReporting.ConnectionTypes.Get
+        , Network.Google.Resource.DFAReporting.ConnectionTypes.List
+        , Network.Google.Resource.DFAReporting.ContentCategories.Delete
+        , Network.Google.Resource.DFAReporting.ContentCategories.Get
+        , Network.Google.Resource.DFAReporting.ContentCategories.Insert
+        , Network.Google.Resource.DFAReporting.ContentCategories.List
+        , Network.Google.Resource.DFAReporting.ContentCategories.Patch
+        , Network.Google.Resource.DFAReporting.ContentCategories.Update
+        , Network.Google.Resource.DFAReporting.Conversions.Batchinsert
+        , Network.Google.Resource.DFAReporting.Countries.Get
+        , Network.Google.Resource.DFAReporting.Countries.List
+        , Network.Google.Resource.DFAReporting.CreativeAssets.Insert
+        , Network.Google.Resource.DFAReporting.CreativeFieldValues.Delete
+        , Network.Google.Resource.DFAReporting.CreativeFieldValues.Get
+        , Network.Google.Resource.DFAReporting.CreativeFieldValues.Insert
+        , Network.Google.Resource.DFAReporting.CreativeFieldValues.List
+        , Network.Google.Resource.DFAReporting.CreativeFieldValues.Patch
+        , Network.Google.Resource.DFAReporting.CreativeFieldValues.Update
+        , Network.Google.Resource.DFAReporting.CreativeFields.Delete
+        , Network.Google.Resource.DFAReporting.CreativeFields.Get
+        , Network.Google.Resource.DFAReporting.CreativeFields.Insert
+        , Network.Google.Resource.DFAReporting.CreativeFields.List
+        , Network.Google.Resource.DFAReporting.CreativeFields.Patch
+        , Network.Google.Resource.DFAReporting.CreativeFields.Update
+        , Network.Google.Resource.DFAReporting.CreativeGroups.Get
+        , Network.Google.Resource.DFAReporting.CreativeGroups.Insert
+        , Network.Google.Resource.DFAReporting.CreativeGroups.List
+        , Network.Google.Resource.DFAReporting.CreativeGroups.Patch
+        , Network.Google.Resource.DFAReporting.CreativeGroups.Update
+        , Network.Google.Resource.DFAReporting.Creatives.Get
+        , Network.Google.Resource.DFAReporting.Creatives.Insert
+        , Network.Google.Resource.DFAReporting.Creatives.List
+        , Network.Google.Resource.DFAReporting.Creatives.Patch
+        , Network.Google.Resource.DFAReporting.Creatives.Update
+        , Network.Google.Resource.DFAReporting.DimensionValues.Query
+        , Network.Google.Resource.DFAReporting.DirectorySiteContacts.Get
+        , Network.Google.Resource.DFAReporting.DirectorySiteContacts.List
+        , Network.Google.Resource.DFAReporting.DirectorySites.Get
+        , Network.Google.Resource.DFAReporting.DirectorySites.Insert
+        , Network.Google.Resource.DFAReporting.DirectorySites.List
+        , Network.Google.Resource.DFAReporting.DynamicTargetingKeys.Delete
+        , Network.Google.Resource.DFAReporting.DynamicTargetingKeys.Insert
+        , Network.Google.Resource.DFAReporting.DynamicTargetingKeys.List
+        , Network.Google.Resource.DFAReporting.EventTags.Delete
+        , Network.Google.Resource.DFAReporting.EventTags.Get
+        , Network.Google.Resource.DFAReporting.EventTags.Insert
+        , Network.Google.Resource.DFAReporting.EventTags.List
+        , Network.Google.Resource.DFAReporting.EventTags.Patch
+        , Network.Google.Resource.DFAReporting.EventTags.Update
+        , Network.Google.Resource.DFAReporting.Files.Get
+        , Network.Google.Resource.DFAReporting.Files.List
+        , Network.Google.Resource.DFAReporting.FloodlightActivities.Delete
+        , Network.Google.Resource.DFAReporting.FloodlightActivities.Generatetag
+        , Network.Google.Resource.DFAReporting.FloodlightActivities.Get
+        , Network.Google.Resource.DFAReporting.FloodlightActivities.Insert
+        , Network.Google.Resource.DFAReporting.FloodlightActivities.List
+        , Network.Google.Resource.DFAReporting.FloodlightActivities.Patch
+        , Network.Google.Resource.DFAReporting.FloodlightActivities.Update
+        , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Get
+        , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Insert
+        , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.List
+        , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Patch
+        , Network.Google.Resource.DFAReporting.FloodlightActivityGroups.Update
+        , Network.Google.Resource.DFAReporting.FloodlightConfigurations.Get
+        , Network.Google.Resource.DFAReporting.FloodlightConfigurations.List
+        , Network.Google.Resource.DFAReporting.FloodlightConfigurations.Patch
+        , Network.Google.Resource.DFAReporting.FloodlightConfigurations.Update
+        , Network.Google.Resource.DFAReporting.InventoryItems.Get
+        , Network.Google.Resource.DFAReporting.InventoryItems.List
+        , Network.Google.Resource.DFAReporting.LandingPages.Delete
+        , Network.Google.Resource.DFAReporting.LandingPages.Get
+        , Network.Google.Resource.DFAReporting.LandingPages.Insert
+        , Network.Google.Resource.DFAReporting.LandingPages.List
+        , Network.Google.Resource.DFAReporting.LandingPages.Patch
+        , Network.Google.Resource.DFAReporting.LandingPages.Update
+        , Network.Google.Resource.DFAReporting.Languages.List
+        , Network.Google.Resource.DFAReporting.Metros.List
+        , Network.Google.Resource.DFAReporting.MobileCarriers.Get
+        , Network.Google.Resource.DFAReporting.MobileCarriers.List
+        , Network.Google.Resource.DFAReporting.OperatingSystemVersions.Get
+        , Network.Google.Resource.DFAReporting.OperatingSystemVersions.List
+        , Network.Google.Resource.DFAReporting.OperatingSystems.Get
+        , Network.Google.Resource.DFAReporting.OperatingSystems.List
+        , Network.Google.Resource.DFAReporting.OrderDocuments.Get
+        , Network.Google.Resource.DFAReporting.OrderDocuments.List
+        , Network.Google.Resource.DFAReporting.Orders.Get
+        , Network.Google.Resource.DFAReporting.Orders.List
+        , Network.Google.Resource.DFAReporting.PlacementGroups.Get
+        , Network.Google.Resource.DFAReporting.PlacementGroups.Insert
+        , Network.Google.Resource.DFAReporting.PlacementGroups.List
+        , Network.Google.Resource.DFAReporting.PlacementGroups.Patch
+        , Network.Google.Resource.DFAReporting.PlacementGroups.Update
+        , Network.Google.Resource.DFAReporting.PlacementStrategies.Delete
+        , Network.Google.Resource.DFAReporting.PlacementStrategies.Get
+        , Network.Google.Resource.DFAReporting.PlacementStrategies.Insert
+        , Network.Google.Resource.DFAReporting.PlacementStrategies.List
+        , Network.Google.Resource.DFAReporting.PlacementStrategies.Patch
+        , Network.Google.Resource.DFAReporting.PlacementStrategies.Update
+        , Network.Google.Resource.DFAReporting.Placements.Generatetags
+        , Network.Google.Resource.DFAReporting.Placements.Get
+        , Network.Google.Resource.DFAReporting.Placements.Insert
+        , Network.Google.Resource.DFAReporting.Placements.List
+        , Network.Google.Resource.DFAReporting.Placements.Patch
+        , Network.Google.Resource.DFAReporting.Placements.Update
+        , Network.Google.Resource.DFAReporting.PlatformTypes.Get
+        , Network.Google.Resource.DFAReporting.PlatformTypes.List
+        , Network.Google.Resource.DFAReporting.PostalCodes.Get
+        , Network.Google.Resource.DFAReporting.PostalCodes.List
+        , Network.Google.Resource.DFAReporting.Projects.Get
+        , Network.Google.Resource.DFAReporting.Projects.List
+        , Network.Google.Resource.DFAReporting.Regions.List
+        , Network.Google.Resource.DFAReporting.RemarketingListShares.Get
+        , Network.Google.Resource.DFAReporting.RemarketingListShares.Patch
+        , Network.Google.Resource.DFAReporting.RemarketingListShares.Update
+        , Network.Google.Resource.DFAReporting.RemarketingLists.Get
+        , Network.Google.Resource.DFAReporting.RemarketingLists.Insert
+        , Network.Google.Resource.DFAReporting.RemarketingLists.List
+        , Network.Google.Resource.DFAReporting.RemarketingLists.Patch
+        , Network.Google.Resource.DFAReporting.RemarketingLists.Update
+        , Network.Google.Resource.DFAReporting.Reports.CompatibleFields.Query
+        , Network.Google.Resource.DFAReporting.Reports.Delete
+        , Network.Google.Resource.DFAReporting.Reports.Files.Get
+        , Network.Google.Resource.DFAReporting.Reports.Files.List
+        , Network.Google.Resource.DFAReporting.Reports.Get
+        , Network.Google.Resource.DFAReporting.Reports.Insert
+        , Network.Google.Resource.DFAReporting.Reports.List
+        , Network.Google.Resource.DFAReporting.Reports.Patch
+        , Network.Google.Resource.DFAReporting.Reports.Run
+        , Network.Google.Resource.DFAReporting.Reports.Update
+        , Network.Google.Resource.DFAReporting.Sites.Get
+        , Network.Google.Resource.DFAReporting.Sites.Insert
+        , Network.Google.Resource.DFAReporting.Sites.List
+        , Network.Google.Resource.DFAReporting.Sites.Patch
+        , Network.Google.Resource.DFAReporting.Sites.Update
+        , Network.Google.Resource.DFAReporting.Sizes.Get
+        , Network.Google.Resource.DFAReporting.Sizes.Insert
+        , Network.Google.Resource.DFAReporting.Sizes.List
+        , Network.Google.Resource.DFAReporting.SubAccounts.Get
+        , Network.Google.Resource.DFAReporting.SubAccounts.Insert
+        , Network.Google.Resource.DFAReporting.SubAccounts.List
+        , Network.Google.Resource.DFAReporting.SubAccounts.Patch
+        , Network.Google.Resource.DFAReporting.SubAccounts.Update
+        , Network.Google.Resource.DFAReporting.TargetableRemarketingLists.Get
+        , Network.Google.Resource.DFAReporting.TargetableRemarketingLists.List
+        , Network.Google.Resource.DFAReporting.TargetingTemplates.Get
+        , Network.Google.Resource.DFAReporting.TargetingTemplates.Insert
+        , Network.Google.Resource.DFAReporting.TargetingTemplates.List
+        , Network.Google.Resource.DFAReporting.TargetingTemplates.Patch
+        , Network.Google.Resource.DFAReporting.TargetingTemplates.Update
+        , Network.Google.Resource.DFAReporting.UserProFiles.Get
+        , Network.Google.Resource.DFAReporting.UserProFiles.List
+        , Network.Google.Resource.DFAReporting.UserRolePermissionGroups.Get
+        , Network.Google.Resource.DFAReporting.UserRolePermissionGroups.List
+        , Network.Google.Resource.DFAReporting.UserRolePermissions.Get
+        , Network.Google.Resource.DFAReporting.UserRolePermissions.List
+        , Network.Google.Resource.DFAReporting.UserRoles.Delete
+        , Network.Google.Resource.DFAReporting.UserRoles.Get
+        , Network.Google.Resource.DFAReporting.UserRoles.Insert
+        , Network.Google.Resource.DFAReporting.UserRoles.List
+        , Network.Google.Resource.DFAReporting.UserRoles.Patch
+        , Network.Google.Resource.DFAReporting.UserRoles.Update
+        , Network.Google.Resource.DFAReporting.VideoFormats.Get
+        , Network.Google.Resource.DFAReporting.VideoFormats.List
+
+    other-modules:
+          Network.Google.DFAReporting.Types.Product
+        , Network.Google.DFAReporting.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-dfareporting.nix.golden b/test/golden-test-cases/gogol-dfareporting.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-dfareporting.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-dfareporting";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google DCM/DFA Reporting And Trafficking SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-firebase-rules.cabal b/test/golden-test-cases/gogol-firebase-rules.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-firebase-rules.cabal
@@ -0,0 +1,56 @@
+name:                  gogol-firebase-rules
+version:               0.3.0
+synopsis:              Google Firebase Rules SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Creates and manages rules that determine when a Firebase Rules-enabled
+    service should permit a request.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.FirebaseRules
+        , Network.Google.FirebaseRules.Types
+        , Network.Google.Resource.FirebaseRules.Projects.Releases.Create
+        , Network.Google.Resource.FirebaseRules.Projects.Releases.Delete
+        , Network.Google.Resource.FirebaseRules.Projects.Releases.Get
+        , Network.Google.Resource.FirebaseRules.Projects.Releases.List
+        , Network.Google.Resource.FirebaseRules.Projects.Releases.Update
+        , Network.Google.Resource.FirebaseRules.Projects.Rulesets.Create
+        , Network.Google.Resource.FirebaseRules.Projects.Rulesets.Delete
+        , Network.Google.Resource.FirebaseRules.Projects.Rulesets.Get
+        , Network.Google.Resource.FirebaseRules.Projects.Rulesets.List
+        , Network.Google.Resource.FirebaseRules.Projects.Test
+
+    other-modules:
+          Network.Google.FirebaseRules.Types.Product
+        , Network.Google.FirebaseRules.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-firebase-rules.nix.golden b/test/golden-test-cases/gogol-firebase-rules.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-firebase-rules.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-firebase-rules";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Firebase Rules SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-gmail.cabal b/test/golden-test-cases/gogol-gmail.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-gmail.cabal
@@ -0,0 +1,102 @@
+name:                  gogol-gmail
+version:               0.3.0
+synopsis:              Google Gmail SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Access Gmail mailboxes including sending user email.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Gmail
+        , Network.Google.Gmail.Types
+        , Network.Google.Resource.Gmail.Users.Drafts.Create
+        , Network.Google.Resource.Gmail.Users.Drafts.Delete
+        , Network.Google.Resource.Gmail.Users.Drafts.Get
+        , Network.Google.Resource.Gmail.Users.Drafts.List
+        , Network.Google.Resource.Gmail.Users.Drafts.Send
+        , Network.Google.Resource.Gmail.Users.Drafts.Update
+        , Network.Google.Resource.Gmail.Users.GetProFile
+        , Network.Google.Resource.Gmail.Users.History.List
+        , Network.Google.Resource.Gmail.Users.Labels.Create
+        , Network.Google.Resource.Gmail.Users.Labels.Delete
+        , Network.Google.Resource.Gmail.Users.Labels.Get
+        , Network.Google.Resource.Gmail.Users.Labels.List
+        , Network.Google.Resource.Gmail.Users.Labels.Patch
+        , Network.Google.Resource.Gmail.Users.Labels.Update
+        , Network.Google.Resource.Gmail.Users.Messages.Attachments.Get
+        , Network.Google.Resource.Gmail.Users.Messages.BatchDelete
+        , Network.Google.Resource.Gmail.Users.Messages.BatchModify
+        , Network.Google.Resource.Gmail.Users.Messages.Delete
+        , Network.Google.Resource.Gmail.Users.Messages.Get
+        , Network.Google.Resource.Gmail.Users.Messages.Import
+        , Network.Google.Resource.Gmail.Users.Messages.Insert
+        , Network.Google.Resource.Gmail.Users.Messages.List
+        , Network.Google.Resource.Gmail.Users.Messages.Modify
+        , Network.Google.Resource.Gmail.Users.Messages.Send
+        , Network.Google.Resource.Gmail.Users.Messages.Trash
+        , Network.Google.Resource.Gmail.Users.Messages.Untrash
+        , Network.Google.Resource.Gmail.Users.Settings.Filters.Create
+        , Network.Google.Resource.Gmail.Users.Settings.Filters.Delete
+        , Network.Google.Resource.Gmail.Users.Settings.Filters.Get
+        , Network.Google.Resource.Gmail.Users.Settings.Filters.List
+        , Network.Google.Resource.Gmail.Users.Settings.ForwardingAddresses.Create
+        , Network.Google.Resource.Gmail.Users.Settings.ForwardingAddresses.Delete
+        , Network.Google.Resource.Gmail.Users.Settings.ForwardingAddresses.Get
+        , Network.Google.Resource.Gmail.Users.Settings.ForwardingAddresses.List
+        , Network.Google.Resource.Gmail.Users.Settings.GetAutoForwarding
+        , Network.Google.Resource.Gmail.Users.Settings.GetImap
+        , Network.Google.Resource.Gmail.Users.Settings.GetPop
+        , Network.Google.Resource.Gmail.Users.Settings.GetVacation
+        , Network.Google.Resource.Gmail.Users.Settings.SendAs.Create
+        , Network.Google.Resource.Gmail.Users.Settings.SendAs.Delete
+        , Network.Google.Resource.Gmail.Users.Settings.SendAs.Get
+        , Network.Google.Resource.Gmail.Users.Settings.SendAs.List
+        , Network.Google.Resource.Gmail.Users.Settings.SendAs.Patch
+        , Network.Google.Resource.Gmail.Users.Settings.SendAs.Update
+        , Network.Google.Resource.Gmail.Users.Settings.SendAs.Verify
+        , Network.Google.Resource.Gmail.Users.Settings.UpdateAutoForwarding
+        , Network.Google.Resource.Gmail.Users.Settings.UpdateImap
+        , Network.Google.Resource.Gmail.Users.Settings.UpdatePop
+        , Network.Google.Resource.Gmail.Users.Settings.UpdateVacation
+        , Network.Google.Resource.Gmail.Users.Stop
+        , Network.Google.Resource.Gmail.Users.Threads.Delete
+        , Network.Google.Resource.Gmail.Users.Threads.Get
+        , Network.Google.Resource.Gmail.Users.Threads.List
+        , Network.Google.Resource.Gmail.Users.Threads.Modify
+        , Network.Google.Resource.Gmail.Users.Threads.Trash
+        , Network.Google.Resource.Gmail.Users.Threads.Untrash
+        , Network.Google.Resource.Gmail.Users.Watch
+
+    other-modules:
+          Network.Google.Gmail.Types.Product
+        , Network.Google.Gmail.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-gmail.nix.golden b/test/golden-test-cases/gogol-gmail.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-gmail.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-gmail";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Gmail SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-kgsearch.cabal b/test/golden-test-cases/gogol-kgsearch.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-kgsearch.cabal
@@ -0,0 +1,46 @@
+name:                  gogol-kgsearch
+version:               0.3.0
+synopsis:              Google Knowledge Graph Search SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Searches the Google Knowledge Graph for entities.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.KnowledgeGraphSearch
+        , Network.Google.KnowledgeGraphSearch.Types
+        , Network.Google.Resource.Kgsearch.Entities.Search
+
+    other-modules:
+          Network.Google.KnowledgeGraphSearch.Types.Product
+        , Network.Google.KnowledgeGraphSearch.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-kgsearch.nix.golden b/test/golden-test-cases/gogol-kgsearch.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-kgsearch.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-kgsearch";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Knowledge Graph Search SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-maps-engine.cabal b/test/golden-test-cases/gogol-maps-engine.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-maps-engine.cabal
@@ -0,0 +1,123 @@
+name:                  gogol-maps-engine
+version:               0.3.0
+synopsis:              Google Maps Engine SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    The Google Maps Engine API allows developers to store and query
+    geospatial vector and raster data.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.MapsEngine
+        , Network.Google.MapsEngine.Types
+        , Network.Google.Resource.MapsEngine.Assets.Get
+        , Network.Google.Resource.MapsEngine.Assets.List
+        , Network.Google.Resource.MapsEngine.Assets.Parents.List
+        , Network.Google.Resource.MapsEngine.Assets.Permissions.List
+        , Network.Google.Resource.MapsEngine.Layers.CancelProcessing
+        , Network.Google.Resource.MapsEngine.Layers.Create
+        , Network.Google.Resource.MapsEngine.Layers.Delete
+        , Network.Google.Resource.MapsEngine.Layers.Get
+        , Network.Google.Resource.MapsEngine.Layers.GetPublished
+        , Network.Google.Resource.MapsEngine.Layers.List
+        , Network.Google.Resource.MapsEngine.Layers.ListPublished
+        , Network.Google.Resource.MapsEngine.Layers.Parents.List
+        , Network.Google.Resource.MapsEngine.Layers.Patch
+        , Network.Google.Resource.MapsEngine.Layers.Permissions.BatchDelete
+        , Network.Google.Resource.MapsEngine.Layers.Permissions.BatchUpdate
+        , Network.Google.Resource.MapsEngine.Layers.Permissions.List
+        , Network.Google.Resource.MapsEngine.Layers.Process
+        , Network.Google.Resource.MapsEngine.Layers.Publish
+        , Network.Google.Resource.MapsEngine.Layers.UnPublish
+        , Network.Google.Resource.MapsEngine.Maps.Create
+        , Network.Google.Resource.MapsEngine.Maps.Delete
+        , Network.Google.Resource.MapsEngine.Maps.Get
+        , Network.Google.Resource.MapsEngine.Maps.GetPublished
+        , Network.Google.Resource.MapsEngine.Maps.List
+        , Network.Google.Resource.MapsEngine.Maps.ListPublished
+        , Network.Google.Resource.MapsEngine.Maps.Patch
+        , Network.Google.Resource.MapsEngine.Maps.Permissions.BatchDelete
+        , Network.Google.Resource.MapsEngine.Maps.Permissions.BatchUpdate
+        , Network.Google.Resource.MapsEngine.Maps.Permissions.List
+        , Network.Google.Resource.MapsEngine.Maps.Publish
+        , Network.Google.Resource.MapsEngine.Maps.UnPublish
+        , Network.Google.Resource.MapsEngine.Projects.Icons.Create
+        , Network.Google.Resource.MapsEngine.Projects.Icons.Get
+        , Network.Google.Resource.MapsEngine.Projects.Icons.List
+        , Network.Google.Resource.MapsEngine.Projects.List
+        , Network.Google.Resource.MapsEngine.RasterCollections.CancelProcessing
+        , Network.Google.Resource.MapsEngine.RasterCollections.Create
+        , Network.Google.Resource.MapsEngine.RasterCollections.Delete
+        , Network.Google.Resource.MapsEngine.RasterCollections.Get
+        , Network.Google.Resource.MapsEngine.RasterCollections.List
+        , Network.Google.Resource.MapsEngine.RasterCollections.Parents.List
+        , Network.Google.Resource.MapsEngine.RasterCollections.Patch
+        , Network.Google.Resource.MapsEngine.RasterCollections.Permissions.BatchDelete
+        , Network.Google.Resource.MapsEngine.RasterCollections.Permissions.BatchUpdate
+        , Network.Google.Resource.MapsEngine.RasterCollections.Permissions.List
+        , Network.Google.Resource.MapsEngine.RasterCollections.Process
+        , Network.Google.Resource.MapsEngine.RasterCollections.Rasters.BatchDelete
+        , Network.Google.Resource.MapsEngine.RasterCollections.Rasters.BatchInsert
+        , Network.Google.Resource.MapsEngine.RasterCollections.Rasters.List
+        , Network.Google.Resource.MapsEngine.Rasters.Delete
+        , Network.Google.Resource.MapsEngine.Rasters.Files.Insert
+        , Network.Google.Resource.MapsEngine.Rasters.Get
+        , Network.Google.Resource.MapsEngine.Rasters.List
+        , Network.Google.Resource.MapsEngine.Rasters.Parents.List
+        , Network.Google.Resource.MapsEngine.Rasters.Patch
+        , Network.Google.Resource.MapsEngine.Rasters.Permissions.BatchDelete
+        , Network.Google.Resource.MapsEngine.Rasters.Permissions.BatchUpdate
+        , Network.Google.Resource.MapsEngine.Rasters.Permissions.List
+        , Network.Google.Resource.MapsEngine.Rasters.Process
+        , Network.Google.Resource.MapsEngine.Rasters.Upload
+        , Network.Google.Resource.MapsEngine.Tables.Create
+        , Network.Google.Resource.MapsEngine.Tables.Delete
+        , Network.Google.Resource.MapsEngine.Tables.Features.BatchDelete
+        , Network.Google.Resource.MapsEngine.Tables.Features.BatchInsert
+        , Network.Google.Resource.MapsEngine.Tables.Features.BatchPatch
+        , Network.Google.Resource.MapsEngine.Tables.Features.Get
+        , Network.Google.Resource.MapsEngine.Tables.Features.List
+        , Network.Google.Resource.MapsEngine.Tables.Files.Insert
+        , Network.Google.Resource.MapsEngine.Tables.Get
+        , Network.Google.Resource.MapsEngine.Tables.List
+        , Network.Google.Resource.MapsEngine.Tables.Parents.List
+        , Network.Google.Resource.MapsEngine.Tables.Patch
+        , Network.Google.Resource.MapsEngine.Tables.Permissions.BatchDelete
+        , Network.Google.Resource.MapsEngine.Tables.Permissions.BatchUpdate
+        , Network.Google.Resource.MapsEngine.Tables.Permissions.List
+        , Network.Google.Resource.MapsEngine.Tables.Process
+        , Network.Google.Resource.MapsEngine.Tables.Upload
+
+    other-modules:
+          Network.Google.MapsEngine.Types.Product
+        , Network.Google.MapsEngine.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-maps-engine.nix.golden b/test/golden-test-cases/gogol-maps-engine.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-maps-engine.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-maps-engine";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Maps Engine SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-plus.cabal b/test/golden-test-cases/gogol-plus.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-plus.cabal
@@ -0,0 +1,54 @@
+name:                  gogol-plus
+version:               0.3.0
+synopsis:              Google + SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Builds on top of the Google+ platform.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Plus
+        , Network.Google.Plus.Types
+        , Network.Google.Resource.Plus.Activities.Get
+        , Network.Google.Resource.Plus.Activities.List
+        , Network.Google.Resource.Plus.Activities.Search
+        , Network.Google.Resource.Plus.Comments.Get
+        , Network.Google.Resource.Plus.Comments.List
+        , Network.Google.Resource.Plus.People.Get
+        , Network.Google.Resource.Plus.People.List
+        , Network.Google.Resource.Plus.People.ListByActivity
+        , Network.Google.Resource.Plus.People.Search
+
+    other-modules:
+          Network.Google.Plus.Types.Product
+        , Network.Google.Plus.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-plus.nix.golden b/test/golden-test-cases/gogol-plus.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-plus.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-plus";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google + SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-resourceviews.cabal b/test/golden-test-cases/gogol-resourceviews.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-resourceviews.cabal
@@ -0,0 +1,61 @@
+name:                  gogol-resourceviews
+version:               0.3.0
+synopsis:              Google Compute Engine Instance Groups SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    The Resource View API allows users to create and manage logical sets of
+    Google Compute Engine instances.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v1beta2@
+    of the API.
+    .
+    Labels:
+    .
+    * Limited Availability
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Resource.ResourceViews.ZoneOperations.Get
+        , Network.Google.Resource.ResourceViews.ZoneOperations.List
+        , Network.Google.Resource.ResourceViews.ZoneViews.AddResources
+        , Network.Google.Resource.ResourceViews.ZoneViews.Delete
+        , Network.Google.Resource.ResourceViews.ZoneViews.Get
+        , Network.Google.Resource.ResourceViews.ZoneViews.GetService
+        , Network.Google.Resource.ResourceViews.ZoneViews.Insert
+        , Network.Google.Resource.ResourceViews.ZoneViews.List
+        , Network.Google.Resource.ResourceViews.ZoneViews.ListResources
+        , Network.Google.Resource.ResourceViews.ZoneViews.RemoveResources
+        , Network.Google.Resource.ResourceViews.ZoneViews.SetService
+        , Network.Google.ResourceViews
+        , Network.Google.ResourceViews.Types
+
+    other-modules:
+          Network.Google.ResourceViews.Types.Product
+        , Network.Google.ResourceViews.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-resourceviews.nix.golden b/test/golden-test-cases/gogol-resourceviews.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-resourceviews.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-resourceviews";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Compute Engine Instance Groups SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-translate.cabal b/test/golden-test-cases/gogol-translate.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-translate.cabal
@@ -0,0 +1,48 @@
+name:                  gogol-translate
+version:               0.3.0
+synopsis:              Google Translate SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Translates text from one language to another.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v2@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Resource.Language.Detections.List
+        , Network.Google.Resource.Language.Languages.List
+        , Network.Google.Resource.Language.Translations.List
+        , Network.Google.Translate
+        , Network.Google.Translate.Types
+
+    other-modules:
+          Network.Google.Translate.Types.Product
+        , Network.Google.Translate.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-translate.nix.golden b/test/golden-test-cases/gogol-translate.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-translate.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-translate";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Translate SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-webmaster-tools.cabal b/test/golden-test-cases/gogol-webmaster-tools.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-webmaster-tools.cabal
@@ -0,0 +1,58 @@
+name:                  gogol-webmaster-tools
+version:               0.3.0
+synopsis:              Google Search Console SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    View Google Search Console data for your verified sites.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v3@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Resource.Webmasters.Searchanalytics.Query
+        , Network.Google.Resource.Webmasters.Sitemaps.Delete
+        , Network.Google.Resource.Webmasters.Sitemaps.Get
+        , Network.Google.Resource.Webmasters.Sitemaps.List
+        , Network.Google.Resource.Webmasters.Sitemaps.Submit
+        , Network.Google.Resource.Webmasters.Sites.Add
+        , Network.Google.Resource.Webmasters.Sites.Delete
+        , Network.Google.Resource.Webmasters.Sites.Get
+        , Network.Google.Resource.Webmasters.Sites.List
+        , Network.Google.Resource.Webmasters.URLCrawlErrorsSamples.Get
+        , Network.Google.Resource.Webmasters.URLCrawlErrorsSamples.List
+        , Network.Google.Resource.Webmasters.URLCrawlErrorsSamples.MarkAsFixed
+        , Network.Google.Resource.Webmasters.URLCrawlErrorscounts.Query
+        , Network.Google.WebmasterTools
+        , Network.Google.WebmasterTools.Types
+
+    other-modules:
+          Network.Google.WebmasterTools.Types.Product
+        , Network.Google.WebmasterTools.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-webmaster-tools.nix.golden b/test/golden-test-cases/gogol-webmaster-tools.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-webmaster-tools.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-webmaster-tools";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google Search Console SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/gogol-youtube.cabal b/test/golden-test-cases/gogol-youtube.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-youtube.cabal
@@ -0,0 +1,117 @@
+name:                  gogol-youtube
+version:               0.3.0
+synopsis:              Google YouTube Data SDK.
+homepage:              https://github.com/brendanhay/gogol
+bug-reports:           https://github.com/brendanhay/gogol/issues
+license:               OtherLicense
+license-file:          LICENSE
+author:                Brendan Hay
+maintainer:            Brendan Hay <brendan.g.hay@gmail.com>
+copyright:             Copyright (c) 2015-2016 Brendan Hay
+category:              Network, Google, Cloud
+build-type:            Simple
+cabal-version:         >= 1.10
+extra-source-files:    README.md src/.gitkeep
+
+description:
+    Supports core YouTube features, such as uploading videos, creating and
+    managing playlists, searching for content, and much more.
+    .
+    /Warning:/ This is an experimental prototype/preview release which is still
+    under exploratory development and not intended for public use, caveat emptor!
+    .
+    This library is compatible with version @v3@
+    of the API.
+
+source-repository head
+    type:     git
+    location: git://github.com/brendanhay/gogol.git
+
+library
+    default-language:  Haskell2010
+    hs-source-dirs:    src gen
+
+    ghc-options:       -Wall
+
+    exposed-modules:
+          Network.Google.Resource.YouTube.Activities.Insert
+        , Network.Google.Resource.YouTube.Activities.List
+        , Network.Google.Resource.YouTube.Captions.Delete
+        , Network.Google.Resource.YouTube.Captions.Download
+        , Network.Google.Resource.YouTube.Captions.Insert
+        , Network.Google.Resource.YouTube.Captions.List
+        , Network.Google.Resource.YouTube.Captions.Update
+        , Network.Google.Resource.YouTube.ChannelBanners.Insert
+        , Network.Google.Resource.YouTube.ChannelSections.Delete
+        , Network.Google.Resource.YouTube.ChannelSections.Insert
+        , Network.Google.Resource.YouTube.ChannelSections.List
+        , Network.Google.Resource.YouTube.ChannelSections.Update
+        , Network.Google.Resource.YouTube.Channels.List
+        , Network.Google.Resource.YouTube.Channels.Update
+        , Network.Google.Resource.YouTube.CommentThreads.Insert
+        , Network.Google.Resource.YouTube.CommentThreads.List
+        , Network.Google.Resource.YouTube.CommentThreads.Update
+        , Network.Google.Resource.YouTube.Comments.Delete
+        , Network.Google.Resource.YouTube.Comments.Insert
+        , Network.Google.Resource.YouTube.Comments.List
+        , Network.Google.Resource.YouTube.Comments.MarkAsSpam
+        , Network.Google.Resource.YouTube.Comments.SetModerationStatus
+        , Network.Google.Resource.YouTube.Comments.Update
+        , Network.Google.Resource.YouTube.FanFundingEvents.List
+        , Network.Google.Resource.YouTube.GuideCategories.List
+        , Network.Google.Resource.YouTube.I18nLanguages.List
+        , Network.Google.Resource.YouTube.I18nRegions.List
+        , Network.Google.Resource.YouTube.LiveBroadcasts.Bind
+        , Network.Google.Resource.YouTube.LiveBroadcasts.Control
+        , Network.Google.Resource.YouTube.LiveBroadcasts.Delete
+        , Network.Google.Resource.YouTube.LiveBroadcasts.Insert
+        , Network.Google.Resource.YouTube.LiveBroadcasts.List
+        , Network.Google.Resource.YouTube.LiveBroadcasts.Transition
+        , Network.Google.Resource.YouTube.LiveBroadcasts.Update
+        , Network.Google.Resource.YouTube.LiveChatBans.Delete
+        , Network.Google.Resource.YouTube.LiveChatBans.Insert
+        , Network.Google.Resource.YouTube.LiveChatMessages.Delete
+        , Network.Google.Resource.YouTube.LiveChatMessages.Insert
+        , Network.Google.Resource.YouTube.LiveChatMessages.List
+        , Network.Google.Resource.YouTube.LiveChatModerators.Delete
+        , Network.Google.Resource.YouTube.LiveChatModerators.Insert
+        , Network.Google.Resource.YouTube.LiveChatModerators.List
+        , Network.Google.Resource.YouTube.LiveStreams.Delete
+        , Network.Google.Resource.YouTube.LiveStreams.Insert
+        , Network.Google.Resource.YouTube.LiveStreams.List
+        , Network.Google.Resource.YouTube.LiveStreams.Update
+        , Network.Google.Resource.YouTube.PlayListItems.Delete
+        , Network.Google.Resource.YouTube.PlayListItems.Insert
+        , Network.Google.Resource.YouTube.PlayListItems.List
+        , Network.Google.Resource.YouTube.PlayListItems.Update
+        , Network.Google.Resource.YouTube.PlayLists.Delete
+        , Network.Google.Resource.YouTube.PlayLists.Insert
+        , Network.Google.Resource.YouTube.PlayLists.List
+        , Network.Google.Resource.YouTube.PlayLists.Update
+        , Network.Google.Resource.YouTube.Search.List
+        , Network.Google.Resource.YouTube.Sponsors.List
+        , Network.Google.Resource.YouTube.Subscriptions.Delete
+        , Network.Google.Resource.YouTube.Subscriptions.Insert
+        , Network.Google.Resource.YouTube.Subscriptions.List
+        , Network.Google.Resource.YouTube.Thumbnails.Set
+        , Network.Google.Resource.YouTube.VideoAbuseReportReasons.List
+        , Network.Google.Resource.YouTube.VideoCategories.List
+        , Network.Google.Resource.YouTube.Videos.Delete
+        , Network.Google.Resource.YouTube.Videos.GetRating
+        , Network.Google.Resource.YouTube.Videos.Insert
+        , Network.Google.Resource.YouTube.Videos.List
+        , Network.Google.Resource.YouTube.Videos.Rate
+        , Network.Google.Resource.YouTube.Videos.ReportAbuse
+        , Network.Google.Resource.YouTube.Videos.Update
+        , Network.Google.Resource.YouTube.Watermarks.Set
+        , Network.Google.Resource.YouTube.Watermarks.UnSet
+        , Network.Google.YouTube
+        , Network.Google.YouTube.Types
+
+    other-modules:
+          Network.Google.YouTube.Types.Product
+        , Network.Google.YouTube.Types.Sum
+
+    build-depends:
+          gogol-core == 0.3.0.*
+        , base       >= 4.7 && < 5
diff --git a/test/golden-test-cases/gogol-youtube.nix.golden b/test/golden-test-cases/gogol-youtube.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gogol-youtube.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, gogol-core }:
+mkDerivation {
+  pname = "gogol-youtube";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base gogol-core ];
+  homepage = "https://github.com/brendanhay/gogol";
+  description = "Google YouTube Data SDK";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/groundhog-mysql.cabal b/test/golden-test-cases/groundhog-mysql.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/groundhog-mysql.cabal
@@ -0,0 +1,32 @@
+name:            groundhog-mysql
+version:         0.8
+license:         BSD3
+license-file:    LICENSE
+author:          Boris Lykah <lykahb@gmail.com>
+maintainer:      Boris Lykah <lykahb@gmail.com>
+synopsis:        MySQL backend for the groundhog library.
+description:     This package uses mysql-simple and mysql
+category:        Database
+stability:       Stable
+cabal-version:   >= 1.6
+build-type:      Simple
+
+extra-source-files:
+    changelog
+
+library
+    build-depends:   base                     >= 4         && < 5
+                   , mysql-simple             >= 0.2.2.3   && < 0.5
+                   , mysql                    >= 0.1.1.3   && < 0.2
+                   , bytestring               >= 0.9
+                   , transformers             >= 0.2.1     && < 0.6
+                   , groundhog                >= 0.8       && < 0.9
+                   , monad-control            >= 0.3       && < 1.1
+                   , monad-logger             >= 0.3       && < 0.4
+                   , containers               >= 0.2
+                   , text                     >= 0.8
+                   , resource-pool            >= 0.2.1
+                   , time                     >= 1.1
+                   , resourcet                >= 1.1.2
+    exposed-modules: Database.Groundhog.MySQL
+    ghc-options:     -Wall -fno-warn-unused-do-bind
diff --git a/test/golden-test-cases/groundhog-mysql.nix.golden b/test/golden-test-cases/groundhog-mysql.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/groundhog-mysql.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, containers, fetchurl, groundhog
+, monad-control, monad-logger, mysql, mysql-simple, resource-pool
+, resourcet, text, time, transformers
+}:
+mkDerivation {
+  pname = "groundhog-mysql";
+  version = "0.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring containers groundhog monad-control monad-logger
+    mysql mysql-simple resource-pool resourcet text time transformers
+  ];
+  description = "MySQL backend for the groundhog library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/gsasl.cabal b/test/golden-test-cases/gsasl.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gsasl.cabal
@@ -0,0 +1,38 @@
+name: gsasl
+version: 0.3.6
+license: GPL-3
+license-file: license.txt
+author: John Millikin <john@john-millikin.com>
+maintainer: John Millikin <john@john-millikin.com>
+build-type: Simple
+cabal-version: >= 1.6
+category: Network
+stability: experimental
+homepage: https://john-millikin.com/software/haskell-gsasl/
+bug-reports: mailto:jmillikin@gmail.com
+
+synopsis: Bindings for GNU libgsasl
+description:
+
+source-repository head
+  type: git
+  location: https://john-millikin.com/code/haskell-gsasl/
+
+source-repository this
+  type: git
+  location: https://john-millikin.com/code/haskell-gsasl/
+  tag: haskell-gsasl_0.3.6
+
+library
+  ghc-options: -Wall -O2
+  hs-source-dirs: lib
+  c-sources: cbits/hsgsasl-shim.c
+
+  build-depends:
+      base >= 4.0 && < 5.0
+    , transformers >= 0.2
+    , bytestring >= 0.9
+
+  pkgconfig-depends: libgsasl >= 1.1
+
+  exposed-modules: Network.Protocol.SASL.GNU
diff --git a/test/golden-test-cases/gsasl.nix.golden b/test/golden-test-cases/gsasl.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/gsasl.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, bytestring, fetchurl, gsasl, transformers }:
+mkDerivation {
+  pname = "gsasl";
+  version = "0.3.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring transformers ];
+  libraryPkgconfigDepends = [ gsasl ];
+  homepage = "https://john-millikin.com/software/haskell-gsasl/";
+  description = "Bindings for GNU libgsasl";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/hOpenPGP.cabal b/test/golden-test-cases/hOpenPGP.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hOpenPGP.cabal
@@ -0,0 +1,342 @@
+Name:                hOpenPGP
+Version:             2.5.5
+Synopsis:            native Haskell implementation of OpenPGP (RFC4880)
+Description:         native Haskell implementation of OpenPGP (RFC4880), plus Camellia (RFC5581)
+Homepage:            http://floss.scru.org/hOpenPGP/
+License:             MIT
+License-file:        LICENSE
+Author:              Clint Adams
+Maintainer:          Clint Adams <clint@debian.org>
+Copyright:           2012-2016  Clint Adams
+Category:            Codec, Data
+Build-type:          Simple
+Extra-source-files: tests/suite.hs
+  , tests/data/000001-006.public_key
+  , tests/data/000002-013.user_id
+  , tests/data/000003-002.sig
+  , tests/data/000004-012.ring_trust
+  , tests/data/000005-002.sig
+  , tests/data/000006-012.ring_trust
+  , tests/data/000007-002.sig
+  , tests/data/000008-012.ring_trust
+  , tests/data/000009-002.sig
+  , tests/data/000010-012.ring_trust
+  , tests/data/000011-002.sig
+  , tests/data/000012-012.ring_trust
+  , tests/data/000013-014.public_subkey
+  , tests/data/000014-002.sig
+  , tests/data/000015-012.ring_trust
+  , tests/data/000016-006.public_key
+  , tests/data/000017-002.sig
+  , tests/data/000018-012.ring_trust
+  , tests/data/000019-013.user_id
+  , tests/data/000020-002.sig
+  , tests/data/000021-012.ring_trust
+  , tests/data/000022-002.sig
+  , tests/data/000023-012.ring_trust
+  , tests/data/000024-014.public_subkey
+  , tests/data/000025-002.sig
+  , tests/data/000026-012.ring_trust
+  , tests/data/000027-006.public_key
+  , tests/data/000028-002.sig
+  , tests/data/000029-012.ring_trust
+  , tests/data/000030-013.user_id
+  , tests/data/000031-002.sig
+  , tests/data/000032-012.ring_trust
+  , tests/data/000033-002.sig
+  , tests/data/000034-012.ring_trust
+  , tests/data/000035-006.public_key
+  , tests/data/000036-013.user_id
+  , tests/data/000037-002.sig
+  , tests/data/000038-012.ring_trust
+  , tests/data/000039-002.sig
+  , tests/data/000040-012.ring_trust
+  , tests/data/000041-017.attribute
+  , tests/data/000042-002.sig
+  , tests/data/000043-012.ring_trust
+  , tests/data/000044-014.public_subkey
+  , tests/data/000045-002.sig
+  , tests/data/000046-012.ring_trust
+  , tests/data/000047-005.secret_key
+  , tests/data/000048-013.user_id
+  , tests/data/000049-002.sig
+  , tests/data/000050-012.ring_trust
+  , tests/data/000051-007.secret_subkey
+  , tests/data/000052-002.sig
+  , tests/data/000053-012.ring_trust
+  , tests/data/000054-005.secret_key
+  , tests/data/000055-002.sig
+  , tests/data/000056-012.ring_trust
+  , tests/data/000057-013.user_id
+  , tests/data/000058-002.sig
+  , tests/data/000059-012.ring_trust
+  , tests/data/000060-007.secret_subkey
+  , tests/data/000061-002.sig
+  , tests/data/000062-012.ring_trust
+  , tests/data/000063-005.secret_key
+  , tests/data/000064-002.sig
+  , tests/data/000065-012.ring_trust
+  , tests/data/000066-013.user_id
+  , tests/data/000067-002.sig
+  , tests/data/000068-012.ring_trust
+  , tests/data/000069-005.secret_key
+  , tests/data/000070-013.user_id
+  , tests/data/000071-002.sig
+  , tests/data/000072-012.ring_trust
+  , tests/data/000073-017.attribute
+  , tests/data/000074-002.sig
+  , tests/data/000075-012.ring_trust
+  , tests/data/000076-007.secret_subkey
+  , tests/data/000077-002.sig
+  , tests/data/000078-012.ring_trust
+  , tests/data/pubring.gpg
+  , tests/data/secring.gpg
+  , tests/data/compressedsig.gpg
+  , tests/data/msg1.asc
+  , tests/data/uncompressed-ops-rsa.gpg
+  , tests/data/uncompressed-ops-dsa.gpg
+  , tests/data/uncompressed-ops-dsa-sha384.txt.gpg
+  , tests/data/encryption.gpg
+  , tests/data/compressedsig-zlib.gpg
+  , tests/data/compressedsig-bzip2.gpg
+  , tests/data/onepass_sig
+  , tests/data/simple.seckey
+  , tests/data/minimized.gpg
+  , tests/data/subkey.gpg
+  , tests/data/signing-subkey.gpg
+  , tests/data/uat.gpg
+  , tests/data/prikey-rev.gpg
+  , tests/data/subkey-rev.gpg
+  , tests/data/6F87040E.pubkey
+  , tests/data/6F87040E-cr.pubkey
+  , tests/data/v3.key
+  , tests/data/primary-binding.gpg
+  , tests/data/pki-password.txt
+  , tests/data/symmetric-password.txt
+  , tests/data/encryption-sym-aes256-s2k0.gpg
+  , tests/data/encryption-sym-aes128-s2k0.gpg
+  , tests/data/encryption-sym-aes128.gpg
+  , tests/data/encryption-sym-aes256.gpg
+  , tests/data/encryption-sym-3des-s2k0.gpg
+  , tests/data/encryption-sym-3des.gpg
+  , tests/data/encryption-sym-aes192-s2k0.gpg
+  , tests/data/encryption-sym-aes192.gpg
+  , tests/data/encryption-sym-blowfish-s2k0.gpg
+  , tests/data/encryption-sym-blowfish.gpg
+  , tests/data/encryption-sym-twofish-s2k0.gpg
+  , tests/data/encryption-sym-twofish.gpg
+  , tests/data/encryption-sym-cast5-mdc-s2k0.gpg
+  , tests/data/encryption-sym-cast5-mdc.gpg
+  , tests/data/encryption-sym-blowfish-mdc-s2k0.gpg
+  , tests/data/encryption-sym-blowfish-mdc.gpg
+  , tests/data/encryption-sym-3des-mdc-s2k0.gpg
+  , tests/data/encryption-sym-3des-mdc.gpg
+  , tests/data/encryption-sym-cast5.gpg
+  , tests/data/encryption-sym-cast5-s2k0.gpg
+  , tests/data/encryption-sym-camellia128.gpg
+  , tests/data/encryption-sym-camellia128-s2k0.gpg
+  , tests/data/encryption-sym-camellia192.gpg
+  , tests/data/encryption-sym-camellia256.gpg
+  , tests/data/16bitcksum.seckey
+  , tests/data/aes256-sha512.seckey
+  , tests/data/unencrypted.seckey
+  , tests/data/v3-genericcert.sig
+  , tests/data/revoked.pubkey
+  , tests/data/expired.pubkey
+  , tests/data/sigs-with-regexes
+  , tests/data/gnu-dummy-s2k-101-secret-key.gpg
+  , tests/data/anibal-ed25519.gpg
+
+Cabal-version:       >= 1.10
+
+flag network-uri
+   description: Get Network.URI from the network-uri package
+   default: True
+
+Library
+  Exposed-modules:     Codec.Encryption.OpenPGP.Types
+                     , Codec.Encryption.OpenPGP.CFB
+                     , Codec.Encryption.OpenPGP.Compression
+                     , Codec.Encryption.OpenPGP.Expirations
+                     , Codec.Encryption.OpenPGP.Fingerprint
+                     , Codec.Encryption.OpenPGP.KeyInfo
+                     , Codec.Encryption.OpenPGP.KeyringParser
+                     , Codec.Encryption.OpenPGP.KeySelection
+                     , Codec.Encryption.OpenPGP.Ontology
+                     , Codec.Encryption.OpenPGP.S2K
+                     , Codec.Encryption.OpenPGP.SecretKey
+                     , Codec.Encryption.OpenPGP.Serialize
+                     , Codec.Encryption.OpenPGP.Signatures
+                     , Data.Conduit.OpenPGP.Compression
+                     , Data.Conduit.OpenPGP.Decrypt
+                     , Data.Conduit.OpenPGP.Filter
+                     , Data.Conduit.OpenPGP.Keyring
+                     , Data.Conduit.OpenPGP.Keyring.Instances
+                     , Data.Conduit.OpenPGP.Verify
+  Other-Modules: Codec.Encryption.OpenPGP.Internal
+               , Codec.Encryption.OpenPGP.Internal.CryptoCipherTypes
+               , Codec.Encryption.OpenPGP.Internal.Cryptonite
+               , Codec.Encryption.OpenPGP.Internal.HOBlockCipher
+               , Codec.Encryption.OpenPGP.SerializeForSigs
+               , Codec.Encryption.OpenPGP.Types.Internal.Base
+               , Codec.Encryption.OpenPGP.Types.Internal.CryptoniteNewtypes
+               , Codec.Encryption.OpenPGP.Types.Internal.PacketClass
+               , Codec.Encryption.OpenPGP.Types.Internal.PKITypes
+               , Codec.Encryption.OpenPGP.Types.Internal.Pkt
+               , Codec.Encryption.OpenPGP.Types.Internal.TK
+               , Codec.Encryption.OpenPGP.BlockCipher
+  Build-depends: aeson
+               , attoparsec
+               , base                  > 4       && < 5
+               , base16-bytestring
+               , base64-bytestring
+               , bifunctors
+               , byteable
+               , bytestring
+               , bzlib
+               , binary                >= 0.6.4.0
+               , binary-conduit
+               , conduit               >= 0.5    && < 1.3
+               , conduit-extra         >= 1.1
+               , containers
+               , cryptonite            >= 0.5
+               , crypto-cipher-types
+               , data-default-class
+               , errors
+               , hashable
+               , incremental-parser
+               , ixset-typed
+               , lens                  >= 3.0
+               , memory
+               , monad-loops
+               , nettle
+               , newtype
+               , openpgp-asciiarmor                 >= 0.1
+               , resourcet              > 0.4
+               , securemem
+               , semigroups
+               , split
+               , text
+               , time                               >= 1.1
+               , time-locale-compat
+               , transformers
+               , unordered-containers
+               , wl-pprint-extras
+               , zlib
+  if flag(network-uri)
+    build-depends: network-uri >= 2.6, network >= 2.6
+  else
+    build-depends: network-uri < 2.6, network < 2.6
+  default-language: Haskell2010
+
+
+Test-Suite tests
+  type:       exitcode-stdio-1.0
+  main-is:    tests/suite.hs
+  other-modules: Codec.Encryption.OpenPGP.Arbitrary
+  Ghc-options: -Wall -with-rtsopts=-K1K
+  Build-depends: hOpenPGP
+               , aeson
+               , attoparsec
+               , base                  > 4       && < 5
+               , base16-bytestring
+               , bifunctors
+               , byteable
+               , bytestring
+               , bzlib
+               , binary                >= 0.6.4.0
+               , binary-conduit
+               , conduit
+               , conduit-extra
+               , containers
+               , cryptonite            >= 0.5
+               , crypto-cipher-types
+               , data-default-class
+               , errors
+               , hashable
+               , incremental-parser
+               , ixset-typed
+               , lens                  >= 3.0
+               , memory
+               , monad-loops
+               , nettle
+               , newtype
+               , securemem
+               , semigroups
+               , split
+               , text
+               , time                               >= 1.1
+               , time-locale-compat
+               , transformers
+               , unordered-containers
+               , wl-pprint-extras
+               , zlib
+               , tasty
+               , tasty-hunit
+               , tasty-quickcheck
+               , QuickCheck
+               , quickcheck-instances
+               , resourcet              > 0.4
+  if flag(network-uri)
+    build-depends: network-uri >= 2.6, network >= 2.6
+  else
+    build-depends: network-uri < 2.6, network < 2.6
+  default-language: Haskell2010
+
+Benchmark benchmark
+  type:       exitcode-stdio-1.0
+  main-is:    bench/mark.hs
+  Ghc-options: -Wall
+  Build-depends: hOpenPGP
+               , aeson
+               , base                  > 4       && < 5
+               , base16-bytestring
+               , base64-bytestring
+               , bifunctors
+               , byteable
+               , bytestring
+               , bzlib
+               , binary                >= 0.6.4.0
+               , binary-conduit
+               , conduit               >= 0.5    && < 1.3
+               , conduit-extra         >= 1.1
+               , containers
+               , cryptonite            >= 0.5
+               , crypto-cipher-types
+               , data-default-class
+               , errors
+               , hashable
+               , incremental-parser
+               , ixset-typed
+               , lens                  >= 3.0
+               , memory
+               , monad-loops
+               , nettle
+               , newtype
+               , openpgp-asciiarmor                 >= 0.1
+               , resourcet              > 0.4
+               , securemem
+               , semigroups
+               , split
+               , text
+               , time                               >= 1.1
+               , time-locale-compat
+               , transformers
+               , unordered-containers
+               , wl-pprint-extras
+               , zlib
+               , criterion             > 0.8
+  if flag(network-uri)
+    build-depends: network-uri >= 2.6, network >= 2.6
+  else
+    build-depends: network-uri < 2.6, network < 2.6
+  default-language: Haskell2010
+
+source-repository head
+  type:     git
+  location: git://git.debian.org/users/clint/hOpenPGP.git
+
+source-repository this
+  type:     git
+  location: git://git.debian.org/users/clint/hOpenPGP.git
+  tag:      v2.5.5
diff --git a/test/golden-test-cases/hOpenPGP.nix.golden b/test/golden-test-cases/hOpenPGP.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hOpenPGP.nix.golden
@@ -0,0 +1,52 @@
+{ mkDerivation, aeson, attoparsec, base, base16-bytestring
+, base64-bytestring, bifunctors, binary, binary-conduit, byteable
+, bytestring, bzlib, conduit, conduit-extra, containers, criterion
+, crypto-cipher-types, cryptonite, data-default-class, errors
+, fetchurl, hashable, incremental-parser, ixset-typed, lens, memory
+, monad-loops, nettle, network, network-uri, newtype
+, openpgp-asciiarmor, QuickCheck, quickcheck-instances, resourcet
+, securemem, semigroups, split, tasty, tasty-hunit
+, tasty-quickcheck, text, time, time-locale-compat, transformers
+, unordered-containers, wl-pprint-extras, zlib
+}:
+mkDerivation {
+  pname = "hOpenPGP";
+  version = "2.5.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson attoparsec base base16-bytestring base64-bytestring
+    bifunctors binary binary-conduit byteable bytestring bzlib conduit
+    conduit-extra containers crypto-cipher-types cryptonite
+    data-default-class errors hashable incremental-parser ixset-typed
+    lens memory monad-loops nettle network network-uri newtype
+    openpgp-asciiarmor resourcet securemem semigroups split text time
+    time-locale-compat transformers unordered-containers
+    wl-pprint-extras zlib
+  ];
+  testHaskellDepends = [
+    aeson attoparsec base base16-bytestring bifunctors binary
+    binary-conduit byteable bytestring bzlib conduit conduit-extra
+    containers crypto-cipher-types cryptonite data-default-class errors
+    hashable incremental-parser ixset-typed lens memory monad-loops
+    nettle network network-uri newtype QuickCheck quickcheck-instances
+    resourcet securemem semigroups split tasty tasty-hunit
+    tasty-quickcheck text time time-locale-compat transformers
+    unordered-containers wl-pprint-extras zlib
+  ];
+  benchmarkHaskellDepends = [
+    aeson base base16-bytestring base64-bytestring bifunctors binary
+    binary-conduit byteable bytestring bzlib conduit conduit-extra
+    containers criterion crypto-cipher-types cryptonite
+    data-default-class errors hashable incremental-parser ixset-typed
+    lens memory monad-loops nettle network network-uri newtype
+    openpgp-asciiarmor resourcet securemem semigroups split text time
+    time-locale-compat transformers unordered-containers
+    wl-pprint-extras zlib
+  ];
+  homepage = "http://floss.scru.org/hOpenPGP/";
+  description = "native Haskell implementation of OpenPGP (RFC4880)";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/hPDB-examples.cabal b/test/golden-test-cases/hPDB-examples.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hPDB-examples.cabal
@@ -0,0 +1,97 @@
+name:                hPDB-examples
+version:             1.2.0.8
+synopsis:            Examples for hPDB library
+stability:           stable
+homepage:            https://github.com/BioHaskell/hPDB-examples
+package-url:         http://hackage.haskell.org/package/hPDB
+description:         Examples for handling Protein Data Bank file format.
+category:            Bioinformatics 
+license:             BSD3
+license-file:        LICENSE
+
+author:              Michal J. Gajda
+copyright:           Copyright by Michal J. Gajda '2009-'2013
+maintainer:          mjgajda@googlemail.com
+bug-reports:         mailto:mjgajda@googlemail.com
+
+build-type:          Simple
+cabal-version:       >=1.8
+tested-with:         GHC==7.4.2, GHC==7.6.3, GHC==7.8.4,GHC==7.10.3,GHC==8.0.1,GHC==8.2.2
+--data-files:          1CRN.pdb, 1HTQ.pdb, 3JYV.pdb
+extra-source-files:  README.md INSTALL AUTHORS
+
+source-repository head
+  type:     git
+  location: https://github.com/BioHaskell/hPDB-examples.git
+
+Executable PDB2Fasta
+  main-is:          examples/PDB2Fasta.hs
+  ghc-options:      -fspec-constr-count=4 -O3 -threaded -rtsopts -with-rtsopts=-N
+  build-depends:    base>=4.0, base <4.11, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, iterable >=3.0
+  other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
+
+Executable ShiftToCenter
+  main-is:          examples/ShiftToCenter.hs
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  build-depends:    base>=4.0, base<4.11, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, bytestring, iterable >=1.0
+  other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
+
+Executable CleanPDB
+  main-is:          examples/CleanPDB.hs
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  build-depends:    base>=4.0, base <4.11, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, iterable >=1.0
+  other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
+
+Executable SplitModels
+  main-is:          examples/SplitModels.hs
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  build-depends:    base>=4.0, base <4.11, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, bytestring, iterable >=1.0
+  other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
+
+Executable CanonicalAxes
+  main-is:          examples/CanonicalAxes.hs
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  Build-depends:    base>=4.0, base <4.11, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, iterable >=1.0
+  other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
+
+Executable PrintEvents
+  Main-is:           tests/PrintEvents.hs
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  Build-depends:    base>=4.0, base <4.11, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, iterable >=1.0
+  other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
+
+Executable PrintStructureObject
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  Build-depends:    base>=4.0, base <4.11, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, iterable >=1.0
+  Main-is:          tests/PrintStructureObject.hs
+  other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
+
+Executable Rg
+  main-is:           examples/Rg.hs
+  ghc-options:      -fspec-constr-count=4 -O3 -threaded -rtsopts -with-rtsopts=-N
+                    -fsimpl-tick-factor=150
+  -- ^ To avoid difficulties with GHC 7.10.1:
+  -- https://ghc.haskell.org/trac/ghc/ticket/10565
+  Build-depends:    base>=4.0, base <4.11, ghc-prim, bytestring, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 1.2, iterable >=1.0
+  other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
+
+Executable StericClashCheck
+  main-is:           examples/StericClashCheck.hs
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  Build-Depends:     base>=4.0, base<4.11, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, Octree >= 0.5, QuickCheck, text, text-format, hPDB >= 1.2, iterable >=1.0
+  other-extensions:        ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls
+
+-- if flag(haveOpenGL) -- why can't we make it conditionally available?
+Executable Viewer
+  main-is:          examples/Viewer.hs
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts -with-rtsopts=-N
+  Build-depends:    base>=4.0, base <4.11, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq,QuickCheck >= 2.5.0.0, text>=0.11.1.13, OpenGL, GLUT, hPDB >= 1.2, bytestring, iterable >=1.0
+  other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
+
+test-suite ParserPerformance
+  main-is:          tests/TestParser.hs
+  type:             exitcode-stdio-1.0
+  ghc-options:      -fspec-constr-count=4 -O3  -threaded -rtsopts "-with-rtsopts=-N -t"
+  Build-depends:    base>=4.0, base <4.11, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, text>=0.11.1.13, hPDB >= 1.2, bytestring, iterable >=1.0, IfElse >= 0.80, process >= 1.0, time >= 1.2
+  other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
+
diff --git a/test/golden-test-cases/hPDB-examples.nix.golden b/test/golden-test-cases/hPDB-examples.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hPDB-examples.nix.golden
@@ -0,0 +1,27 @@
+{ mkDerivation, AC-Vector, base, bytestring, containers, deepseq
+, directory, fetchurl, ghc-prim, GLUT, hPDB, IfElse, iterable, mtl
+, Octree, OpenGL, process, QuickCheck, template-haskell, text
+, text-format, time, vector
+}:
+mkDerivation {
+  pname = "hPDB-examples";
+  version = "1.2.0.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  executableHaskellDepends = [
+    AC-Vector base bytestring containers deepseq directory ghc-prim
+    GLUT hPDB iterable mtl Octree OpenGL QuickCheck template-haskell
+    text text-format vector
+  ];
+  testHaskellDepends = [
+    AC-Vector base bytestring containers deepseq directory ghc-prim
+    hPDB IfElse iterable mtl process template-haskell text time vector
+  ];
+  homepage = "https://github.com/BioHaskell/hPDB-examples";
+  description = "Examples for hPDB library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hakyll.cabal b/test/golden-test-cases/hakyll.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hakyll.cabal
@@ -0,0 +1,321 @@
+Name:    hakyll
+Version: 4.10.0.0
+
+Synopsis: A static website compiler library
+Description:
+  Hakyll is a static website compiler library. It provides you with the tools to
+  create a simple or advanced static website using a Haskell DSL and formats
+  such as markdown or RST. You can find more information, including a tutorial,
+  on the website:
+
+  .
+
+  * <http://jaspervdj.be/hakyll>
+
+  .
+
+  If you seek assistance, there's:
+
+  .
+
+  * A google group: <http://groups.google.com/group/hakyll>
+
+  .
+
+  * An IRC channel, @#hakyll@ on freenode
+
+  .
+
+  Additionally, there's the Haddock documentation in the different modules,
+  meant as a reference.
+
+Author:       Jasper Van der Jeugt <m@jaspervdj.be>
+Maintainer:   Jasper Van der Jeugt <m@jaspervdj.be>
+Homepage:     http://jaspervdj.be/hakyll
+Bug-Reports:  http://github.com/jaspervdj/Hakyll/issues
+License:      BSD3
+License-File: LICENSE
+Category:     Web
+
+Cabal-Version: >= 1.8
+Build-Type:    Simple
+Data-Dir:      data
+
+Data-files:
+  example/posts/2015-11-28-carpe-diem.markdown
+  example/posts/2015-10-07-rosa-rosa-rosam.markdown
+  example/posts/2015-12-07-tu-quoque.markdown
+  example/posts/2015-08-12-spqr.markdown
+  example/site.hs
+  example/images/haskell-logo.png
+  example/templates/post-list.html
+  example/templates/default.html
+  example/templates/archive.html
+  example/templates/post.html
+  example/css/default.css
+  example/index.html
+  example/about.rst
+  example/contact.markdown
+  templates/atom-item.xml
+  templates/atom.xml
+  templates/rss-item.xml
+  templates/rss.xml
+
+Extra-source-files:
+  CHANGELOG.md
+  tests/data/example.md
+  tests/data/example.md.metadata
+  tests/data/images/favicon.ico
+  tests/data/just-meta.html
+  tests/data/just-meta.html.out
+  tests/data/partial-helper.html
+  tests/data/partial.html
+  tests/data/partial.html.out
+  tests/data/posts/2010-08-26-birthday.md
+  tests/data/russian.md
+  tests/data/strip.html
+  tests/data/strip.html.out
+  tests/data/template.html
+  tests/data/template.html.out
+
+Source-Repository head
+  Type:     git
+  Location: git://github.com/jaspervdj/hakyll.git
+
+Flag previewServer
+  Description: Include the preview server
+  Default:     True
+
+Flag watchServer
+  Description: Include the watch server
+  Default:     True
+
+Flag checkExternal
+  Description: Include external link checking
+  Default:     True
+
+Library
+  Ghc-Options:    -Wall
+  Hs-Source-Dirs: lib
+
+  Exposed-Modules:
+    Hakyll
+    Hakyll.Commands
+    Hakyll.Core.Compiler
+    Hakyll.Core.Compiler.Internal
+    Hakyll.Core.Configuration
+    Hakyll.Core.Dependencies
+    Hakyll.Core.File
+    Hakyll.Core.Identifier
+    Hakyll.Core.Identifier.Pattern
+    Hakyll.Core.Item
+    Hakyll.Core.Logger
+    Hakyll.Core.Metadata
+    Hakyll.Core.Provider
+    Hakyll.Core.Provider.Metadata
+    Hakyll.Core.Routes
+    Hakyll.Core.Rules
+    Hakyll.Core.Rules.Internal
+    Hakyll.Core.Runtime
+    Hakyll.Core.Store
+    Hakyll.Core.UnixFilter
+    Hakyll.Core.Util.File
+    Hakyll.Core.Util.String
+    Hakyll.Core.Writable
+    Hakyll.Main
+    Hakyll.Web.CompressCss
+    Hakyll.Web.Feed
+    Hakyll.Web.Html
+    Hakyll.Web.Html.RelativizeUrls
+    Hakyll.Web.Paginate
+    Hakyll.Web.Pandoc
+    Hakyll.Web.Pandoc.Biblio
+    Hakyll.Web.Pandoc.FileType
+    Hakyll.Web.Redirect
+    Hakyll.Web.Tags
+    Hakyll.Web.Template
+    Hakyll.Web.Template.Context
+    Hakyll.Web.Template.Internal
+    Hakyll.Web.Template.Internal.Element
+    Hakyll.Web.Template.Internal.Trim
+    Hakyll.Web.Template.List
+
+  Other-Modules:
+    Data.List.Extended
+    Data.Yaml.Extended
+    Hakyll.Check
+    Hakyll.Core.Compiler.Require
+    Hakyll.Core.Item.SomeItem
+    Hakyll.Core.Provider.Internal
+    Hakyll.Core.Provider.MetadataCache
+    Hakyll.Core.Util.Parser
+    Hakyll.Web.Pandoc.Binary
+    Paths_hakyll
+
+  Build-Depends:
+    base                 >= 4.8      && < 5,
+    binary               >= 0.5      && < 0.9,
+    blaze-html           >= 0.5      && < 0.10,
+    blaze-markup         >= 0.5.1    && < 0.9,
+    bytestring           >= 0.9      && < 0.11,
+    containers           >= 0.3      && < 0.6,
+    cryptohash           >= 0.7      && < 0.12,
+    data-default         >= 0.4      && < 0.8,
+    deepseq              >= 1.3      && < 1.5,
+    directory            >= 1.0      && < 1.4,
+    filepath             >= 1.0      && < 1.5,
+    lrucache             >= 1.1.1    && < 1.3,
+    mtl                  >= 1        && < 2.3,
+    network              >= 2.6      && < 2.7,
+    network-uri          >= 2.6      && < 2.7,
+    pandoc               >= 2.0.5    && < 2.1,
+    pandoc-citeproc      >= 0.12.1.1 && < 0.13,
+    parsec               >= 3.0      && < 3.2,
+    process              >= 1.6      && < 1.7,
+    random               >= 1.0      && < 1.2,
+    regex-base           >= 0.93     && < 0.94,
+    regex-tdfa           >= 1.1      && < 1.3,
+    resourcet            >= 1.1      && < 1.2,
+    scientific           >= 0.3.4    && < 0.4,
+    tagsoup              >= 0.13.1   && < 0.15,
+    text                 >= 0.11     && < 1.3,
+    time                 >= 1.8      && < 1.9,
+    time-locale-compat   >= 0.1      && < 0.2,
+    unordered-containers >= 0.2      && < 0.3,
+    vector               >= 0.11     && < 0.13,
+    yaml                 >= 0.8.11   && < 0.9,
+    optparse-applicative >= 0.12     && < 0.15
+
+  If flag(previewServer)
+    Build-depends:
+      wai             >= 3.2   && < 3.3,
+      warp            >= 3.2   && < 3.3,
+      wai-app-static  >= 3.1   && < 3.2,
+      http-types      >= 0.9   && < 0.10,
+      fsnotify        >= 0.2   && < 0.3,
+      system-filepath >= 0.4.6 && <= 0.5
+    Cpp-options:
+      -DPREVIEW_SERVER
+    Other-modules:
+      Hakyll.Preview.Poll
+      Hakyll.Preview.Server
+
+  If flag(watchServer)
+    Build-depends:
+      fsnotify        >= 0.2   && < 0.3,
+      system-filepath >= 0.4.6 && <= 0.5
+    Cpp-options:
+      -DWATCH_SERVER
+    Other-modules:
+      Hakyll.Preview.Poll
+
+  If flag(checkExternal)
+    Build-depends:
+      http-conduit >= 2.2    && < 2.3,
+      http-types   >= 0.7    && < 0.10
+    Cpp-options:
+      -DCHECK_EXTERNAL
+
+Test-suite hakyll-tests
+  Type:           exitcode-stdio-1.0
+  Hs-source-dirs: tests
+  Main-is:        TestSuite.hs
+  Ghc-options:    -Wall
+
+  Other-modules:
+    Hakyll.Core.Dependencies.Tests
+    Hakyll.Core.Identifier.Tests
+    Hakyll.Core.Provider.Metadata.Tests
+    Hakyll.Core.Provider.Tests
+    Hakyll.Core.Routes.Tests
+    Hakyll.Core.Rules.Tests
+    Hakyll.Core.Runtime.Tests
+    Hakyll.Core.Store.Tests
+    Hakyll.Core.UnixFilter.Tests
+    Hakyll.Core.Util.String.Tests
+    Hakyll.Web.CompressCss.Tests
+    Hakyll.Web.Html.RelativizeUrls.Tests
+    Hakyll.Web.Html.Tests
+    Hakyll.Web.Pandoc.FileType.Tests
+    Hakyll.Web.Template.Context.Tests
+    Hakyll.Web.Template.Tests
+    TestSuite.Util
+
+  Build-Depends:
+    hakyll,
+    QuickCheck                 >= 2.8  && < 2.11,
+    tasty                      >= 0.11 && < 0.12,
+    tasty-hunit                >= 0.9  && < 0.10,
+    tasty-quickcheck           >= 0.8  && < 0.10,
+    -- Copy pasted from hakyll dependencies:
+    base                 >= 4.8      && < 5,
+    binary               >= 0.5      && < 0.9,
+    blaze-html           >= 0.5      && < 0.10,
+    blaze-markup         >= 0.5.1    && < 0.9,
+    bytestring           >= 0.9      && < 0.11,
+    containers           >= 0.3      && < 0.6,
+    cryptohash           >= 0.7      && < 0.12,
+    data-default         >= 0.4      && < 0.8,
+    deepseq              >= 1.3      && < 1.5,
+    directory            >= 1.0      && < 1.4,
+    filepath             >= 1.0      && < 1.5,
+    lrucache             >= 1.1.1    && < 1.3,
+    mtl                  >= 1        && < 2.3,
+    network              >= 2.6      && < 2.7,
+    network-uri          >= 2.6      && < 2.7,
+    pandoc               >= 2.0.5    && < 2.1,
+    pandoc-citeproc      >= 0.12.1.1 && < 0.13,
+    parsec               >= 3.0      && < 3.2,
+    process              >= 1.6      && < 1.7,
+    random               >= 1.0      && < 1.2,
+    regex-base           >= 0.93     && < 0.94,
+    regex-tdfa           >= 1.1      && < 1.3,
+    resourcet            >= 1.1      && < 1.2,
+    scientific           >= 0.3.4    && < 0.4,
+    tagsoup              >= 0.13.1   && < 0.15,
+    text                 >= 0.11     && < 1.3,
+    time                 >= 1.8      && < 1.9,
+    time-locale-compat   >= 0.1      && < 0.2,
+    unordered-containers >= 0.2      && < 0.3,
+    vector               >= 0.11     && < 0.13,
+    yaml                 >= 0.8.11   && < 0.9,
+    optparse-applicative >= 0.12     && < 0.15
+
+  If flag(previewServer)
+    Build-depends:
+      wai             >= 3.2   && < 3.3,
+      warp            >= 3.2   && < 3.3,
+      wai-app-static  >= 3.1   && < 3.2,
+      http-types      >= 0.9   && < 0.10,
+      fsnotify        >= 0.2   && < 0.3,
+      system-filepath >= 0.4.6 && <= 0.5
+    Cpp-options:
+      -DPREVIEW_SERVER
+
+  If flag(watchServer)
+    Build-depends:
+      fsnotify        >= 0.2   && < 0.3,
+      system-filepath >= 0.4.6 && <= 0.5
+    Cpp-options:
+      -DWATCH_SERVER
+
+  If flag(checkExternal)
+    Build-depends:
+      http-conduit >= 2.2    && < 2.3,
+      http-types   >= 0.7    && < 0.10
+    Cpp-options:
+      -DCHECK_EXTERNAL
+
+Executable hakyll-init
+  Ghc-options:    -Wall
+  Hs-source-dirs: src
+  Main-is:        Init.hs
+
+  Other-modules:
+    Paths_hakyll
+
+  Build-depends:
+    hakyll,
+    base      >= 4   && < 5,
+    directory >= 1.0 && < 1.4,
+    filepath  >= 1.0 && < 1.5
diff --git a/test/golden-test-cases/hakyll.nix.golden b/test/golden-test-cases/hakyll.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hakyll.nix.golden
@@ -0,0 +1,45 @@
+{ mkDerivation, base, binary, blaze-html, blaze-markup, bytestring
+, containers, cryptohash, data-default, deepseq, directory
+, fetchurl, filepath, fsnotify, http-conduit, http-types, lrucache
+, mtl, network, network-uri, optparse-applicative, pandoc
+, pandoc-citeproc, parsec, process, QuickCheck, random, regex-base
+, regex-tdfa, resourcet, scientific, system-filepath, tagsoup
+, tasty, tasty-hunit, tasty-quickcheck, text, time
+, time-locale-compat, unordered-containers, utillinux, vector, wai
+, wai-app-static, warp, yaml
+}:
+mkDerivation {
+  pname = "hakyll";
+  version = "4.10.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    base binary blaze-html blaze-markup bytestring containers
+    cryptohash data-default deepseq directory filepath fsnotify
+    http-conduit http-types lrucache mtl network network-uri
+    optparse-applicative pandoc pandoc-citeproc parsec process random
+    regex-base regex-tdfa resourcet scientific system-filepath tagsoup
+    text time time-locale-compat unordered-containers vector wai
+    wai-app-static warp yaml
+  ];
+  executableHaskellDepends = [ base directory filepath ];
+  testHaskellDepends = [
+    base binary blaze-html blaze-markup bytestring containers
+    cryptohash data-default deepseq directory filepath fsnotify
+    http-conduit http-types lrucache mtl network network-uri
+    optparse-applicative pandoc pandoc-citeproc parsec process
+    QuickCheck random regex-base regex-tdfa resourcet scientific
+    system-filepath tagsoup tasty tasty-hunit tasty-quickcheck text
+    time time-locale-compat unordered-containers vector wai
+    wai-app-static warp yaml
+  ];
+  testToolDepends = [ utillinux ];
+  homepage = "http://jaspervdj.be/hakyll";
+  description = "A static website compiler library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/happstack-hsp.cabal b/test/golden-test-cases/happstack-hsp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/happstack-hsp.cabal
@@ -0,0 +1,37 @@
+Name:                happstack-hsp
+Version:             7.3.7.3
+Synopsis:            Support for using HSP templates in Happstack
+Description:         Happstack is a web application framework. HSP is an XML templating solution. This package makes it easy to use HSP templates with Happstack.
+Homepage:            http://www.happstack.com/
+License:             BSD3
+License-file:        LICENSE
+Author:              Jeremy Shaw
+Maintainer:          Happstack team <happs@googlegroups.com>
+Copyright:           2011-2015 Jeremy Shaw
+Category:            Web, Happstack
+Build-type:          Simple
+Cabal-version:       >=1.6
+tested-with:         GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+
+source-repository head
+    type:     git
+    location: https://github.com/Happstack/happstack-hsp.git
+
+Library
+  Hs-source-dirs:      src
+
+  Exposed-modules:     Happstack.Server.HSP.HTML
+                       Happstack.Server.XMLGenT
+                       HSP.ServerPartT
+                       HSP.Google.Analytics
+
+  Build-depends:       base             >= 3.0 && < 5.0,
+                       bytestring       >= 0.9 && < 0.11,
+                       happstack-server >= 6.0 && < 7.6,
+                       harp             >= 0.4 && < 0.5,
+                       hsp              >= 0.9.2 && < 0.11,
+                       hsx2hs           >= 0.13.0 && < 0.15,
+                       mtl              >= 1.1 && < 2.3,
+                       utf8-string      >= 0.3 && < 1.1,
+                       syb              >= 0.3 && < 0.8,
+                       text             >= 0.10 && < 1.3
diff --git a/test/golden-test-cases/happstack-hsp.nix.golden b/test/golden-test-cases/happstack-hsp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/happstack-hsp.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, fetchurl, happstack-server, harp
+, hsp, hsx2hs, mtl, syb, text, utf8-string
+}:
+mkDerivation {
+  pname = "happstack-hsp";
+  version = "7.3.7.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring happstack-server harp hsp hsx2hs mtl syb text
+    utf8-string
+  ];
+  homepage = "http://www.happstack.com/";
+  description = "Support for using HSP templates in Happstack";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/happy.cabal b/test/golden-test-cases/happy.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/happy.cabal
@@ -0,0 +1,180 @@
+name: happy
+version: 1.19.8
+license: BSD2
+license-file: LICENSE
+copyright: (c) Andy Gill, Simon Marlow
+author: Andy Gill and Simon Marlow
+maintainer: Simon Marlow <marlowsd@gmail.com>
+bug-reports: https://github.com/simonmar/happy/issues
+stability: stable
+homepage: https://www.haskell.org/happy/
+synopsis: Happy is a parser generator for Haskell
+category: Development
+cabal-version: >= 1.8
+build-type: Custom
+
+Description:
+  Happy is a parser generator for Haskell.  Given a grammar
+  specification in BNF, Happy generates Haskell code to parse the
+  grammar.  Happy works in a similar way to the @yacc@ tool for C.
+
+tested-with:  GHC==8.0.1, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
+
+extra-source-files:
+	ANNOUNCE
+	CHANGES
+	Makefile
+	README.md
+	TODO
+	doc/Makefile
+	doc/aclocal.m4
+	doc/config.mk.in
+	doc/configure.ac
+	doc/docbook-xml.mk
+	doc/fptools.css
+	doc/happy.1.in
+	doc/happy.xml
+	examples/glr/nlp/Main.lhs
+	examples/glr/nlp/Makefile
+	examples/glr/nlp/README
+	examples/glr/nlp/English.y
+	examples/glr/nlp/Hugs.lhs
+	examples/glr/Makefile
+	examples/glr/Makefile.defs
+	examples/glr/expr-eval/Main.lhs
+	examples/glr/expr-eval/Makefile
+	examples/glr/expr-eval/Expr.y
+	examples/glr/expr-eval/README
+	examples/glr/expr-eval/Hugs.lhs
+	examples/glr/expr-tree/Main.lhs
+	examples/glr/expr-tree/Makefile
+	examples/glr/expr-tree/Expr.y
+	examples/glr/expr-tree/README
+	examples/glr/expr-tree/Tree.lhs
+	examples/glr/expr-tree/Hugs.lhs
+	examples/glr/highly-ambiguous/Main.lhs
+	examples/glr/highly-ambiguous/Makefile
+	examples/glr/highly-ambiguous/Expr.y
+	examples/glr/highly-ambiguous/README
+	examples/glr/highly-ambiguous/Hugs.lhs
+	examples/glr/hidden-leftrec/Main.lhs
+	examples/glr/hidden-leftrec/Makefile
+	examples/glr/hidden-leftrec/Expr.y
+	examples/glr/hidden-leftrec/README
+	examples/glr/hidden-leftrec/Hugs.lhs
+	examples/glr/expr-monad/Main.lhs
+	examples/glr/expr-monad/Makefile
+	examples/glr/expr-monad/Expr.y
+	examples/glr/expr-monad/README
+	examples/glr/expr-monad/Hugs.lhs
+	examples/glr/bio-eg/Main.lhs
+	examples/glr/bio-eg/Makefile
+	examples/glr/bio-eg/Bio.y
+	examples/glr/bio-eg/README
+	examples/glr/bio-eg/1-1200.dna
+	examples/glr/bio-eg/1-600.dna
+	examples/glr/common/DV_lhs
+	examples/glr/common/DaVinciTypes.hs
+	examples/glr/packing/Main.lhs
+	examples/glr/packing/Makefile
+	examples/glr/packing/Expr.y
+	examples/glr/packing/README
+	examples/glr/packing/Hugs.lhs
+	examples/PgnParser.ly
+	examples/MonadTest.ly
+	examples/igloo/ParserM.hs
+	examples/igloo/Makefile
+	examples/igloo/Parser.y
+	examples/igloo/Foo.hs
+	examples/igloo/README
+	examples/igloo/Lexer.x
+	examples/README
+	examples/Calc.ly
+	examples/DavesExample.ly
+	examples/ErrorTest.ly
+	examples/ErlParser.ly
+	examples/SimonsExample.ly
+	examples/LexerTest.ly
+	happy.spec
+	src/ARRAY-NOTES
+	templates/GLR_Base.hs
+	templates/GenericTemplate.hs
+	templates/GLR_Lib.hs
+	tests/AttrGrammar001.y
+	tests/AttrGrammar002.y
+	tests/Makefile
+	tests/Partial.ly
+	tests/Test.ly
+	tests/TestMulti.ly
+	tests/TestPrecedence.ly
+	tests/bogus-token.y
+	tests/bug001.ly
+	tests/bug002.y
+	tests/error001.stderr
+	tests/error001.stdout
+	tests/error001.y
+	tests/monad001.y
+	tests/monad002.ly
+	tests/monaderror.y
+	tests/precedence001.ly
+	tests/precedence002.y
+	tests/test_rules.y
+        tests/issue91.y
+        tests/issue93.y
+        tests/issue94.y
+        tests/issue95.y
+        tests/monaderror-explist.y
+        tests/typeclass_monad001.y
+        tests/typeclass_monad002.ly
+        tests/typeclass_monad_lexer.y
+
+custom-setup
+  setup-depends: Cabal <2.1,
+                 base <5,
+                 directory <1.4,
+                 filepath <1.5
+
+source-repository head
+  type:     git
+  location: https://github.com/simonmar/happy.git
+
+flag small_base
+  description: Deprecated. Does nothing.
+
+executable happy
+  hs-source-dirs: src
+  main-is: Main.lhs
+
+  build-depends: base < 5,
+                 array,
+                 containers >= 0.4.2,
+                 mtl >= 2.2.1
+                     -- mtl-2.2.1 added Control.Monad.Except
+
+  extensions: CPP, MagicHash, FlexibleContexts
+  ghc-options: -Wall
+  other-modules:
+        AbsSyn
+        First
+        GenUtils
+        Grammar
+        Info
+        LALR
+        Lexer
+        Main
+        ParseMonad
+        Parser
+        ProduceCode
+        ProduceGLRCode
+        NameSet
+        Target
+        AttrGrammar
+        AttrGrammarParser
+        ParamRules
+        PrettyGrammar
+
+test-suite tests
+  type: exitcode-stdio-1.0
+  main-is: test.hs
+  build-depends: base, process
+
diff --git a/test/golden-test-cases/happy.nix.golden b/test/golden-test-cases/happy.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/happy.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, array, base, Cabal, containers, directory, fetchurl
+, filepath, mtl, process
+}:
+mkDerivation {
+  pname = "happy";
+  version = "1.19.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  setupHaskellDepends = [ base Cabal directory filepath ];
+  executableHaskellDepends = [ array base containers mtl ];
+  testHaskellDepends = [ base process ];
+  homepage = "https://www.haskell.org/happy/";
+  description = "Happy is a parser generator for Haskell";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/harp.cabal b/test/golden-test-cases/harp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/harp.cabal
@@ -0,0 +1,31 @@
+Name:                   harp
+Version:                0.4.3
+License:                BSD3
+License-File:           LICENSE
+Author:                 Niklas Broberg
+Maintainer:             David Fox <dsf@seereason.com>
+
+Stability:              Experimental
+Category:               Language
+Synopsis:               HaRP allows pattern-matching with regular expressions
+Description:            HaRP, or Haskell Regular Patterns, is a Haskell extension
+                        that extends the normal pattern matching facility with
+                        the power of regular expressions. This expressive power
+                        is highly useful in a wide range of areas, including text parsing
+                        and XML processing. Regular expression patterns in HaRP work over
+                        ordinary Haskell lists ([]) of arbitrary type. We have implemented
+                        HaRP as a pre-processor to ordinary Haskell.
+                        .
+                        For details on usage, please see the website.
+Homepage:               https://github.com/seereason/harp
+Build-Type:             Simple
+tested-with:            GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC==8.0.1
+Cabal-Version:           >= 1.8
+
+source-repository head
+    type:     git
+    location: https://github.com/seereason/harp.git
+
+Library
+    Build-Depends:          base < 4.11
+    Exposed-modules:        Harp.Match
diff --git a/test/golden-test-cases/harp.nix.golden b/test/golden-test-cases/harp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/harp.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "harp";
+  version = "0.4.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/seereason/harp";
+  description = "HaRP allows pattern-matching with regular expressions";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hashtables.cabal b/test/golden-test-cases/hashtables.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hashtables.cabal
@@ -0,0 +1,199 @@
+Name:                hashtables
+Version:             1.2.2.1
+Synopsis:            Mutable hash tables in the ST monad
+Homepage:            http://github.com/gregorycollins/hashtables
+License:             BSD3
+License-file:        LICENSE
+Author:              Gregory Collins
+Maintainer:          greg@gregorycollins.net
+Copyright:           (c) 2011-2014, Google, Inc., 2016-present contributors
+Category:            Data
+Build-type:          Simple
+Cabal-version:       >= 1.8
+
+Description:
+  This package provides a couple of different implementations of mutable hash
+  tables in the ST monad, as well as a typeclass abstracting their common
+  operations, and a set of wrappers to use the hash tables in the IO monad.
+  .
+  /QUICK START/: documentation for the hash table operations is provided in the
+  "Data.HashTable.Class" module, and the IO wrappers (which most users will
+  probably prefer) are located in the "Data.HashTable.IO" module.
+  .
+  This package currently contains three hash table implementations:
+  .
+    1. "Data.HashTable.ST.Cuckoo" contains an implementation of \"cuckoo
+       hashing\" as introduced by Pagh and Rodler in 2001 (see
+       <http://en.wikipedia.org/wiki/Cuckoo_hashing>). Cuckoo hashing has
+       worst-case /O(1)/ lookups and can reach a high \"load factor\", in which
+       the table can perform acceptably well even when approaching 90% full.
+       Randomized testing shows this implementation of cuckoo hashing to be
+       slightly faster on insert and slightly slower on lookup than
+       "Data.Hashtable.ST.Basic", while being more space efficient by about a
+       half-word per key-value mapping. Cuckoo hashing, like the basic hash
+       table implementation using linear probing, can suffer from long delays
+       when the table is resized.
+  .
+    2. "Data.HashTable.ST.Basic" contains a basic open-addressing hash table
+       using linear probing as the collision strategy. On a pure speed basis it
+       should currently be the fastest available Haskell hash table
+       implementation for lookups, although it has a higher memory overhead
+       than the other tables and can suffer from long delays when the table is
+       resized because all of the elements in the table need to be rehashed.
+  .
+    3. "Data.HashTable.ST.Linear" contains a linear hash table (see
+       <http://en.wikipedia.org/wiki/Linear_hashing>), which trades some insert
+       and lookup performance for higher space efficiency and much shorter
+       delays when expanding the table. In most cases, benchmarks show this
+       table to be currently slightly faster than @Data.HashTable@ from the
+       Haskell base library.
+  .
+  It is recommended to create a concrete type alias in your code when using this
+  package, i.e.:
+  .
+  > import qualified Data.HashTable.IO as H
+  >
+  > type HashTable k v = H.BasicHashTable k v
+  >
+  > foo :: IO (HashTable Int Int)
+  > foo = do
+  >     ht <- H.new
+  >     H.insert ht 1 1
+  >     return ht
+  .
+  Firstly, this makes it easy to switch to a different hash table implementation,
+  and secondly, using a concrete type rather than leaving your functions abstract
+  in the HashTable class should allow GHC to optimize away the typeclass
+  dictionaries.
+  .
+  This package accepts a couple of different cabal flags:
+  .
+    * @unsafe-tricks@, default /ON/. If this flag is enabled, we use some
+      unsafe GHC-specific tricks to save indirections (namely @unsafeCoerce#@
+      and @reallyUnsafePtrEquality#@. These techniques rely on assumptions
+      about the behaviour of the GHC runtime system and, although they've been
+      tested and should be safe under normal conditions, are slightly
+      dangerous. Caveat emptor. In particular, these techniques are
+      incompatible with HPC code coverage reports.
+  .
+    * @sse42@, default /OFF/. If this flag is enabled, we use some SSE 4.2
+      instructions (see <http://en.wikipedia.org/wiki/SSE4>, first available on
+      Intel Core 2 processors) to speed up cache-line searches for cuckoo
+      hashing.
+  .
+    * @bounds-checking@, default /OFF/. If this flag is enabled, array accesses
+      are bounds-checked.
+  .
+    * @debug@, default /OFF/. If turned on, we'll rudely spew debug output to
+      stdout.
+  .
+    * @portable@, default /OFF/. If this flag is enabled, we use only pure
+      Haskell code and try not to use unportable GHC extensions. Turning this
+      flag on forces @unsafe-tricks@ and @sse42@ /OFF/.
+  .
+  Please send bug reports to
+  <https://github.com/gregorycollins/hashtables/issues>.
+
+Extra-Source-Files:
+  README.md,
+  haddock.sh,
+  benchmark/hashtable-benchmark.cabal,
+  benchmark/LICENSE,
+  benchmark/src/Criterion/Collection/Internal/Types.hs,
+  benchmark/src/Criterion/Collection/Chart.hs,
+  benchmark/src/Criterion/Collection/Main.hs,
+  benchmark/src/Criterion/Collection/Types.hs,
+  benchmark/src/Criterion/Collection/Sample.hs,
+  benchmark/src/Main.hs,
+  benchmark/src/Data/Vector/Algorithms/Shuffle.hs,
+  benchmark/src/Data/Benchmarks/UnorderedCollections/Distributions.hs,
+  benchmark/src/Data/Benchmarks/UnorderedCollections/Types.hs,
+  cbits/Makefile,
+  cbits/check.c,
+  cbits/defs.h,
+  cbits/sse-42-check.c,
+  changelog.md,
+  test/compute-overhead/ComputeOverhead.hs,
+  test/hashtables-test.cabal,
+  test/runTestsAndCoverage.sh,
+  test/runTestsNoCoverage.sh,
+  test/suite/Data/HashTable/Test/Common.hs,
+  test/suite/TestSuite.hs
+
+
+------------------------------------------------------------------------------
+Flag unsafe-tricks
+  Description: turn on unsafe GHC tricks
+  Default:   True
+
+Flag bounds-checking
+  Description: if on, use bounds-checking array accesses
+  Default: False
+
+Flag debug
+  Description: if on, spew debugging output to stdout
+  Default: False
+
+Flag sse42
+  Description: if on, use SSE 4.2 extensions to search cache lines very
+               efficiently. The portable flag forces this off.
+  Default: False
+
+Flag portable
+  Description: if on, use only pure Haskell code and no GHC extensions.
+  Default: False
+
+
+Library
+  hs-source-dirs:    src
+
+  if flag(sse42) && !flag(portable)
+    cc-options:  -DUSE_SSE_4_2 -msse4.2
+    cpp-options: -DUSE_SSE_4_2
+    C-sources:   cbits/sse-42.c
+
+  if !flag(portable) && !flag(sse42)
+    C-sources:       cbits/default.c
+
+  if !flag(portable)
+    C-sources:       cbits/common.c
+
+  Exposed-modules:   Data.HashTable.Class,
+                     Data.HashTable.IO,
+                     Data.HashTable.ST.Basic,
+                     Data.HashTable.ST.Cuckoo,
+                     Data.HashTable.ST.Linear
+
+  Other-modules:     Data.HashTable.Internal.Array,
+                     Data.HashTable.Internal.IntArray,
+                     Data.HashTable.Internal.CacheLine,
+                     Data.HashTable.Internal.CheapPseudoRandomBitStream,
+                     Data.HashTable.Internal.UnsafeTricks,
+                     Data.HashTable.Internal.Utils,
+                     Data.HashTable.Internal.Linear.Bucket
+
+  Build-depends:     base      >= 4.7 && <5,
+                     hashable  >= 1.1 && <1.2 || >= 1.2.1 && <1.3,
+                     primitive,
+                     vector    >= 0.7 && <0.13
+
+  if flag(portable)
+    cpp-options: -DNO_C_SEARCH -DPORTABLE
+
+  if !flag(portable) && flag(unsafe-tricks) && impl(ghc)
+    build-depends: ghc-prim
+    cpp-options: -DUNSAFETRICKS
+
+  if flag(debug)
+    cpp-options: -DDEBUG
+
+  if flag(bounds-checking)
+    cpp-options: -DBOUNDS_CHECKING
+
+  ghc-prof-options: -auto-all
+
+  if impl(ghc >= 6.12.0)
+    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
+                 -fno-warn-unused-do-bind
+  else
+    ghc-options: -Wall -fwarn-tabs -funbox-strict-fields -O2
diff --git a/test/golden-test-cases/hashtables.nix.golden b/test/golden-test-cases/hashtables.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hashtables.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, ghc-prim, hashable, primitive
+, vector
+}:
+mkDerivation {
+  pname = "hashtables";
+  version = "1.2.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base ghc-prim hashable primitive vector
+  ];
+  homepage = "http://github.com/gregorycollins/hashtables";
+  description = "Mutable hash tables in the ST monad";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/haskell-tools-debug.cabal b/test/golden-test-cases/haskell-tools-debug.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/haskell-tools-debug.cabal
@@ -0,0 +1,38 @@
+name:                haskell-tools-debug
+version:             1.0.0.3
+synopsis:            Debugging Tools for Haskell-tools
+description:         Debugging Tools for Haskell-tools
+homepage:            https://github.com/haskell-tools/haskell-tools
+license:             BSD3
+license-file:        LICENSE
+author:              Boldizsar Nemeth
+maintainer:          nboldi@elte.hu
+category:            Language
+build-type:          Simple
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Language.Haskell.Tools.Debug
+  other-modules:       Language.Haskell.Tools.Debug.DebugGhcAST
+                     , Language.Haskell.Tools.Debug.RangeDebug
+                     , Language.Haskell.Tools.Debug.RangeDebugInstances
+  build-depends:       base                      >= 4.10 && < 4.11
+                     , filepath                  >= 1.4 && < 1.5
+                     , template-haskell          >= 2.12 && < 2.13
+                     , references                >= 0.3 && < 0.4
+                     , split                     >= 0.2 && < 0.3
+                     , ghc                       >= 8.2 && < 8.3
+                     , ghc-paths                 >= 0.1 && < 0.2
+                     , haskell-tools-ast         >= 1.0 && < 1.1
+                     , haskell-tools-backend-ghc >= 1.0 && < 1.1
+                     , haskell-tools-refactor    >= 1.0 && < 1.1
+                     , haskell-tools-prettyprint >= 1.0 && < 1.1
+                     , haskell-tools-builtin-refactorings >= 1.0 && < 1.1
+  default-language:    Haskell2010
+
+executable ht-debug
+  build-depends:       base                      >= 4.9 && < 5.0
+                     , haskell-tools-debug
+  hs-source-dirs:      exe
+  main-is:             Main.hs
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/haskell-tools-debug.nix.golden b/test/golden-test-cases/haskell-tools-debug.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/haskell-tools-debug.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, base, fetchurl, filepath, ghc, ghc-paths
+, haskell-tools-ast, haskell-tools-backend-ghc
+, haskell-tools-builtin-refactorings, haskell-tools-prettyprint
+, haskell-tools-refactor, references, split, template-haskell
+}:
+mkDerivation {
+  pname = "haskell-tools-debug";
+  version = "1.0.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base filepath ghc ghc-paths haskell-tools-ast
+    haskell-tools-backend-ghc haskell-tools-builtin-refactorings
+    haskell-tools-prettyprint haskell-tools-refactor references split
+    template-haskell
+  ];
+  executableHaskellDepends = [ base ];
+  homepage = "https://github.com/haskell-tools/haskell-tools";
+  description = "Debugging Tools for Haskell-tools";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/haskell-tools-rewrite.cabal b/test/golden-test-cases/haskell-tools-rewrite.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/haskell-tools-rewrite.cabal
@@ -0,0 +1,64 @@
+name:                haskell-tools-rewrite
+version:             1.0.0.3
+synopsis:            Facilities for generating new parts of the Haskell-Tools AST
+description:         Contains utility functions to generate parts of the Haskell-Tools AST. Generates these elements to be compatible with the source annotations that are already present on the AST. The package is divided into modules based on which language elements can the given module generate. This packages should be used during the transformations to generate parts of the new AST.
+homepage:            https://github.com/haskell-tools/haskell-tools
+license:             BSD3
+license-file:        LICENSE
+author:              Boldizsar Nemeth
+maintainer:          nboldi@elte.hu
+category:            Language
+build-type:          Simple
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Language.Haskell.Tools.Rewrite
+                     , Language.Haskell.Tools.Rewrite.ElementTypes
+                     , Language.Haskell.Tools.Rewrite.Create
+                     , Language.Haskell.Tools.Rewrite.Match
+                     , Language.Haskell.Tools.Rewrite.Create.Modules
+                     , Language.Haskell.Tools.Rewrite.Create.Decls
+                     , Language.Haskell.Tools.Rewrite.Create.Binds
+                     , Language.Haskell.Tools.Rewrite.Create.Types
+                     , Language.Haskell.Tools.Rewrite.Create.Kinds
+                     , Language.Haskell.Tools.Rewrite.Create.Exprs
+                     , Language.Haskell.Tools.Rewrite.Create.Literals
+                     , Language.Haskell.Tools.Rewrite.Create.Stmts
+                     , Language.Haskell.Tools.Rewrite.Create.Patterns
+                     , Language.Haskell.Tools.Rewrite.Create.Names
+                     , Language.Haskell.Tools.Rewrite.Create.TH
+                     , Language.Haskell.Tools.Rewrite.Match.Modules
+                     , Language.Haskell.Tools.Rewrite.Match.Decls
+                     , Language.Haskell.Tools.Rewrite.Match.Binds
+                     , Language.Haskell.Tools.Rewrite.Match.Types
+                     , Language.Haskell.Tools.Rewrite.Match.Kinds
+                     , Language.Haskell.Tools.Rewrite.Match.Exprs
+                     , Language.Haskell.Tools.Rewrite.Match.Literals
+                     , Language.Haskell.Tools.Rewrite.Match.Stmts
+                     , Language.Haskell.Tools.Rewrite.Match.Patterns
+                     , Language.Haskell.Tools.Rewrite.Match.Names
+                     , Language.Haskell.Tools.Rewrite.Match.TH
+  other-modules:       Language.Haskell.Tools.Rewrite.Create.Utils
+  build-depends:       base                      >= 4.10  && < 4.11
+                     , mtl                       >= 2.2  && < 2.3
+                     , containers                >= 0.5  && < 0.6
+                     , references                >= 0.3  && < 0.4
+                     , ghc                       >= 8.2  && < 8.3
+                     , haskell-tools-ast         >= 1.0  && < 1.1
+                     , haskell-tools-prettyprint >= 1.0  && < 1.1
+  default-language:    Haskell2010
+
+test-suite haskell-tools-rewrite-tests
+  type:                exitcode-stdio-1.0
+  ghc-options:         -with-rtsopts=-M2g
+  hs-source-dirs:      test
+  main-is:             Main.hs
+  build-depends:       base                      >= 4.10 && < 4.11
+                     , tasty                     >= 0.11 && < 0.13
+                     , tasty-hunit               >= 0.9 && < 0.11
+                     , directory                 >= 1.2 && < 1.4
+                     , filepath                  >= 1.4 && < 2.0
+                     , haskell-tools-ast         >= 1.0 && < 1.1
+                     , haskell-tools-prettyprint >= 1.0 && < 1.1
+                     , haskell-tools-rewrite
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/haskell-tools-rewrite.nix.golden b/test/golden-test-cases/haskell-tools-rewrite.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/haskell-tools-rewrite.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, containers, directory, fetchurl, filepath
+, ghc, haskell-tools-ast, haskell-tools-prettyprint, mtl
+, references, tasty, tasty-hunit
+}:
+mkDerivation {
+  pname = "haskell-tools-rewrite";
+  version = "1.0.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers ghc haskell-tools-ast haskell-tools-prettyprint mtl
+    references
+  ];
+  testHaskellDepends = [
+    base directory filepath haskell-tools-ast haskell-tools-prettyprint
+    tasty tasty-hunit
+  ];
+  homepage = "https://github.com/haskell-tools/haskell-tools";
+  description = "Facilities for generating new parts of the Haskell-Tools AST";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hasql.cabal b/test/golden-test-cases/hasql.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hasql.cabal
@@ -0,0 +1,205 @@
+name:
+  hasql
+version:
+  1.1.1
+category:
+  Hasql, Database, PostgreSQL
+synopsis:
+  An efficient PostgreSQL driver and a flexible mapping API
+description:
+  This package is the root of the \"hasql\" ecosystem.
+  .
+  The API is completely disinfected from exceptions. All error-reporting is explicit and is presented using the 'Either' type.
+  .
+  The version 1 is completely backward-compatible with 0.19.
+homepage:
+  https://github.com/nikita-volkov/hasql 
+bug-reports:
+  https://github.com/nikita-volkov/hasql/issues 
+author:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+maintainer:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+copyright:
+  (c) 2014, Nikita Volkov
+license:
+  MIT
+license-file:
+  LICENSE
+build-type:
+  Simple
+cabal-version:
+  >=1.10
+
+
+source-repository head
+  type:
+    git
+  location:
+    git://github.com/nikita-volkov/hasql.git
+
+
+library
+  hs-source-dirs:
+    library
+  ghc-options:
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  other-modules:
+    Hasql.Private.Prelude
+    Hasql.Private.PTI
+    Hasql.Private.IO
+    Hasql.Private.Query
+    Hasql.Private.Session
+    Hasql.Private.Connection
+    Hasql.Private.PreparedStatementRegistry
+    Hasql.Private.Settings
+    Hasql.Private.Commands
+    Hasql.Private.Decoders.Array
+    Hasql.Private.Decoders.Composite
+    Hasql.Private.Decoders.Value
+    Hasql.Private.Decoders.Row
+    Hasql.Private.Decoders.Result
+    Hasql.Private.Decoders.Results
+    Hasql.Private.Encoders.Array
+    Hasql.Private.Encoders.Value
+    Hasql.Private.Encoders.Params
+  exposed-modules:
+    Hasql.Decoders
+    Hasql.Encoders
+    Hasql.Connection
+    Hasql.Query
+    Hasql.Session
+  build-depends:
+    -- parsing:
+    attoparsec >= 0.10 && < 0.14,
+    -- database:
+    postgresql-binary >= 0.12.1 && < 0.13,
+    postgresql-libpq == 0.9.*,
+    -- builders:
+    bytestring-strict-builder >= 0.4 && < 0.5,
+    -- data:
+    dlist >= 0.7 && < 0.9,
+    vector >= 0.10 && < 0.13,
+    hashtables >= 1.1 && < 2,
+    text >= 1 && < 2,
+    bytestring >= 0.10 && < 0.11,
+    hashable >= 1.2 && < 1.3,
+    -- control:
+    semigroups >= 0.18 && < 0.20,
+    data-default-class >= 0.0.1 && < 0.2,
+    profunctors >= 5.1 && < 6,
+    contravariant-extras == 0.3.*,
+    contravariant >= 1.3 && < 2,
+    mtl >= 2 && < 3,
+    transformers >= 0.3 && < 0.6,
+    -- errors:
+    loch-th == 0.2.*,
+    placeholders == 0.1.*,
+    -- general:
+    base-prelude >= 0.1.19 && < 2,
+    base >= 4.6 && < 5
+
+
+test-suite tasty
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    tasty
+  main-is:
+    Main.hs
+  other-modules:
+    Main.DSL
+    Main.Connection
+    Main.Queries
+    Main.Prelude
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  build-depends:
+    -- database:
+    hasql,
+    -- testing:
+    tasty >= 0.12 && < 0.13,
+    tasty-quickcheck >= 0.9 && < 0.10,
+    tasty-hunit >= 0.9 && < 0.10,
+    quickcheck-instances >= 0.3.11 && < 0.4,
+    QuickCheck >= 2.8.1 && < 3,
+    -- general:
+    data-default-class,
+    -- 
+    rerebase < 2
+
+
+test-suite threads-test
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    threads-test
+  main-is:
+    Main.hs
+  other-modules:
+    Main.Queries
+  ghc-options:
+    -O2
+    -threaded
+    "-with-rtsopts=-N"
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  build-depends:
+    -- database:
+    hasql,
+    -- 
+    rebase
+
+
+benchmark benchmarks
+  type: 
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    benchmarks
+  main-is:
+    Main.hs
+  ghc-options:
+    -O2
+    -threaded
+    "-with-rtsopts=-N"
+    -rtsopts
+    -funbox-strict-fields
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  build-depends:
+    hasql,
+    -- benchmarking:
+    criterion >= 1.1 && < 2,
+    -- general:
+    bug == 1.*,
+    rerebase < 2
+
+
+test-suite profiling
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    profiling
+  main-is:
+    Main.hs
+  ghc-options:
+    -O2
+    -threaded
+    -rtsopts
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  build-depends:
+    hasql,
+    bug == 1.*,
+    rerebase == 1.*
diff --git a/test/golden-test-cases/hasql.nix.golden b/test/golden-test-cases/hasql.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hasql.nix.golden
@@ -0,0 +1,30 @@
+{ mkDerivation, attoparsec, base, base-prelude, bug, bytestring
+, bytestring-strict-builder, contravariant, contravariant-extras
+, criterion, data-default-class, dlist, fetchurl, hashable
+, hashtables, loch-th, mtl, placeholders, postgresql-binary
+, postgresql-libpq, profunctors, QuickCheck, quickcheck-instances
+, rebase, rerebase, semigroups, tasty, tasty-hunit
+, tasty-quickcheck, text, transformers, vector
+}:
+mkDerivation {
+  pname = "hasql";
+  version = "1.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base base-prelude bytestring bytestring-strict-builder
+    contravariant contravariant-extras data-default-class dlist
+    hashable hashtables loch-th mtl placeholders postgresql-binary
+    postgresql-libpq profunctors semigroups text transformers vector
+  ];
+  testHaskellDepends = [
+    bug data-default-class QuickCheck quickcheck-instances rebase
+    rerebase tasty tasty-hunit tasty-quickcheck
+  ];
+  benchmarkHaskellDepends = [ bug criterion rerebase ];
+  homepage = "https://github.com/nikita-volkov/hasql";
+  description = "An efficient PostgreSQL driver and a flexible mapping API";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/hformat.cabal b/test/golden-test-cases/hformat.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hformat.cabal
@@ -0,0 +1,45 @@
+name:                hformat
+version:             0.3.1.0
+synopsis:            Simple Haskell formatting
+description: String formatting
+homepage:            http://github.com/mvoidex/hformat
+license:             BSD3
+license-file:        LICENSE
+author:              Alexandr Ruchkin
+maintainer:          voidex@live.com
+category:            Text
+build-type:          Simple
+cabal-version:       >=1.10
+
+source-repository head
+  type: git
+  location: git://github.com/mvoidex/hformat.git
+
+library
+  hs-source-dirs: src
+  default-language: Haskell2010
+  ghc-options: -Wall -fno-warn-tabs
+  default-extensions: UnicodeSyntax
+  exposed-modules:
+    Text.Format
+    Text.Format.Flags
+    Text.Format.Colored
+  build-depends:
+    base >= 4.8 && < 5,
+    base-unicode-symbols >= 0.2,
+    ansi-terminal >= 0.6,
+    text >= 1.2.1
+
+test-suite test
+  type: exitcode-stdio-1.0
+  main-is: Test.hs
+  hs-source-dirs: tests
+  ghc-options: -threaded -Wall -fno-warn-tabs
+  default-language: Haskell2010
+  default-extensions: UnicodeSyntax
+  build-depends:
+    base >= 4.8 && < 5,
+    base-unicode-symbols >= 0.2,
+    text >= 1.2.1,
+    hspec,
+    hformat
diff --git a/test/golden-test-cases/hformat.nix.golden b/test/golden-test-cases/hformat.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hformat.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, ansi-terminal, base, base-unicode-symbols, fetchurl
+, hspec, text
+}:
+mkDerivation {
+  pname = "hformat";
+  version = "0.3.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    ansi-terminal base base-unicode-symbols text
+  ];
+  testHaskellDepends = [ base base-unicode-symbols hspec text ];
+  homepage = "http://github.com/mvoidex/hformat";
+  description = "Simple Haskell formatting";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/highlighting-kate.cabal b/test/golden-test-cases/highlighting-kate.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/highlighting-kate.cabal
@@ -0,0 +1,276 @@
+Name:                highlighting-kate
+Version:             0.6.4
+Cabal-Version:       >= 1.10
+Build-Type:          Simple
+Category:            Text
+Synopsis:            Syntax highlighting
+Description:         highlighting-kate is a syntax highlighting library
+                     with support for nearly one hundred languages. The syntax
+                     parsers are automatically generated from Kate
+                     syntax descriptions (<http://kate-editor.org/>),
+                     so any syntax supported by Kate can be added.
+                     An (optional) command-line program is provided, along
+                     with a utility for generating new parsers from Kate
+                     XML syntax descriptions.
+
+                     __This library has been deprecated.
+                     Please use skylighting instead.__
+
+License:             GPL
+License-file:        LICENSE
+Author:              John MacFarlane
+Maintainer:          jgm@berkeley.edu
+Homepage:            http://github.com/jgm/highlighting-kate
+Extra-Source-Files:  README.md
+                     changelog
+                     Makefile
+                     ParseSyntaxFiles.hs
+                     Text/Highlighting/Kate/Syntax.hs.in
+                     css/hk-espresso.css
+                     css/hk-kate.css
+                     css/hk-pyg.css
+                     css/hk-tango.css
+                     xml/language.dtd
+                     xml/*.xml
+                     xml/*.xml.patch
+                     tests/abc.ada
+                     tests/abc.ada.html
+                     tests/abc.agda
+                     tests/abc.agda.html
+                     tests/abc.c
+                     tests/abc.c.html
+                     tests/abc.clojure
+                     tests/abc.clojure.html
+                     tests/abc.cpp
+                     tests/abc.cpp.html
+                     tests/abc.cs
+                     tests/abc.cs.html
+                     tests/abc.d
+                     tests/abc.d.html
+                     tests/abc.fortran
+                     tests/abc.fortran.html
+                     tests/abc.go
+                     tests/abc.go.html
+                     tests/abc.haskell
+                     tests/abc.haskell.html
+                     tests/abc.java
+                     tests/abc.java.html
+                     tests/abc.javascript
+                     tests/abc.javascript.html
+                     tests/abc.julia
+                     tests/abc.julia.html
+                     tests/abc.kotlin
+                     tests/abc.kotlin.html
+                     tests/abc.lisp
+                     tests/abc.lisp.html
+                     tests/abc.matlab
+                     tests/abc.matlab.html
+                     tests/abc.ocaml
+                     tests/abc.ocaml.html
+                     tests/abc.perl
+                     tests/abc.perl.html
+                     tests/abc.php
+                     tests/abc.php.html
+                     tests/abc.prolog
+                     tests/abc.prolog.html
+                     tests/abc.python
+                     tests/abc.python.html
+                     tests/abc.r
+                     tests/abc.r.html
+                     tests/abc.ruby
+                     tests/abc.ruby.html
+                     tests/abc.scala
+                     tests/abc.scala.html
+                     tests/abc.scheme
+                     tests/abc.scheme.html
+                     tests/abc.tcl
+                     tests/abc.tcl.html
+                     tests/archive.rhtml
+                     tests/archive.rhtml.html
+                     tests/life.lua
+                     tests/life.lua.html
+Flag executable
+  Description:       Build the highlighting-kate executable.
+  Default:           False
+Flag pcre-light
+  Description:       Use the pcre-light library instead of regex-pcre-builtin
+  Default:           False
+
+Source-repository head
+  type:          git
+  location:      git://github.com/jgm/highlighting-kate.git
+
+Library
+  Build-Depends:     base >= 4.4 && < 5, containers,
+                     parsec, mtl, blaze-html >= 0.4.2 && < 0.10,
+                     utf8-string
+  if flag(pcre-light)
+    Build-depends:   pcre-light >= 0.4 && < 0.5, bytestring
+    cpp-options:     -D_PCRE_LIGHT
+  else
+    Build-depends:   regex-pcre-builtin >= 0.94.4.8.8.35
+  Exposed-Modules:   Text.Highlighting.Kate
+                     Text.Highlighting.Kate.Syntax
+                     Text.Highlighting.Kate.Types
+                     Text.Highlighting.Kate.Styles
+                     Text.Highlighting.Kate.Format.HTML
+                     Text.Highlighting.Kate.Format.LaTeX
+  Other-Modules:     Text.Highlighting.Kate.Common
+                     Paths_highlighting_kate
+                     Text.Highlighting.Kate.Syntax.Abc
+                     Text.Highlighting.Kate.Syntax.Actionscript
+                     Text.Highlighting.Kate.Syntax.Ada
+                     Text.Highlighting.Kate.Syntax.Agda
+                     Text.Highlighting.Kate.Syntax.Alert
+                     Text.Highlighting.Kate.Syntax.Alert_indent
+                     Text.Highlighting.Kate.Syntax.Apache
+                     Text.Highlighting.Kate.Syntax.Asn1
+                     Text.Highlighting.Kate.Syntax.Asp
+                     Text.Highlighting.Kate.Syntax.Ats
+                     Text.Highlighting.Kate.Syntax.Awk
+                     Text.Highlighting.Kate.Syntax.Bash
+                     Text.Highlighting.Kate.Syntax.Bibtex
+                     Text.Highlighting.Kate.Syntax.Boo
+                     Text.Highlighting.Kate.Syntax.C
+                     Text.Highlighting.Kate.Syntax.Changelog
+                     Text.Highlighting.Kate.Syntax.Clojure
+                     Text.Highlighting.Kate.Syntax.Cmake
+                     Text.Highlighting.Kate.Syntax.Coffee
+                     Text.Highlighting.Kate.Syntax.Coldfusion
+                     Text.Highlighting.Kate.Syntax.Commonlisp
+                     Text.Highlighting.Kate.Syntax.Cpp
+                     Text.Highlighting.Kate.Syntax.Cs
+                     Text.Highlighting.Kate.Syntax.Css
+                     Text.Highlighting.Kate.Syntax.Curry
+                     Text.Highlighting.Kate.Syntax.D
+                     Text.Highlighting.Kate.Syntax.Diff
+                     Text.Highlighting.Kate.Syntax.Djangotemplate
+                     Text.Highlighting.Kate.Syntax.Dockerfile
+                     Text.Highlighting.Kate.Syntax.Dot
+                     Text.Highlighting.Kate.Syntax.Doxygen
+                     Text.Highlighting.Kate.Syntax.Doxygenlua
+                     Text.Highlighting.Kate.Syntax.Dtd
+                     Text.Highlighting.Kate.Syntax.Eiffel
+                     Text.Highlighting.Kate.Syntax.Elixir
+                     Text.Highlighting.Kate.Syntax.Email
+                     Text.Highlighting.Kate.Syntax.Erlang
+                     Text.Highlighting.Kate.Syntax.Fasm
+                     Text.Highlighting.Kate.Syntax.Fortran
+                     Text.Highlighting.Kate.Syntax.Fsharp
+                     Text.Highlighting.Kate.Syntax.Gcc
+                     Text.Highlighting.Kate.Syntax.Glsl
+                     Text.Highlighting.Kate.Syntax.Gnuassembler
+                     Text.Highlighting.Kate.Syntax.Go
+                     Text.Highlighting.Kate.Syntax.Hamlet
+                     Text.Highlighting.Kate.Syntax.Haskell
+                     Text.Highlighting.Kate.Syntax.Haxe
+                     Text.Highlighting.Kate.Syntax.Html
+                     Text.Highlighting.Kate.Syntax.Idris
+                     Text.Highlighting.Kate.Syntax.Ini
+                     Text.Highlighting.Kate.Syntax.Isocpp
+                     Text.Highlighting.Kate.Syntax.Java
+                     Text.Highlighting.Kate.Syntax.Javadoc
+                     Text.Highlighting.Kate.Syntax.Javascript
+                     Text.Highlighting.Kate.Syntax.Json
+                     Text.Highlighting.Kate.Syntax.Jsp
+                     Text.Highlighting.Kate.Syntax.Julia
+                     Text.Highlighting.Kate.Syntax.Kotlin
+                     Text.Highlighting.Kate.Syntax.Latex
+                     Text.Highlighting.Kate.Syntax.Lex
+                     Text.Highlighting.Kate.Syntax.Lilypond
+                     Text.Highlighting.Kate.Syntax.LiterateCurry
+                     Text.Highlighting.Kate.Syntax.LiterateHaskell
+                     Text.Highlighting.Kate.Syntax.Llvm
+                     Text.Highlighting.Kate.Syntax.Lua
+                     Text.Highlighting.Kate.Syntax.M4
+                     Text.Highlighting.Kate.Syntax.Makefile
+                     Text.Highlighting.Kate.Syntax.Mandoc
+                     Text.Highlighting.Kate.Syntax.Markdown
+                     Text.Highlighting.Kate.Syntax.Mathematica
+                     Text.Highlighting.Kate.Syntax.Matlab
+                     Text.Highlighting.Kate.Syntax.Maxima
+                     Text.Highlighting.Kate.Syntax.Mediawiki
+                     Text.Highlighting.Kate.Syntax.Metafont
+                     Text.Highlighting.Kate.Syntax.Mips
+                     Text.Highlighting.Kate.Syntax.Modelines
+                     Text.Highlighting.Kate.Syntax.Modula2
+                     Text.Highlighting.Kate.Syntax.Modula3
+                     Text.Highlighting.Kate.Syntax.Monobasic
+                     Text.Highlighting.Kate.Syntax.Nasm
+                     Text.Highlighting.Kate.Syntax.Noweb
+                     Text.Highlighting.Kate.Syntax.Objectivec
+                     Text.Highlighting.Kate.Syntax.Objectivecpp
+                     Text.Highlighting.Kate.Syntax.Ocaml
+                     Text.Highlighting.Kate.Syntax.Octave
+                     Text.Highlighting.Kate.Syntax.Opencl
+                     Text.Highlighting.Kate.Syntax.Pascal
+                     Text.Highlighting.Kate.Syntax.Perl
+                     Text.Highlighting.Kate.Syntax.Php
+                     Text.Highlighting.Kate.Syntax.Pike
+                     Text.Highlighting.Kate.Syntax.Postscript
+                     Text.Highlighting.Kate.Syntax.Prolog
+                     Text.Highlighting.Kate.Syntax.Pure
+                     Text.Highlighting.Kate.Syntax.Python
+                     Text.Highlighting.Kate.Syntax.R
+                     Text.Highlighting.Kate.Syntax.Relaxng
+                     Text.Highlighting.Kate.Syntax.Relaxngcompact
+                     Text.Highlighting.Kate.Syntax.Rest
+                     Text.Highlighting.Kate.Syntax.Rhtml
+                     Text.Highlighting.Kate.Syntax.Roff
+                     Text.Highlighting.Kate.Syntax.Ruby
+                     Text.Highlighting.Kate.Syntax.Rust
+                     Text.Highlighting.Kate.Syntax.Scala
+                     Text.Highlighting.Kate.Syntax.Scheme
+                     Text.Highlighting.Kate.Syntax.Sci
+                     Text.Highlighting.Kate.Syntax.Sed
+                     Text.Highlighting.Kate.Syntax.Sgml
+                     Text.Highlighting.Kate.Syntax.Sql
+                     Text.Highlighting.Kate.Syntax.SqlMysql
+                     Text.Highlighting.Kate.Syntax.SqlPostgresql
+                     Text.Highlighting.Kate.Syntax.Tcl
+                     Text.Highlighting.Kate.Syntax.Tcsh
+                     Text.Highlighting.Kate.Syntax.Texinfo
+                     Text.Highlighting.Kate.Syntax.Verilog
+                     Text.Highlighting.Kate.Syntax.Vhdl
+                     Text.Highlighting.Kate.Syntax.Xml
+                     Text.Highlighting.Kate.Syntax.Xorg
+                     Text.Highlighting.Kate.Syntax.Xslt
+                     Text.Highlighting.Kate.Syntax.Xul
+                     Text.Highlighting.Kate.Syntax.Yacc
+                     Text.Highlighting.Kate.Syntax.Yaml
+                     Text.Highlighting.Kate.Syntax.Zsh
+  -- disable optimizations; it doesn't hurt performance much and
+  -- massively improves compilation speed and memory usage
+  Default-Language:    Haskell98
+  Ghc-Options:       -W -O0
+  Ghc-Prof-Options:  -fprof-auto-exported
+  -- the following line is needed to prevent gcc from consuming huge amounts of
+  -- memory on platforms without a native code generator:
+  Cc-Options:       -O0
+
+Executable highlighting-kate
+  Main-Is:          highlighting-kate.hs
+  Build-Depends:    base, containers, blaze-html >= 0.4.2 && < 0.10, filepath,
+                    highlighting-kate
+  Hs-Source-Dirs:   extra
+  Default-Language:    Haskell98
+  if flag(pcre-light)
+    cpp-options:     -D_PCRE_LIGHT
+  Ghc-Options:      -W -O0 -rtsopts
+  Ghc-Prof-Options:  -fprof-auto-exported
+  -- the following line is needed to prevent gcc from consuming huge amounts of
+  -- memory on platforms without a native code generator:
+  Cc-Options:       -O0
+
+  if flag(executable)
+    Buildable:      True
+  else
+    Buildable:      False
+
+test-suite test-highlighting-kate
+  Type:           exitcode-stdio-1.0
+  Main-Is:        test-highlighting-kate.hs
+  Hs-Source-Dirs: tests
+  build-depends:  base >= 4, directory, highlighting-kate, filepath,
+                  process, Diff, containers, blaze-html >= 0.4.2 && < 0.10
+  default-language: Haskell98
diff --git a/test/golden-test-cases/highlighting-kate.nix.golden b/test/golden-test-cases/highlighting-kate.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/highlighting-kate.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, base, blaze-html, containers, Diff, directory
+, fetchurl, filepath, mtl, parsec, process, regex-pcre-builtin
+, utf8-string
+}:
+mkDerivation {
+  pname = "highlighting-kate";
+  version = "0.6.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base blaze-html containers mtl parsec regex-pcre-builtin
+    utf8-string
+  ];
+  executableHaskellDepends = [ base blaze-html containers filepath ];
+  testHaskellDepends = [
+    base blaze-html containers Diff directory filepath process
+  ];
+  homepage = "http://github.com/jgm/highlighting-kate";
+  description = "Syntax highlighting";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/hit.cabal b/test/golden-test-cases/hit.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hit.cabal
@@ -0,0 +1,125 @@
+Name:                hit
+Version:             0.6.3
+Synopsis:            Git operations in haskell
+Description:
+    .
+    An haskell implementation of git storage operations, allowing users
+    to manipulate git repositories (read and write).
+    .
+    This implementation is fully interoperable with the main C implementation.
+    .
+    This is stricly only manipulating the git store (what's inside the .git directory),
+    and doesn't do anything with the index or your working directory files.
+    .
+License:             BSD3
+License-file:        LICENSE
+Copyright:           Vincent Hanquez <vincent@snarc.org>
+Author:              Vincent Hanquez <vincent@snarc.org>
+Maintainer:          Vincent Hanquez <vincent@snarc.org>
+Category:            Development
+Stability:           experimental
+Build-Type:          Simple
+Homepage:            http://github.com/vincenthz/hit
+Cabal-Version:       >=1.8
+data-files:          README.md
+extra-source-files:  Tests/*.hs
+
+Flag executable
+  Description:       Build the executable
+  Default:           False
+
+Flag debug
+  Description:       Add some debugging options
+  Default:           False
+
+Library
+  Build-Depends:     base >= 4 && < 5
+                   , mtl
+                   , bytestring >= 0.9
+                   , byteable
+                   , attoparsec >= 0.10.1
+                   , parsec     >= 3
+                   , containers
+                   , system-filepath
+                   , system-fileio
+                   , cryptohash
+                   , vector
+                   , random
+                   , zlib
+                   , zlib-bindings >= 0.1 && < 0.2
+                   , hourglass >= 0.2
+                   , unix-compat
+                   , utf8-string
+                   , patience
+  Exposed-modules:   Data.Git
+                     Data.Git.Types
+                     Data.Git.Storage
+                     Data.Git.Storage.PackIndex
+                     Data.Git.Storage.Pack
+                     Data.Git.Storage.Object
+                     Data.Git.Storage.Loose
+                     Data.Git.Named
+                     Data.Git.Delta
+                     Data.Git.Ref
+                     Data.Git.Revision
+                     Data.Git.Repository
+                     Data.Git.Diff
+  Other-modules:     Data.Git.Internal
+                     Data.Git.Config
+                     Data.Git.Storage.FileReader
+                     Data.Git.Storage.FileWriter
+                     Data.Git.Storage.CacheFile
+                     Data.Git.Path
+                     Data.Git.WorkTree
+  ghc-options:       -Wall -fno-warn-missing-signatures
+
+Executable           Hit
+  Main-Is:           Hit.hs
+  hs-source-dirs:    Hit
+  ghc-options:       -Wall -fno-warn-orphans -fno-warn-missing-signatures
+  if flag(debug)
+    ghc-options:     -rtsopts -auto-all -caf-all
+  if flag(executable)
+    Build-depends:   base >= 4 && < 5
+                   , mtl
+                   , containers
+                   , hashable >= 1.2
+                   , hashtables
+                   , bytestring
+                   , attoparsec >= 0.10.1
+                   , parsec     >= 3
+                   , filepath
+                   , directory
+                   , hit
+                   , hourglass
+                   , patience
+    Buildable: True
+  else
+    Buildable: False
+
+Test-Suite test-unit
+  type:              exitcode-stdio-1.0
+  hs-source-dirs:    Tests
+  Main-Is:           Tests.hs
+  Build-depends:     base >= 3 && < 7
+                   , bytestring
+                   , tasty
+                   , tasty-quickcheck
+                   , hourglass
+                   , hit
+
+Test-Suite test-repository
+  type:              exitcode-stdio-1.0
+  hs-source-dirs:    Tests
+  Main-Is:           Repo.hs
+  Build-depends:     base >= 3 && < 7
+                   , bytestring
+                   , tasty
+                   , tasty-quickcheck
+                   , hourglass
+                   , bytedump >= 1.0
+                   , hit
+
+source-repository head
+  type: git
+  location: git://github.com/vincenthz/hit
diff --git a/test/golden-test-cases/hit.nix.golden b/test/golden-test-cases/hit.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hit.nix.golden
@@ -0,0 +1,28 @@
+{ mkDerivation, attoparsec, base, byteable, bytedump, bytestring
+, containers, cryptohash, fetchurl, hourglass, mtl, parsec
+, patience, random, system-fileio, system-filepath, tasty
+, tasty-quickcheck, unix-compat, utf8-string, vector, zlib
+, zlib-bindings
+}:
+mkDerivation {
+  pname = "hit";
+  version = "0.6.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    attoparsec base byteable bytestring containers cryptohash hourglass
+    mtl parsec patience random system-fileio system-filepath
+    unix-compat utf8-string vector zlib zlib-bindings
+  ];
+  testHaskellDepends = [
+    base bytedump bytestring hourglass tasty tasty-quickcheck
+  ];
+  homepage = "http://github.com/vincenthz/hit";
+  description = "Git operations in haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hjson.cabal b/test/golden-test-cases/hjson.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hjson.cabal
@@ -0,0 +1,19 @@
+Name: hjson
+Version: 1.3.2
+Synopsis: JSON parsing library
+Category: Text
+Description: JSON parsing library with simple and sane API
+License: BSD3
+License-file: COPYING
+Author: Voker57
+Maintainer: voker57@gmail.com
+Build-type: Simple
+Cabal-version: >= 1.6
+
+Source-repository head
+    Type: git
+    Location: git://git.bitcheese.net/hjson
+
+library
+ Exposed-Modules: Text.HJson, Text.HJson.Pretty
+ Build-Depends: base >= 4 && < 5, parsec >= 3.0.0, containers
diff --git a/test/golden-test-cases/hjson.nix.golden b/test/golden-test-cases/hjson.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hjson.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, containers, fetchurl, parsec }:
+mkDerivation {
+  pname = "hjson";
+  version = "1.3.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers parsec ];
+  description = "JSON parsing library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hmpfr.cabal b/test/golden-test-cases/hmpfr.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hmpfr.cabal
@@ -0,0 +1,83 @@
+name:                hmpfr
+version:             0.4.3
+synopsis:            Haskell binding to the MPFR library
+description:
+  Haskell binding to the MPFR library.
+  .
+  The library includes both a pure and a mutable interface.
+  The mutable interface should have a lot less overhead
+  than the pure one.
+  .
+  Some simple examples of usage can be found in demo/Demo.hs.
+
+category:            Data, Math
+license:             BSD3
+license-file:        LICENSE
+Stability:           experimental
+Tested-with:
+                GHC==7.10.3
+                GHC==8.0.1
+author:              Aleš Bizjak, Michal Konečný
+maintainer:          Michal Konečný <mikkonecny@gmail.com>
+Homepage:            https://github.com/michalkonecny/hmpfr
+build-type:          Simple
+cabal-version:       >= 1.6
+Extra-source-files:  demo/Demo.hs
+
+Data-files:
+  README.md
+  dict.txt
+  ChangeLog
+
+source-repository head
+  type:     git
+  location: https://github.com/michalkonecny/hmpfr
+
+flag use-integer-simple
+  description: Use this when compiling using a ghc that uses integer-simple instead of integer-gmp.
+  default: False
+
+Library
+  build-Depends:       base >= 4.8 && < 5
+  if flag(use-integer-simple)
+     build-Depends:    integer-simple
+     cpp-options: -DINTEGER_SIMPLE
+  else
+     build-Depends:    integer-gmp >= 1.0 && < 1.1
+     cpp-options: -DINTEGER_GMP
+
+  Exposed-modules:
+                       Data.Number.MPFR.FFIhelper
+                       Data.Number.MPFR.Internal
+                       Data.Number.MPFR.Mutable.Internal
+
+                       Data.Number.MPFR.Mutable.Arithmetic
+                       Data.Number.MPFR.Mutable.Special
+                       Data.Number.MPFR.Mutable.Integer
+                       Data.Number.MPFR.Mutable.Misc
+
+                       Data.Number.MPFR.Assignment
+                       Data.Number.MPFR.Conversion
+                       Data.Number.MPFR.Arithmetic
+                       Data.Number.MPFR.Comparison
+                       Data.Number.MPFR.Special
+                       Data.Number.MPFR.Integer
+                       Data.Number.MPFR.Misc
+
+                       Data.Number.MPFR.Instances.Near
+                       Data.Number.MPFR.Instances.Up
+                       Data.Number.MPFR.Instances.Down
+                       Data.Number.MPFR.Instances.Zero
+
+                       Data.Number.MPFR
+
+                       Data.Number.MPFR.Mutable
+
+  GHC-options:         -Wall -fno-warn-orphans
+  hs-source-dirs:      src
+  include-dirs:        cbits
+  includes:            mpfr.h
+  install-includes:    chsmpfr.h
+  c-sources:           cbits/chsmpfr.c
+
+  extra-libraries:     mpfr
diff --git a/test/golden-test-cases/hmpfr.nix.golden b/test/golden-test-cases/hmpfr.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hmpfr.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, fetchurl, integer-gmp, mpfr }:
+mkDerivation {
+  pname = "hmpfr";
+  version = "0.4.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [ base integer-gmp ];
+  librarySystemDepends = [ mpfr ];
+  homepage = "https://github.com/michalkonecny/hmpfr";
+  description = "Haskell binding to the MPFR library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hoogle.cabal b/test/golden-test-cases/hoogle.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hoogle.cabal
@@ -0,0 +1,142 @@
+cabal-version:      >= 1.18
+build-type:         Simple
+name:               hoogle
+version:            5.0.14
+license:            BSD3
+license-file:       LICENSE
+category:           Development
+author:             Neil Mitchell <ndmitchell@gmail.com>
+maintainer:         Neil Mitchell <ndmitchell@gmail.com>
+copyright:          Neil Mitchell 2004-2017
+synopsis:           Haskell API Search
+description:
+    Hoogle is a Haskell API search engine, which allows you to
+    search many standard Haskell libraries by either function name,
+    or by approximate type signature.
+homepage:           http://hoogle.haskell.org/
+bug-reports:        https://github.com/ndmitchell/hoogle/issues
+tested-with:        GHC==8.2.1, GHC==8.0.2, GHC==7.10.3
+extra-doc-files:
+    README.md
+    CHANGES.txt
+extra-source-files:
+    cbits/*.h
+    cbits/*.c
+data-files:
+    misc/settings.txt
+    html/*.js
+    html/*.png
+    html/*.css
+    html/*.xml
+    html/*.html
+    html/plugin/*.css
+    html/plugin/*.js
+    html/plugin/*.png
+
+source-repository head
+    type:     git
+    location: https://github.com/ndmitchell/hoogle.git
+
+flag network-uri
+    default: True
+    manual: False
+    description: Get Network.URI from the network-uri package
+
+library
+    hs-source-dirs:     src
+    default-language:   Haskell2010
+
+    if flag(network-uri)
+        build-depends: network-uri >= 2.6, network >= 2.6
+    else
+        build-depends: network-uri < 2.6, network < 2.6
+
+    build-depends:
+        QuickCheck,
+        aeson,
+        base > 4 && < 5,
+        binary,
+        bytestring,
+        cmdargs,
+        conduit,
+        conduit-extra,
+        connection,
+        containers >= 0.5,
+        deepseq,
+        directory,
+        extra >= 1.4,
+        filepath,
+        old-locale,
+        haskell-src-exts >= 1.18 && < 1.20,
+        http-conduit,
+        http-types,
+        js-flot,
+        js-jquery,
+        mmap,
+        process,
+        process-extras,
+        resourcet,
+        storable-tuple,
+        tar,
+        template-haskell,
+        text,
+        time,
+        transformers,
+        uniplate,
+        utf8-string,
+        vector,
+        wai,
+        wai-logger,
+        warp,
+        warp-tls,
+        zlib
+
+    c-sources:        cbits/text_search.c
+    include-dirs:     cbits
+    includes:         include.h
+    install-includes: include.h
+    cc-options:       -std=c99
+
+    ghc-options:      -fno-state-hack
+
+    exposed-modules:
+        Hoogle
+
+    other-modules:
+        Paths_hoogle
+        Action.CmdLine
+        Action.Generate
+        Action.Search
+        Action.Server
+        Action.Test
+        Input.Cabal
+        Input.Download
+        Input.Haddock
+        Input.Item
+        Input.Reorder
+        Input.Set
+        Input.Settings
+        Output.Items
+        Output.Names
+        Output.Tags
+        Output.Types
+        Query
+        General.Conduit
+        General.IString
+        General.Log
+        General.Store
+        General.Str
+        General.Template
+        General.Timing
+        General.Util
+        General.Web
+
+
+executable hoogle
+    main-is:            src/Main.hs
+    default-language:   Haskell2010
+    ghc-options:        -threaded
+
+    build-depends:
+        base > 4 && < 5,
+        hoogle
diff --git a/test/golden-test-cases/hoogle.nix.golden b/test/golden-test-cases/hoogle.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hoogle.nix.golden
@@ -0,0 +1,33 @@
+{ mkDerivation, aeson, base, binary, bytestring, cmdargs, conduit
+, conduit-extra, connection, containers, deepseq, directory, extra
+, fetchurl, filepath, haskell-src-exts, http-conduit, http-types
+, js-flot, js-jquery, mmap, network, network-uri, old-locale
+, process, process-extras, QuickCheck, resourcet, storable-tuple
+, tar, template-haskell, text, time, transformers, uniplate
+, utf8-string, vector, wai, wai-logger, warp, warp-tls, zlib
+}:
+mkDerivation {
+  pname = "hoogle";
+  version = "5.0.14";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    aeson base binary bytestring cmdargs conduit conduit-extra
+    connection containers deepseq directory extra filepath
+    haskell-src-exts http-conduit http-types js-flot js-jquery mmap
+    network network-uri old-locale process process-extras QuickCheck
+    resourcet storable-tuple tar template-haskell text time
+    transformers uniplate utf8-string vector wai wai-logger warp
+    warp-tls zlib
+  ];
+  executableHaskellDepends = [ base ];
+  testTarget = "--test-option=--no-net";
+  homepage = "http://hoogle.haskell.org/";
+  description = "Haskell API Search";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hostname-validate.cabal b/test/golden-test-cases/hostname-validate.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hostname-validate.cabal
@@ -0,0 +1,20 @@
+name:                hostname-validate
+version:             1.0.0
+synopsis:            Validate hostnames e.g. localhost or foo.co.uk.
+description:         Validate hostnames e.g. localhost or foo.co.uk. See also RFC 1123, RFC 952, and RFC 1035.
+license:             BSD3
+license-file:        LICENSE
+author:              Chris Done
+maintainer:          chrisdone@gmail.com
+copyright:           2013 Chris Done
+category:            Network
+build-type:          Simple
+cabal-version:       >=1.8
+
+library
+  hs-source-dirs:    src/
+  exposed-modules:   Text.Hostname
+  build-depends:     base >= 4 && < 5,
+                     bytestring,
+                     attoparsec
+  ghc-options:       -O2
diff --git a/test/golden-test-cases/hostname-validate.nix.golden b/test/golden-test-cases/hostname-validate.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hostname-validate.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, attoparsec, base, bytestring, fetchurl }:
+mkDerivation {
+  pname = "hostname-validate";
+  version = "1.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ attoparsec base bytestring ];
+  description = "Validate hostnames e.g. localhost or foo.co.uk.";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hsinstall.cabal b/test/golden-test-cases/hsinstall.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hsinstall.cabal
@@ -0,0 +1,45 @@
+name:                hsinstall
+version:             1.6
+synopsis:            Install Haskell software
+description:         This is a utility to install Haskell programs on a system using stack. Even though stack has an `install` command, I found it to be not enough for my needs. This software tries to install the binaries, the LICENSE file and also the resources directory if it finds one. There is also an optional library component to assist with locating installed data files at runtime.
+homepage:            
+license:             ISC
+license-file:        LICENSE
+author:              Dino Morelli
+maintainer:          Dino Morelli <dino@ui3.info>
+copyright:           2016-2017 Dino Morelli
+category:            Utility
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:         GHC >= 8.0.1
+data-files:          resources/foo
+extra-source-files:  changelog.md
+                     doc/hcar/hsinstall.tex
+                     README.md
+                     resources/foo
+                     stack.yaml
+                     util/install.hs
+                     util/prefs/boring
+
+executable an-app
+   hs-source-dirs:     app
+   main-is:            Main.hs
+   ghc-options:        -Wall
+   build-depends:      base >= 4.8 && < 5.0
+                     , directory
+                     , filepath
+                     , hsinstall
+   default-language:   Haskell2010
+
+library
+   hs-source-dirs:     src
+   exposed-modules:    HSInstall
+   ghc-options:        -Wall
+   build-depends:      base >= 4.8 && < 5.0
+                     , directory
+                     , filepath
+   default-language:    Haskell2010
+
+source-repository head
+  type:     darcs
+  location: http://hub.darcs.net/dino/hsinstall
diff --git a/test/golden-test-cases/hsinstall.nix.golden b/test/golden-test-cases/hsinstall.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hsinstall.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, directory, fetchurl, filepath }:
+mkDerivation {
+  pname = "hsinstall";
+  version = "1.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [ base directory filepath ];
+  executableHaskellDepends = [ base directory filepath ];
+  description = "Install Haskell software";
+  license = stdenv.lib.licenses.isc;
+}
diff --git a/test/golden-test-cases/hstatsd.cabal b/test/golden-test-cases/hstatsd.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hstatsd.cabal
@@ -0,0 +1,24 @@
+name:                   hstatsd
+version:                0.1
+stability:              quick-hack
+
+cabal-version:          >= 1.2
+build-type:             Simple
+
+author:                 James Cook <mokus@deepbondi.net>
+maintainer:             James Cook <mokus@deepbondi.net>
+license:                PublicDomain
+homepage:               https://github.com/mokus0/hstatsd
+
+category:               System
+synopsis:               Quick and dirty statsd interface
+description:            Quick and dirty statsd interface
+
+Library
+  hs-source-dirs:       src
+  exposed-modules:      Network.StatsD
+  build-depends:        base >= 3 && < 5,
+                        bytestring,
+                        mtl,
+                        network,
+                        text
diff --git a/test/golden-test-cases/hstatsd.nix.golden b/test/golden-test-cases/hstatsd.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hstatsd.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, bytestring, fetchurl, mtl, network, text }:
+mkDerivation {
+  pname = "hstatsd";
+  version = "0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring mtl network text ];
+  homepage = "https://github.com/mokus0/hstatsd";
+  description = "Quick and dirty statsd interface";
+  license = stdenv.lib.licenses.publicDomain;
+}
diff --git a/test/golden-test-cases/hsx-jmacro.cabal b/test/golden-test-cases/hsx-jmacro.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hsx-jmacro.cabal
@@ -0,0 +1,33 @@
+Name:                hsx-jmacro
+Version:             7.3.8
+Synopsis:            hsp+jmacro support
+Description:         HSP allows for the use of literal XML in Haskell program text. JMacro allows for the use of javascript-syntax for generating javascript in Haskell. This library makes it easy to embed JMacro generated javascript in HSX templates.
+Homepage:            http://www.happstack.com/
+License:             BSD3
+License-file:        LICENSE
+Author:              Jeremy Shaw
+Maintainer:          jeremy@n-heptane.com
+Stability:           Provisional
+Category:            Web
+Build-type:          Simple
+Cabal-version:       >=1.6
+tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+Extra-source-files:  example.hs,
+                     example2.hs,
+                     README.md
+
+source-repository head
+  type: git
+  location: https://github.com/Happstack/hsx-jmacro.git
+
+Library
+  Exposed-modules:   HSP.JMacro
+                     HSP.JMacroT
+
+  Build-depends:
+                     base            > 4      && <5,
+                     hsp            >= 0.9    && < 0.11,
+                     jmacro         >= 0.6    && < 0.7,
+                     mtl            >= 2.0    && < 2.3,
+                     wl-pprint-text == 1.1.*,
+                     text           >= 0.11 && < 1.3
diff --git a/test/golden-test-cases/hsx-jmacro.nix.golden b/test/golden-test-cases/hsx-jmacro.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hsx-jmacro.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, hsp, jmacro, mtl, text
+, wl-pprint-text
+}:
+mkDerivation {
+  pname = "hsx-jmacro";
+  version = "7.3.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base hsp jmacro mtl text wl-pprint-text
+  ];
+  homepage = "http://www.happstack.com/";
+  description = "hsp+jmacro support";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/hsyslog.cabal b/test/golden-test-cases/hsyslog.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hsyslog.cabal
@@ -0,0 +1,77 @@
+name:           hsyslog
+version:        5.0.1
+cabal-version:  >= 1.10
+build-type:     Custom
+license:        BSD3
+license-file:   LICENSE
+copyright:      Copyright (c) 2004-2017 by Peter Simons
+author:         Peter Simons, John Lato, Jonathan Childress
+maintainer:     Peter Simons <simons@cryp.to>
+homepage:       http://github.com/peti/hsyslog
+bug-reports:    http://github.com/peti/hsyslog/issues
+synopsis:       FFI interface to syslog(3) from POSIX.1-2001
+category:       Foreign
+tested-with:    GHC > 7.6 && < 8.3
+
+extra-source-files:
+  c-bits/simple-syslog.c
+  c-bits/make-log-mask.c
+
+description:
+  A Haskell interface to @syslog(3)@ as specified in
+  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/syslog.html POSIX.1-2008>.
+  The entire public API lives in "System.Posix.Syslog". There is a set of exposed
+  modules available underneath that one, which contain various implementation details
+  that may be useful to other developers who want to implement syslog-related
+  functionality. /Users/ of @syslog@, however, do not need them.
+  .
+  An example program that demonstrates how to use this library is available in the
+  <https://github.com/peti/hsyslog/blob/master/example/Main.hs examples> directory of
+  this package.
+
+custom-setup
+  setup-depends: base >= 4 && <5,
+                 Cabal,
+                 cabal-doctest >= 1 && <1.1
+
+source-repository head
+  type:     git
+  location: git://github.com/peti/hsyslog.git
+
+Flag install-examples
+  Description:   Build and install example programs.
+  Default:       False
+
+library
+  exposed-modules:  System.Posix.Syslog
+                    System.Posix.Syslog.Facility
+                    System.Posix.Syslog.Functions
+                    System.Posix.Syslog.LogMask
+                    System.Posix.Syslog.Options
+                    System.Posix.Syslog.Priority
+  build-depends:    base >= 4.6 && < 5
+  other-extensions: ForeignFunctionInterface, DeriveGeneric
+  hs-source-dirs:   src
+  c-sources:        c-bits/simple-syslog.c
+                    c-bits/make-log-mask.c
+  default-language: Haskell2010
+  build-tools:      hsc2hs
+
+test-suite doctests
+  type:             exitcode-stdio-1.0
+  main-is:          doctests.hs
+  hs-source-dirs:   test
+  build-depends:    hsyslog, base, doctest
+  ghc-options:      -threaded
+  default-language: Haskell2010
+
+executable hsyslog-example
+  main-is:            Main.hs
+  hs-source-dirs:     example
+  if flag(install-examples)
+    buildable:        True
+    build-depends:    base, hsyslog, bytestring
+    other-extensions: TypeSynonymInstances, FlexibleInstances
+  else
+    buildable:        False
+  default-language:   Haskell2010
diff --git a/test/golden-test-cases/hsyslog.nix.golden b/test/golden-test-cases/hsyslog.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hsyslog.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, Cabal, cabal-doctest, doctest, fetchurl }:
+mkDerivation {
+  pname = "hsyslog";
+  version = "5.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  setupHaskellDepends = [ base Cabal cabal-doctest ];
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [ base doctest ];
+  homepage = "http://github.com/peti/hsyslog";
+  description = "FFI interface to syslog(3) from POSIX.1-2001";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/htoml.cabal b/test/golden-test-cases/htoml.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/htoml.cabal
@@ -0,0 +1,89 @@
+name:                     htoml
+version:                  1.0.0.3
+synopsis:                 Parser for TOML files
+description:              TOML is an obvious and minimal format for config files.
+                          .
+                          This package provides a TOML parser,
+                          build with the Parsec library. It exposes a JSON
+                          interface using the Aeson library.
+homepage:                 https://github.com/cies/htoml
+bug-reports:              https://github.com/cies/htoml/issues
+license:                  BSD3
+license-file:             LICENSE
+copyright:                (c) 2013-2016 Cies Breijs
+author:                   Cies Breijs
+maintainer:               Cies Breijs <cies % kde ! nl>
+category:                 Data, Text, Parser, Configuration, JSON, Language
+build-type:               Simple
+cabal-version:            >= 1.10
+extra-source-files:       README.md
+                        , CHANGES.md
+                        , test/BurntSushi/fetch-toml-tests.sh
+                        , test/BurntSushi/valid/*.toml
+                        , test/BurntSushi/valid/*.json
+                        , test/BurntSushi/invalid/*.toml
+                        , benchmarks/example.toml
+                        , benchmarks/repeated.toml
+
+source-repository head
+  type:                   git
+  location:               https://github.com/cies/htoml.git
+
+library
+  exposed-modules:        Text.Toml
+                        , Text.Toml.Parser
+                        , Text.Toml.Types
+  ghc-options:            -Wall
+  hs-source-dirs:         src
+  default-language:       Haskell2010
+  build-depends:          base                   >= 4.3    && < 5
+                        , parsec                 >= 3.1.2  && < 4
+                        , containers             >= 0.5
+                        , unordered-containers   >= 0.2
+                        , vector                 >= 0.10
+                        , aeson                  >= 0.8
+                        , text                   >= 1.0    && < 2
+                        , time                   -any
+                        , old-locale             -any
+
+test-suite htoml-test
+  hs-source-dirs:         test
+  ghc-options:            -Wall -threaded -rtsopts -with-rtsopts=-N
+  main-is:                Test.hs
+  other-modules:          BurntSushi
+                        , Text.Toml.Parser.Spec
+  type:                   exitcode-stdio-1.0
+  default-language:       Haskell2010
+  build-depends:          base
+                        , parsec
+                        , containers
+                        , unordered-containers
+                        , vector
+                        , aeson
+                        , text
+                        , time
+			  -- from here non-lib deps
+                        , htoml
+                        , bytestring
+                        , file-embed
+                        , tasty
+                        , tasty-hspec
+                        , tasty-hunit
+
+benchmark benchmarks
+  hs-source-dirs:         benchmarks .
+  ghc-options:            -O2 -Wall -threaded -rtsopts -with-rtsopts=-N
+  main-is:                Benchmarks.hs
+  type:                   exitcode-stdio-1.0
+  default-language:       Haskell2010
+  build-depends:          base
+                        , parsec
+                        , containers
+                        , unordered-containers
+                        , vector
+                        , aeson
+                        , text
+                        , time
+			  -- from here non-lib deps
+                        , htoml
+                        , criterion
diff --git a/test/golden-test-cases/htoml.nix.golden b/test/golden-test-cases/htoml.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/htoml.nix.golden
@@ -0,0 +1,27 @@
+{ mkDerivation, aeson, base, bytestring, containers, criterion
+, fetchurl, file-embed, old-locale, parsec, tasty, tasty-hspec
+, tasty-hunit, text, time, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "htoml";
+  version = "1.0.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base containers old-locale parsec text time
+    unordered-containers vector
+  ];
+  testHaskellDepends = [
+    aeson base bytestring containers file-embed parsec tasty
+    tasty-hspec tasty-hunit text time unordered-containers vector
+  ];
+  benchmarkHaskellDepends = [
+    aeson base containers criterion parsec text time
+    unordered-containers vector
+  ];
+  homepage = "https://github.com/cies/htoml";
+  description = "Parser for TOML files";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/http-conduit.cabal b/test/golden-test-cases/http-conduit.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/http-conduit.cabal
@@ -0,0 +1,82 @@
+name:            http-conduit
+version:         2.2.4
+license:         BSD3
+license-file:    LICENSE
+author:          Michael Snoyman <michael@snoyman.com>
+maintainer:      Michael Snoyman <michael@snoyman.com>
+synopsis:        HTTP client package with conduit interface and HTTPS support.
+description:         Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/http-conduit>.
+category:        Web, Conduit
+stability:       Stable
+cabal-version:   >= 1.8
+build-type:      Simple
+homepage:        http://www.yesodweb.com/book/http-conduit
+extra-source-files: test/main.hs
+                  , test/CookieTest.hs
+                  , multipart-example.bin
+                  , nyan.gif
+                  , certificate.pem
+                  , key.pem
+                  , README.md
+                  , ChangeLog.md
+
+library
+    build-depends: base                  >= 4       && < 5
+                 , aeson                 >= 0.8
+                 , bytestring            >= 0.9.1.4
+                 , transformers          >= 0.2
+                 , resourcet             >= 1.1     && < 1.2
+                 , conduit               >= 0.5.5   && < 1.3
+                 , conduit-extra         >= 1.1.5
+                 , http-types            >= 0.7
+                 , lifted-base           >= 0.1
+                 , http-client           >= 0.5     && < 0.6
+                 , http-client-tls       >= 0.3     && < 0.4
+                 , monad-control
+                 , mtl
+                 , exceptions            >= 0.6
+    exposed-modules: Network.HTTP.Conduit
+                     Network.HTTP.Client.Conduit
+                     Network.HTTP.Simple
+    ghc-options:     -Wall
+
+test-suite test
+    main-is: main.hs
+    other-modules: CookieTest
+    type: exitcode-stdio-1.0
+    hs-source-dirs: test
+
+    ghc-options:   -Wall
+    cpp-options:   -DDEBUG
+    build-depends: base >= 4 && < 5
+                 , HUnit
+                 , hspec >= 1.3
+                 , data-default-class
+                 , connection >= 0.2
+                 , warp-tls
+                 , time
+                 , blaze-builder
+                 , bytestring
+                 , text
+                 , transformers
+                 , conduit >= 1.1
+                 , utf8-string
+                 , case-insensitive
+                 , lifted-base
+                 , network
+                 , wai >= 3.0 && < 3.3
+                 , warp >= 3.0.0.2 && < 3.3
+                 , wai-conduit
+                 , http-types
+                 , cookie
+                 , http-client
+                 , http-conduit
+                 , conduit-extra
+                 , streaming-commons
+                 , aeson
+                 , temporary
+                 , resourcet
+
+source-repository head
+  type:     git
+  location: git://github.com/snoyberg/http-client.git
diff --git a/test/golden-test-cases/http-conduit.nix.golden b/test/golden-test-cases/http-conduit.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/http-conduit.nix.golden
@@ -0,0 +1,31 @@
+{ mkDerivation, aeson, base, blaze-builder, bytestring
+, case-insensitive, conduit, conduit-extra, connection, cookie
+, data-default-class, exceptions, fetchurl, hspec, http-client
+, http-client-tls, http-types, HUnit, lifted-base, monad-control
+, mtl, network, resourcet, streaming-commons, temporary, text, time
+, transformers, utf8-string, wai, wai-conduit, warp, warp-tls
+}:
+mkDerivation {
+  pname = "http-conduit";
+  version = "2.2.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bytestring conduit conduit-extra exceptions http-client
+    http-client-tls http-types lifted-base monad-control mtl resourcet
+    transformers
+  ];
+  testHaskellDepends = [
+    aeson base blaze-builder bytestring case-insensitive conduit
+    conduit-extra connection cookie data-default-class hspec
+    http-client http-types HUnit lifted-base network resourcet
+    streaming-commons temporary text time transformers utf8-string wai
+    wai-conduit warp warp-tls
+  ];
+  doCheck = false;
+  homepage = "http://www.yesodweb.com/book/http-conduit";
+  description = "HTTP client package with conduit interface and HTTPS support";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/http-link-header.cabal b/test/golden-test-cases/http-link-header.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/http-link-header.cabal
@@ -0,0 +1,74 @@
+name:            http-link-header
+version:         1.0.3
+synopsis:        A parser and writer for the HTTP Link header as specified in RFC 5988 "Web Linking".
+description:     https://github.com/myfreeweb/http-link-header
+category:        Web
+homepage:        https://github.com/myfreeweb/http-link-header
+author:          Greg V
+copyright:       2014-2016 Greg V <greg@unrelenting.technology>
+maintainer:      greg@unrelenting.technology
+license:         PublicDomain
+license-file:    UNLICENSE
+build-type:      Simple
+cabal-version:   >= 1.10
+extra-source-files:
+    README.md
+tested-with:
+    GHC == 8.0.1
+
+source-repository head
+    type: git
+    location: git://github.com/myfreeweb/http-link-header.git
+
+library
+    build-depends:
+        base >= 4.3.0.0 && < 5
+      , text
+      , bytestring
+      , errors
+      , network-uri
+      , http-api-data
+      , attoparsec
+      , bytestring-conversion
+    default-language: Haskell2010
+    exposed-modules:
+        Network.HTTP.Link
+        Network.HTTP.Link.Types
+        Network.HTTP.Link.Parser
+        Network.HTTP.Link.Writer
+    ghc-options: -Wall
+    hs-source-dirs: library
+
+test-suite tests
+    build-depends:
+        base >= 4.3.0.0 && < 5
+      , text
+      , http-link-header
+      , hspec
+      , QuickCheck
+      , hspec-attoparsec
+    default-language: Haskell2010
+    ghc-options: -threaded -fhpc -Wall
+    hs-source-dirs: test-suite
+    main-is: Spec.hs
+    other-modules:
+        Network.HTTP.Link.ParserSpec
+        Network.HTTP.Link.WriterSpec
+        Network.HTTP.LinkSpec
+    type: exitcode-stdio-1.0
+
+benchmark benchmarks
+    build-depends:
+        base >= 4.3.0.0 && < 5
+      , text
+      , http-link-header
+      , directory
+      , network-uri
+      , transformers
+      , criterion
+    default-language: Haskell2010
+    hs-source-dirs: benchmark
+    main-is: Bench.hs
+    other-modules: ParserBench
+                   WriterBench
+    type: exitcode-stdio-1.0
diff --git a/test/golden-test-cases/http-link-header.nix.golden b/test/golden-test-cases/http-link-header.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/http-link-header.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, attoparsec, base, bytestring, bytestring-conversion
+, criterion, directory, errors, fetchurl, hspec, hspec-attoparsec
+, http-api-data, network-uri, QuickCheck, text, transformers
+}:
+mkDerivation {
+  pname = "http-link-header";
+  version = "1.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base bytestring bytestring-conversion errors
+    http-api-data network-uri text
+  ];
+  testHaskellDepends = [
+    base hspec hspec-attoparsec QuickCheck text
+  ];
+  benchmarkHaskellDepends = [
+    base criterion directory network-uri text transformers
+  ];
+  homepage = "https://github.com/myfreeweb/http-link-header";
+  description = "A parser and writer for the HTTP Link header as specified in RFC 5988 \"Web Linking\"";
+  license = stdenv.lib.licenses.publicDomain;
+}
diff --git a/test/golden-test-cases/http-media.cabal b/test/golden-test-cases/http-media.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/http-media.cabal
@@ -0,0 +1,128 @@
+name:          http-media
+version:       0.7.1.1
+license:       MIT
+license-file:  LICENSE
+author:        Timothy Jones
+maintainer:    Timothy Jones <tim@zmthy.net>
+homepage:      https://github.com/zmthy/http-media
+bug-reports:   https://github.com/zmthy/http-media/issues
+copyright:     (c) 2012-2017 Timothy Jones
+category:      Web
+build-type:    Simple
+cabal-version: >= 1.10
+synopsis:      Processing HTTP Content-Type and Accept headers
+description:
+  This library is intended to be a comprehensive solution to parsing and
+  selecting quality-indexed values in HTTP headers.  It is capable of
+  parsing both media types and language parameters from the Accept and
+  Content header families, and can be extended to match against other
+  accept headers as well.  Selecting the appropriate header value is
+  achieved by comparing a list of server options against the
+  quality-indexed values supplied by the client.
+  .
+  In the following example, the Accept header is parsed and then matched
+  against a list of server options to serve the appropriate media using
+  'mapAcceptMedia':
+  .
+  > getHeader >>= maybe send406Error sendResourceWith . mapAcceptMedia
+  >     [ ("text/html",        asHtml)
+  >     , ("application/json", asJson)
+  >     ]
+  .
+  Similarly, the Content-Type header can be used to produce a parser for
+  request bodies based on the given content type with 'mapContentMedia':
+  .
+  > getContentType >>= maybe send415Error readRequestBodyWith . mapContentMedia
+  >     [ ("application/json", parseJson)
+  >     , ("text/plain",       parseText)
+  >     ]
+  .
+  The API is agnostic to your choice of server.
+
+extra-source-files:
+  CHANGES.md
+
+library
+  default-language: Haskell2010
+
+  ghc-options: -Wall
+
+  hs-source-dirs:
+    src
+
+  default-extensions:
+    OverloadedStrings
+
+  other-extensions:
+    CPP
+
+  exposed-modules:
+    Network.HTTP.Media
+    Network.HTTP.Media.Accept
+    Network.HTTP.Media.Language
+    Network.HTTP.Media.MediaType
+    Network.HTTP.Media.RenderHeader
+
+  other-modules:
+    Network.HTTP.Media.Language.Internal
+    Network.HTTP.Media.MediaType.Internal
+    Network.HTTP.Media.Quality
+    Network.HTTP.Media.Utils
+
+  build-depends:
+    base             >= 4.7  && < 4.11,
+    bytestring       >= 0.10 && < 0.11,
+    case-insensitive >= 1.0  && < 1.3,
+    containers       >= 0.5  && < 0.6,
+    utf8-string      >= 0.3  && < 1.1
+
+test-suite test-http-media
+  type:    exitcode-stdio-1.0
+  main-is: Test.hs
+
+  default-language: Haskell2010
+
+  ghc-options: -Wall
+
+  hs-source-dirs:
+    src
+    test
+
+  default-extensions:
+    OverloadedStrings
+
+  other-extensions:
+    CPP
+    TupleSections
+
+  other-modules:
+    Network.HTTP.Media
+    Network.HTTP.Media.Accept
+    Network.HTTP.Media.Accept.Tests
+    Network.HTTP.Media.Gen
+    Network.HTTP.Media.Language
+    Network.HTTP.Media.Language.Gen
+    Network.HTTP.Media.Language.Internal
+    Network.HTTP.Media.Language.Tests
+    Network.HTTP.Media.MediaType
+    Network.HTTP.Media.MediaType.Gen
+    Network.HTTP.Media.MediaType.Internal
+    Network.HTTP.Media.MediaType.Tests
+    Network.HTTP.Media.Quality
+    Network.HTTP.Media.RenderHeader
+    Network.HTTP.Media.Tests
+    Network.HTTP.Media.Utils
+
+  build-depends:
+    base                       >= 4.7  && < 4.11,
+    bytestring                 >= 0.10 && < 0.11,
+    case-insensitive           >= 1.0  && < 1.3,
+    containers                 >= 0.5  && < 0.6,
+    utf8-string                >= 0.3  && < 1.1,
+    QuickCheck                 >= 2.6  && < 2.11,
+    test-framework             >= 0.8  && < 0.9,
+    test-framework-quickcheck2 >= 0.3  && < 0.4
+
+source-repository head
+  type:     git
+  location: https://github.com/zmthy/http-media
diff --git a/test/golden-test-cases/http-media.nix.golden b/test/golden-test-cases/http-media.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/http-media.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, bytestring, case-insensitive, containers
+, fetchurl, QuickCheck, test-framework, test-framework-quickcheck2
+, utf8-string
+}:
+mkDerivation {
+  pname = "http-media";
+  version = "0.7.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring case-insensitive containers utf8-string
+  ];
+  testHaskellDepends = [
+    base bytestring case-insensitive containers QuickCheck
+    test-framework test-framework-quickcheck2 utf8-string
+  ];
+  homepage = "https://github.com/zmthy/http-media";
+  description = "Processing HTTP Content-Type and Accept headers";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/hxt-charproperties.cabal b/test/golden-test-cases/hxt-charproperties.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hxt-charproperties.cabal
@@ -0,0 +1,46 @@
+Name:                hxt-charproperties
+Version:             9.2.0.1
+Synopsis:            Character properties and classes for XML and Unicode
+Description:         Character proprties defined by XML and Unicode standards.
+                     These modules contain predicates for Unicode blocks and char proprties
+                     and character predicates defined by XML.
+                     Supported Unicode version is 7.0.0
+Homepage:            https://github.com/UweSchmidt/hxt
+License:             MIT
+License-file:        LICENSE
+Author:              Uwe Schmidt
+Maintainer:          Uwe Schmidt <uwe@fh-wedel.de>
+Copyright:           Copyright (c) 2010-2014 Uwe Schmidt
+Stability:           Stable
+Category:            Text
+Build-type:          Simple
+
+Cabal-version:       >=1.6
+
+Extra-source-files:
+  gen/Makefile
+  gen/Blocks.txt
+  gen/UnicodeData.txt
+  gen/GenBlocks.hs
+  gen/GenCharProps.hs
+
+Library
+  Exposed-modules:     
+    Data.Char.Properties.UnicodeBlocks
+    Data.Char.Properties.UnicodeCharProps
+    Data.Char.Properties.XMLCharProps
+    Data.Set.CharSet
+
+  Build-depends:      base >= 4 && < 5 
+  
+  -- Modules not exported by this package.
+  -- Other-modules:       
+  
+  hs-source-dirs: src
+
+  ghc-options: -Wall
+  ghc-prof-options: -caf-all
+
+Source-Repository head
+  Type:     git
+  Location: git://github.com/UweSchmidt/hxt.git
diff --git a/test/golden-test-cases/hxt-charproperties.nix.golden b/test/golden-test-cases/hxt-charproperties.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hxt-charproperties.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "hxt-charproperties";
+  version = "9.2.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/UweSchmidt/hxt";
+  description = "Character properties and classes for XML and Unicode";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/hxt-expat.cabal b/test/golden-test-cases/hxt-expat.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hxt-expat.cabal
@@ -0,0 +1,36 @@
+Name:           hxt-expat
+Version:        9.1.1
+Synopsis:       Expat parser for HXT
+Description:    The Expat interface for the HXT.
+License:        OtherLicense
+License-file:   LICENSE
+Author:         Uwe Schmidt
+Maintainer:     Uwe Schmidt <uwe@fh-wedel.de>
+Stability:      Experimental
+Category:       XML
+Homepage:       http://www.fh-wedel.de/~si/HXmlToolbox/index.html
+Copyright:      Copyright (c) 2010 Uwe Schmidt
+Build-type:     Simple
+Cabal-version:  >=1.6
+
+extra-source-files:
+ examples/hparser/HXmlParser.hs
+
+library
+ exposed-modules:
+  Text.XML.HXT.Expat
+
+ other-modules:
+  Text.XML.HXT.Arrow.ExpatInterface
+
+ hs-source-dirs: src
+
+ ghc-options: -Wall
+ ghc-prof-options: -auto-all -caf-all
+
+ extensions: MultiParamTypeClasses DeriveDataTypeable FunctionalDependencies FlexibleInstances
+
+ build-depends: base               >= 4      && < 5,
+                bytestring         >= 0.9    && < 1,
+                hexpat             >= 0.19.3 && < 1,
+                hxt                >= 9.1    && < 10
diff --git a/test/golden-test-cases/hxt-expat.nix.golden b/test/golden-test-cases/hxt-expat.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hxt-expat.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, bytestring, fetchurl, hexpat, hxt }:
+mkDerivation {
+  pname = "hxt-expat";
+  version = "9.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring hexpat hxt ];
+  homepage = "http://www.fh-wedel.de/~si/HXmlToolbox/index.html";
+  description = "Expat parser for HXT";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/hxt-tagsoup.cabal b/test/golden-test-cases/hxt-tagsoup.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hxt-tagsoup.cabal
@@ -0,0 +1,42 @@
+-- arch-tag: Haskell XML Toolbox main description file
+Name:           hxt-tagsoup
+Version:        9.1.4
+Synopsis:       TagSoup parser for HXT
+Description:    The Tagsoup interface for the HXT lazy HTML parser.
+License:        OtherLicense
+License-file:   LICENSE
+Author:         Uwe Schmidt
+Maintainer:     Uwe Schmidt <uwe@fh-wedel.de>
+Stability:      Stable
+Category:       XML
+Homepage:       https://github.com/UweSchmidt/hxt
+Copyright:      Copyright (c) 2016 Uwe Schmidt
+Build-type:     Simple
+Cabal-version:  >=1.6
+
+extra-source-files:
+ examples/hparser/HXmlParser.hs
+
+library
+ exposed-modules:
+  Text.XML.HXT.TagSoup
+
+ other-modules:
+  Text.XML.HXT.Arrow.TagSoupInterface,
+  Text.XML.HXT.Parser.TagSoup
+
+ hs-source-dirs: src
+
+ ghc-options: -Wall
+ ghc-prof-options: -caf-all
+
+ extensions: MultiParamTypeClasses DeriveDataTypeable FunctionalDependencies FlexibleInstances CPP
+
+ build-depends: base               >= 4 && < 5,
+                tagsoup            >= 0.13,
+                hxt-charproperties >= 9,
+                hxt-unicode        >= 9,
+                hxt                >= 9.1
+Source-Repository head
+  Type:     git
+  Location: git://github.com/UweSchmidt/hxt.git
diff --git a/test/golden-test-cases/hxt-tagsoup.nix.golden b/test/golden-test-cases/hxt-tagsoup.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/hxt-tagsoup.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, hxt, hxt-charproperties
+, hxt-unicode, tagsoup
+}:
+mkDerivation {
+  pname = "hxt-tagsoup";
+  version = "9.1.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base hxt hxt-charproperties hxt-unicode tagsoup
+  ];
+  homepage = "https://github.com/UweSchmidt/hxt";
+  description = "TagSoup parser for HXT";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/iconv.cabal b/test/golden-test-cases/iconv.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/iconv.cabal
@@ -0,0 +1,34 @@
+name:            iconv
+version:         0.4.1.3
+copyright:       (c) 2006-20015 Duncan Coutts
+license:         BSD3
+license-file:    LICENSE
+author:          Duncan Coutts <duncan@community.haskell.org>
+maintainer:      Duncan Coutts <duncan@community.haskell.org>
+category:        Text
+synopsis:        String encoding conversion
+description:     Provides an interface to the POSIX iconv library functions
+                 for string encoding conversion.
+build-type:      Simple
+cabal-version:   >= 1.6
+extra-source-files: changelog.md README.md examples/hiconv.hs cbits/hsiconv.h
+
+source-repository head
+  type: darcs
+  location: http://code.haskell.org/iconv/
+
+library
+  exposed-modules: Codec.Text.IConv
+  other-modules:   Codec.Text.IConv.Internal
+  build-depends:   base >= 3 && < 5,
+                   bytestring == 0.9.* || ==0.10.*
+  extensions:      ForeignFunctionInterface
+  includes:        hsiconv.h
+  include-dirs:    cbits
+  c-sources:       cbits/hsiconv.c
+  if os(darwin) || os(freebsd)
+    -- on many systems the iconv api is part of the standard C library
+    -- but on some others we have to link to an external libiconv:
+    extra-libraries: iconv
+
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/iconv.nix.golden b/test/golden-test-cases/iconv.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/iconv.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, bytestring, fetchurl }:
+mkDerivation {
+  pname = "iconv";
+  version = "0.4.1.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring ];
+  description = "String encoding conversion";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/incremental-parser.cabal b/test/golden-test-cases/incremental-parser.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/incremental-parser.cabal
@@ -0,0 +1,55 @@
+Name:                incremental-parser
+Version:             0.2.5.2
+Cabal-Version:       >= 1.10
+Build-Type:          Simple
+Synopsis:            Generic parser library capable of providing partial results from partial input.
+Category:            Parsing
+Tested-With:         GHC
+Description:
+
+  This package defines yet another parser combinator library. This one is implemented using the concept of Brzozowski
+  derivatives, tweaked and optimized to work with any monoidal input type. Lists, ByteString, and Text are supported out
+  of the box, as well as any other data type for which the monoid-subclasses package defines instances. If the parser
+  result is also a monoid, its chunks can be extracted incrementally, before the complete input is parsed.
+  
+License:             GPL
+License-file:        LICENSE.txt
+Copyright:           (c) 2011-2017 Mario Blazevic
+Author:              Mario Blazevic
+Maintainer:          blamario@yahoo.com
+Homepage:            https://github.com/blamario/incremental-parser
+Extra-Source-Files:  Benchmarks/airports.dat, README.md
+
+Source-repository head
+  type:              git
+  location:          https://github.com/blamario/incremental-parser
+
+Library
+  Exposed-Modules:   Text.ParserCombinators.Incremental,
+                     Text.ParserCombinators.Incremental.LeftBiasedLocal, Text.ParserCombinators.Incremental.Symmetric,
+                     Control.Applicative.Monoid
+  Build-Depends:     base < 5, monoid-subclasses < 0.5
+  if impl(ghc >= 7.0.0)
+     default-language: Haskell2010
+
+test-suite Main
+  Type:              exitcode-stdio-1.0
+  x-uses-tf:         true
+  Default-Language:  Haskell2010
+  Build-Depends:     base < 5, monoid-subclasses < 0.5,
+                     QuickCheck >= 2 && < 3, checkers >= 0.3.2 && < 0.5,
+                     tasty >= 0.7 && < 0.13, tasty-quickcheck >= 0.7 && < 1.0
+  Main-is:           Test/TestIncrementalParser.hs
+  Other-Modules:     Text.ParserCombinators.Incremental,
+                     Text.ParserCombinators.Incremental.LeftBiasedLocal, Text.ParserCombinators.Incremental.Symmetric,
+                     Control.Applicative.Monoid
+  default-language:  Haskell2010
+
+benchmark CSV
+  type: exitcode-stdio-1.0
+  Default-Language:  Haskell2010
+  hs-source-dirs:    Benchmarks
+  ghc-options:       -O2 -Wall -rtsopts
+  main-is:           CSV.hs
+  Build-Depends:     base < 5, monoid-subclasses < 0.5, incremental-parser,
+                     bytestring >= 0.10.4.0, criterion >= 1.0, deepseq >= 1.1, text >= 1.1.1.0
diff --git a/test/golden-test-cases/incremental-parser.nix.golden b/test/golden-test-cases/incremental-parser.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/incremental-parser.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, bytestring, checkers, criterion, deepseq
+, fetchurl, monoid-subclasses, QuickCheck, tasty, tasty-quickcheck
+, text
+}:
+mkDerivation {
+  pname = "incremental-parser";
+  version = "0.2.5.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base monoid-subclasses ];
+  testHaskellDepends = [
+    base checkers monoid-subclasses QuickCheck tasty tasty-quickcheck
+  ];
+  benchmarkHaskellDepends = [
+    base bytestring criterion deepseq monoid-subclasses text
+  ];
+  homepage = "https://github.com/blamario/incremental-parser";
+  description = "Generic parser library capable of providing partial results from partial input";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/indentation-core.cabal b/test/golden-test-cases/indentation-core.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/indentation-core.cabal
@@ -0,0 +1,39 @@
+name:                indentation-core
+version:             0.0.0.1
+synopsis:            Indentation sensitive parsing combinators core library
+description:         Indentation sensitive parsing combinators core library
+                     .                     
+                     This is the core for the indentation package.
+                     For common use, consider one of the front-ends:
+                     indentation-parsec or indentation-trifecta.  For
+                     both, or for backward compatability, install
+                     indentation.
+
+license:             BSD3
+license-file:        LICENSE
+author:              Michael D. Adams <http://michaeldadams.org/>
+maintainer:          Ömer Sinan Ağacan <omeragacan@gmail.com>
+                     Aleksey Kliger <aleksey@lambdageek.org>
+category:            Parsing
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:  CHANGELOG.md
+
+homepage:            https://bitbucket.org/adamsmd/indentation
+bug-reports:         https://bitbucket.org/adamsmd/indentation/issues
+tested-with:         GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.1
+
+source-repository head
+  type:                git
+  location:            https://bitbucket.org/adamsmd/indentation.git
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Text.Parser.Indentation.Implementation
+  build-depends:       base >=4.6 && <4.12,
+                       mtl >=2.1
+
+  default-language:    Haskell2010
+
+  ghc-options:         -Wall
+
diff --git a/test/golden-test-cases/indentation-core.nix.golden b/test/golden-test-cases/indentation-core.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/indentation-core.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, mtl }:
+mkDerivation {
+  pname = "indentation-core";
+  version = "0.0.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base mtl ];
+  homepage = "https://bitbucket.org/adamsmd/indentation";
+  description = "Indentation sensitive parsing combinators core library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/indentation-parsec.cabal b/test/golden-test-cases/indentation-parsec.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/indentation-parsec.cabal
@@ -0,0 +1,70 @@
+name:                indentation-parsec
+version:             0.0.0.1
+synopsis:            Indentation sensitive parsing combinators for Parsec
+description:         Indentation sensitive parsing combinators for Parsec
+                     .                     
+                     See
+                     .
+                         __Michael D. Adams and Ömer S. Ağacan__.
+                         Indentation-sensitive parsing for Parsec.
+                         In /Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell/,
+                         Haskell ’14, pages 121–132.
+                         ACM, New York, NY, USA, September 2014. ISBN 978-1-4503-3041-1.
+                         <http://dx.doi.org/10.1145/2633357.2633369 doi:10.1145/2633357.2633369>.
+                     .
+                     This package provides indentation combinators for
+                     Parsec.  For Trifecta, install
+                     indentation-trifecta.  For backward compatability
+                     or to install both, install indentation.
+
+
+license:             BSD3
+license-file:        LICENSE
+author:              Michael D. Adams <http://michaeldadams.org/>
+maintainer:          Ömer Sinan Ağacan <omeragacan@gmail.com>
+                     Aleksey Kliger <aleksey@lambdageek.org>
+category:            Parsing
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:  CHANGELOG.md
+                     src/Text/Parsec/Indentation/Examples/*.hs
+
+homepage:            https://bitbucket.org/adamsmd/indentation
+bug-reports:         https://bitbucket.org/adamsmd/indentation/issues
+tested-with:         GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.2.1
+
+source-repository head
+  type:                git
+  location:            https://bitbucket.org/adamsmd/indentation.git
+
+library
+  hs-source-dirs:      src
+  build-depends:       base >=4.6 && <4.12,
+                       mtl >=2.1,
+                       indentation-core == 0.0.0.1,
+                       parsec >=3.1.5
+  exposed-modules:     Text.Parsec.Indentation
+                     , Text.Parsec.Indentation.Char
+                     , Text.Parsec.Indentation.Token
+
+  default-language:    Haskell2010
+
+  ghc-options:         -Wall
+
+test-suite test-indentation
+  default-language:
+    Haskell2010
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    tests
+  main-is:          all-tests.hs
+  build-depends:
+      parsec
+  other-modules:
+      ParensParsec
+  build-depends:
+      base >= 4 && < 5
+    , tasty >= 0.10
+    , tasty-hunit >= 0.9
+    , indentation-parsec
diff --git a/test/golden-test-cases/indentation-parsec.nix.golden b/test/golden-test-cases/indentation-parsec.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/indentation-parsec.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, fetchurl, indentation-core, mtl, parsec
+, tasty, tasty-hunit
+}:
+mkDerivation {
+  pname = "indentation-parsec";
+  version = "0.0.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base indentation-core mtl parsec ];
+  testHaskellDepends = [ base parsec tasty tasty-hunit ];
+  homepage = "https://bitbucket.org/adamsmd/indentation";
+  description = "Indentation sensitive parsing combinators for Parsec";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/inline-c-cpp.cabal b/test/golden-test-cases/inline-c-cpp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/inline-c-cpp.cabal
@@ -0,0 +1,41 @@
+name:                inline-c-cpp
+version:             0.2.1.0
+synopsis:            Lets you embed C++ code into Haskell.
+description:         Utilities to inline C++ code into Haskell using inline-c.  See
+                     tests for example on how to build.
+license:             MIT
+license-file:        LICENSE
+author:              Francesco Mazzoli
+maintainer:          francesco@fpcomplete.com
+copyright:           (c) 2015-2016 FP Complete Corporation, (c) 2017 Francesco Mazzoli
+category:            FFI
+tested-with:         GHC == 8.2.1
+build-type:          Simple
+cabal-version:       >=1.10
+
+source-repository head
+  type:     git
+  location: https://github.com/fpco/inline-c
+
+library
+  exposed-modules:     Language.C.Inline.Cpp
+                       Language.C.Inline.Cpp.Exceptions
+  ghc-options:         -Wall
+  build-depends:       base >=4.7 && <5
+                     , inline-c >= 0.6.0.0
+                     , template-haskell
+                     , safe-exceptions
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+test-suite tests
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             tests.hs
+  build-depends:       base >=4 && <5
+                     , inline-c
+                     , inline-c-cpp
+                     , safe-exceptions
+                     , hspec
+  default-language:    Haskell2010
+  extra-libraries:     stdc++
diff --git a/test/golden-test-cases/inline-c-cpp.nix.golden b/test/golden-test-cases/inline-c-cpp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/inline-c-cpp.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, hspec, inline-c, safe-exceptions
+, template-haskell
+}:
+mkDerivation {
+  pname = "inline-c-cpp";
+  version = "0.2.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base inline-c safe-exceptions template-haskell
+  ];
+  testHaskellDepends = [ base hspec inline-c safe-exceptions ];
+  description = "Lets you embed C++ code into Haskell";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/integer-logarithms.cabal b/test/golden-test-cases/integer-logarithms.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/integer-logarithms.cabal
@@ -0,0 +1,111 @@
+name:               integer-logarithms
+version:            1.0.2
+cabal-version:      >= 1.10
+author:             Daniel Fischer
+copyright:          (c) 2011 Daniel Fischer
+license:            MIT
+license-file:       LICENSE
+maintainer:         Oleg Grenrus <oleg.grenrus@iki.fi>
+build-type:         Simple
+stability:          Provisional
+homepage:           https://github.com/phadej/integer-logarithms
+bug-reports:        https://github.com/phadej/integer-logarithms/issues
+
+synopsis:           Integer logarithms.
+description:
+  "Math.NumberTheory.Logarithms" and "Math.NumberTheory.Powers.Integer"
+  from the arithmoi package.
+  .
+  Also provides "GHC.Integer.Logarithms.Compat" and
+  "Math.NumberTheory.Power.Natural" modules, as well as some
+  additional functions in migrated modules.
+
+category:           Math, Algorithms, Number Theory
+
+tested-with         :
+  GHC==7.0.4,
+  GHC==7.2.2,
+  GHC==7.4.2,
+  GHC==7.6.3,
+  GHC==7.8.4,
+  GHC==7.10.3,
+  GHC==8.0.2,
+  GHC==8.2.1
+
+extra-source-files  : readme.md changelog.md
+
+flag integer-gmp
+  description:  integer-gmp or integer-simple
+  default:      True
+  manual:       False
+
+flag check-bounds
+  description:  Replace unsafe array operations with safe ones
+  default:      False
+  manual:       True
+
+library
+  default-language: Haskell2010
+  hs-source-dirs: src
+  build-depends:
+    base >= 4.3 && < 4.11,
+    array >= 0.3 && < 0.6,
+    ghc-prim < 0.6
+  if impl(ghc >= 7.10)
+    cpp-options: -DBase48
+  else
+    build-depends: nats >= 1.1 && <1.2
+
+  if flag(integer-gmp)
+    build-depends:
+      integer-gmp < 1.1
+  else
+    build-depends:
+      integer-simple
+
+  exposed-modules:
+    Math.NumberTheory.Logarithms
+    Math.NumberTheory.Powers.Integer
+    Math.NumberTheory.Powers.Natural
+    GHC.Integer.Logarithms.Compat
+  other-extensions:
+    BangPatterns
+    CPP
+    MagicHash
+
+  ghc-options: -O2 -Wall
+  if flag(check-bounds)
+    cpp-options: -DCheckBounds
+
+source-repository head
+  type:     git
+  location: https://github.com/phadej/integer-logarithms
+
+test-suite spec
+  type:                 exitcode-stdio-1.0
+  hs-source-dirs:       test-suite
+  ghc-options:          -Wall
+  main-is:              Test.hs
+  default-language:     Haskell2010
+  other-extensions:
+    StandaloneDeriving
+    FlexibleContexts
+    FlexibleInstances
+    GeneralizedNewtypeDeriving
+    MultiParamTypeClasses
+  build-depends:
+    base,
+    integer-logarithms,
+    tasty >= 0.10 && < 0.12,
+    tasty-smallcheck >= 0.8 && < 0.9,
+    tasty-quickcheck >= 0.8 && < 0.10,
+    tasty-hunit >= 0.9 && < 0.10,
+    QuickCheck >= 2.10 && < 2.11,
+    smallcheck >= 1.1 && < 1.2
+  if !impl(ghc >= 7.10)
+    build-depends: nats >= 1.1 && <1.2
+
+  other-modules:
+    Math.NumberTheory.LogarithmsTests
+    Math.NumberTheory.TestUtils
+    Orphans
diff --git a/test/golden-test-cases/integer-logarithms.nix.golden b/test/golden-test-cases/integer-logarithms.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/integer-logarithms.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, array, base, fetchurl, ghc-prim, integer-gmp
+, QuickCheck, smallcheck, tasty, tasty-hunit, tasty-quickcheck
+, tasty-smallcheck
+}:
+mkDerivation {
+  pname = "integer-logarithms";
+  version = "1.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ array base ghc-prim integer-gmp ];
+  testHaskellDepends = [
+    base QuickCheck smallcheck tasty tasty-hunit tasty-quickcheck
+    tasty-smallcheck
+  ];
+  homepage = "https://github.com/phadej/integer-logarithms";
+  description = "Integer logarithms";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/intero.cabal b/test/golden-test-cases/intero.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/intero.cabal
@@ -0,0 +1,116 @@
+name:
+  intero
+version:
+  0.1.24
+synopsis:
+  Complete interactive development program for Haskell
+license:
+  BSD3
+homepage:
+  https://github.com/commercialhaskell/intero
+license-file:
+  LICENSE
+author:
+  Chris Done, The University of Glasgow
+maintainer:
+  chrisdone@fpcomplete.com
+copyright:
+  2016 FP Complete,
+  2016 Chris Done,
+  2012 Kazu Yamamoto,
+  2008 Claus Reinke,
+  2005 The University of Glasgow
+category:
+  Development
+build-type:
+  Simple
+cabal-version:
+  >= 1.14
+stability:
+  Stable
+extra-source-files:
+  cbits/HsVersions.h
+  cbits/PosixSource.h
+  CHANGELOG
+  README.md
+data-files:
+  elisp/*.el
+source-repository head
+  type:
+    git
+  location:
+    git://github.com/commercialhaskell/intero.git
+
+executable intero
+  default-language:
+    Haskell2010
+  main-is:
+    Main.hs
+  ghc-options:
+    -Wall -O2 -threaded -rtsopts
+  include-dirs:
+    cbits/
+  hs-source-dirs:
+    src/
+  c-sources:
+    cbits/hschooks.c
+  cpp-options:
+    -DGHCI
+  cc-options:
+    -fPIC
+  other-modules:
+    InteractiveUI
+    GhciMonad
+    GhciTags
+    GhciTypes
+    GhciInfo
+    GhciFind
+    Paths_intero
+  build-depends:
+    base < 5,
+    array,
+    bytestring,
+    directory,
+    filepath,
+    -- We permit any 8.0.1.* or 8.0.2.* or 8.2.1
+    ghc >= 7.8 && <= 8.2.2,
+    ghc-paths,
+    haskeline,
+    process,
+    transformers,
+    syb,
+    containers,
+    time
+
+  if impl(ghc>=8.0.1)
+    build-depends:
+      ghci,
+      ghc-boot-th
+
+  if os(windows)
+    build-depends:
+      Win32
+  else
+    build-depends:
+      unix
+    ghc-options:
+      -dynamic
+
+test-suite intero-test
+  default-language:
+    Haskell2010
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    src/test
+  main-is:
+    Main.hs
+  build-depends:
+    base,
+    hspec,
+    temporary,
+    process,
+    transformers,
+    directory,
+    regex-compat,
+    filepath
diff --git a/test/golden-test-cases/intero.nix.golden b/test/golden-test-cases/intero.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/intero.nix.golden
@@ -0,0 +1,27 @@
+{ mkDerivation, array, base, bytestring, containers, directory
+, fetchurl, filepath, ghc, ghc-boot-th, ghc-paths, ghci, haskeline
+, hspec, process, regex-compat, syb, temporary, time, transformers
+, unix
+}:
+mkDerivation {
+  pname = "intero";
+  version = "0.1.24";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  executableHaskellDepends = [
+    array base bytestring containers directory filepath ghc ghc-boot-th
+    ghc-paths ghci haskeline process syb time transformers unix
+  ];
+  testHaskellDepends = [
+    base directory filepath hspec process regex-compat temporary
+    transformers
+  ];
+  homepage = "https://github.com/commercialhaskell/intero";
+  description = "Complete interactive development program for Haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/invariant.cabal b/test/golden-test-cases/invariant.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/invariant.cabal
@@ -0,0 +1,69 @@
+name:                invariant
+version:             0.5
+synopsis:            Haskell98 invariant functors
+description:         Haskell98 invariant functors (also known as exponential functors).
+                     .
+                     For more information, see Edward Kmett's article \"Rotten Bananas\":
+                     .
+                     <http://comonad.com/reader/2008/rotten-bananas/>
+category:            Control, Data
+license:             BSD2
+license-file:        LICENSE
+homepage:            https://github.com/nfrisby/invariant-functors
+bug-reports:         https://github.com/nfrisby/invariant-functors/issues
+author:              Nicolas Frisby <nicolas.frisby@gmail.com>
+maintainer:          Nicolas Frisby <nicolas.frisby@gmail.com>,
+                     Ryan Scott <ryan.gl.scott@gmail.com>
+build-type:          Simple
+cabal-version:       >= 1.9.2
+tested-with:         GHC == 7.0.4
+                   , GHC == 7.2.2
+                   , GHC == 7.4.2
+                   , GHC == 7.6.3
+                   , GHC == 7.8.4
+                   , GHC == 7.10.3
+                   , GHC == 8.0.2
+                   , GHC == 8.2.2
+extra-source-files:  CHANGELOG.md, README.md
+
+source-repository head
+  type:                git
+  location:            https://github.com/nfrisby/invariant-functors
+
+library
+  exposed-modules:     Data.Functor.Invariant
+                     , Data.Functor.Invariant.TH
+  other-modules:       Data.Functor.Invariant.TH.Internal
+                     , Paths_invariant
+  hs-source-dirs:      src
+  build-depends:       array                >= 0.3    && < 0.6
+                     , base                 >= 4      && < 5
+                     , bifunctors           >= 5.2    && < 6
+                     , comonad              >= 5      && < 6
+                     , containers           >= 0.1    && < 0.6
+                     , contravariant        >= 0.5    && < 2
+                     , ghc-prim
+                     , profunctors          >= 5.2.1  && < 6
+                     , semigroups           >= 0.16.2 && < 1
+                     , StateVar             >= 1.1    && < 2
+                     , stm                  >= 2.2    && < 3
+                     , tagged               >= 0.7.3  && < 1
+                     , template-haskell     >= 2.4    && < 2.13
+                     , th-abstraction       >= 0.2.2  && < 1
+                     , transformers         >= 0.2    && < 0.6
+                     , transformers-compat  >= 0.3    && < 1
+                     , unordered-containers >= 0.2.4  && < 0.3
+  ghc-options:         -Wall
+
+test-suite spec
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  other-modules:       InvariantSpec
+                       THSpec
+  build-depends:       base             >= 4   && < 5
+                     , hspec            >= 1.8
+                     , invariant
+                     , QuickCheck       >= 2   && < 3
+                     , template-haskell >= 2.4 && < 2.13
+  ghc-options:         -Wall
diff --git a/test/golden-test-cases/invariant.nix.golden b/test/golden-test-cases/invariant.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/invariant.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, array, base, bifunctors, comonad, containers
+, contravariant, fetchurl, ghc-prim, hspec, profunctors, QuickCheck
+, semigroups, StateVar, stm, tagged, template-haskell
+, th-abstraction, transformers, transformers-compat
+, unordered-containers
+}:
+mkDerivation {
+  pname = "invariant";
+  version = "0.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bifunctors comonad containers contravariant ghc-prim
+    profunctors semigroups StateVar stm tagged template-haskell
+    th-abstraction transformers transformers-compat
+    unordered-containers
+  ];
+  testHaskellDepends = [ base hspec QuickCheck template-haskell ];
+  homepage = "https://github.com/nfrisby/invariant-functors";
+  description = "Haskell98 invariant functors";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/io-machine.cabal b/test/golden-test-cases/io-machine.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/io-machine.cabal
@@ -0,0 +1,34 @@
+name:                io-machine
+version:             0.2.0.0
+synopsis:            Easy I/O model to learn IO monad
+description:         Please see README.md
+homepage:            https://github.com/YoshikuniJujo/io-machine#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Yoshikuni Jujo
+maintainer:          PAF01143@nifty.ne.jp
+copyright:           Copyright (C) 2016 Yoshikuni Jujo All Rights Reserved
+category:            Education
+build-type:          Simple
+-- extra-source-files:
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Machine, IOMcn
+  build-depends:       base >= 4.7 && < 5, time
+  ghc-options:         -fno-warn-tabs
+  default-language:    Haskell2010
+
+test-suite io-machine-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base
+                     , io-machine
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N -fno-warn-tabs
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/YoshikuniJujo/io-machine
diff --git a/test/golden-test-cases/io-machine.nix.golden b/test/golden-test-cases/io-machine.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/io-machine.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, time }:
+mkDerivation {
+  pname = "io-machine";
+  version = "0.2.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base time ];
+  testHaskellDepends = [ base ];
+  homepage = "https://github.com/YoshikuniJujo/io-machine#readme";
+  description = "Easy I/O model to learn IO monad";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/io-streams-haproxy.cabal b/test/golden-test-cases/io-streams-haproxy.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/io-streams-haproxy.cabal
@@ -0,0 +1,78 @@
+name:                io-streams-haproxy
+version:             1.0.0.2
+synopsis:            HAProxy protocol 1.5 support for io-streams
+
+description: HAProxy protocol version 1.5 support (see
+  <http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt>) for applications
+  using io-streams. The proxy protocol allows information about a networked
+  peer (like remote address and port) to be propagated through a forwarding
+  proxy that is configured to speak this protocol.
+
+homepage:            http://snapframework.com/
+license:             BSD3
+license-file:        LICENSE
+author:              Gregory Collins
+maintainer:          greg@gregorycollins.net
+copyright:           (c) 2014 Google, Inc. and CONTRIBUTORS
+category:            Network, IO-Streams
+build-type:          Simple
+extra-source-files:
+  CONTRIBUTORS,
+  cbits/byteorder.c
+
+cabal-version:       >=1.10
+Bug-Reports:         https://github.com/snapframework/io-streams-haproxy/issues
+Tested-With:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3,
+                     GHC == 8.0.1
+
+source-repository head
+  type:     git
+  location: https://github.com/snapframework/io-streams-haproxy.git
+
+library
+  hs-source-dirs:    src
+  exposed-modules:   System.IO.Streams.Network.HAProxy
+  other-modules:     System.IO.Streams.Network.Internal.Address
+  c-sources:         cbits/byteorder.c
+
+  build-depends:     base              >= 4.5 && < 4.11,
+                     attoparsec        >= 0.7 && < 0.14,
+                     bytestring        >= 0.9 && < 0.11,
+                     io-streams        >= 1.3 && < 1.6,
+                     network           >= 2.3 && < 2.7,
+                     transformers      >= 0.3 && < 0.6
+  default-language:  Haskell2010
+
+  ghc-options:       -Wall -fwarn-tabs -funbox-strict-fields
+                     -fno-warn-unused-do-bind
+  if os(windows)
+    cpp-options:     -DWINDOWS
+    cc-options:      -DWINDOWS
+
+test-suite testsuite
+  type:              exitcode-stdio-1.0
+  hs-source-dirs:    src test
+  Main-is:           TestSuite.hs
+  Default-language:  Haskell2010
+  c-sources:         cbits/byteorder.c
+
+  ghc-options:       -Wall -fwarn-tabs -funbox-strict-fields -threaded
+                     -fno-warn-unused-do-bind
+
+  Other-modules:     System.IO.Streams.Network.HAProxy,
+                     System.IO.Streams.Network.HAProxy.Tests,
+                     System.IO.Streams.Network.Internal.Address
+
+  build-depends:     base,
+                     attoparsec,
+                     bytestring,
+                     io-streams,
+                     network,
+                     transformers,
+                     ------------------------------
+                     HUnit                      >= 1.2      && <2,
+                     test-framework             >= 0.8.0.3  && <0.9,
+                     test-framework-hunit       >= 0.2.7    && <0.4
+  if os(windows)
+    cpp-options:     -DWINDOWS
+    cc-options:      -DWINDOWS
diff --git a/test/golden-test-cases/io-streams-haproxy.nix.golden b/test/golden-test-cases/io-streams-haproxy.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/io-streams-haproxy.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, attoparsec, base, bytestring, fetchurl, HUnit
+, io-streams, network, test-framework, test-framework-hunit
+, transformers
+}:
+mkDerivation {
+  pname = "io-streams-haproxy";
+  version = "1.0.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base bytestring io-streams network transformers
+  ];
+  testHaskellDepends = [
+    attoparsec base bytestring HUnit io-streams network test-framework
+    test-framework-hunit transformers
+  ];
+  homepage = "http://snapframework.com/";
+  description = "HAProxy protocol 1.5 support for io-streams";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/ip.cabal b/test/golden-test-cases/ip.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ip.cabal
@@ -0,0 +1,124 @@
+name: ip
+version: 1.1.1
+synopsis: Library for IP and MAC addresses
+homepage: https://github.com/andrewthad/haskell-ip#readme
+license: BSD3
+license-file: LICENSE
+author: Andrew Martin
+maintainer: andrew.thaddeus@gmail.com
+copyright: 2016 Andrew Martin
+category: web
+build-type: Simple
+cabal-version: >=1.10
+description:
+  The `ip` package provides types and functions for dealing with
+  IPv4 addresses, CIDR blocks, and MAC addresses. We provide instances
+  for typeclasses found in commonly used packages like `aeson`, `vector`,
+  and `hashable`. We also provide `Parser`s for working with attoparsec.
+  .
+  Notably, this package does not overload functions by introducing any
+  typeclasses of its own. Neither does it prefix functions with the name
+  of the type that they work on. Instead, functions of the same name are
+  exported by several different modules, and it is expected that end users
+  disambiguate by importing these modules qualified.
+  .
+  The only module intended to be imported unqualified is `Net.Types`. The
+  types in this package should not conflict with the types in
+  any other commonly used packages.
+  .
+  The following packages are intended to be used with this package:
+  .
+  * `yesod-ip`: Provides orphan instances needed to work with yesod and
+    persistent. Also, provides a `yesod-form` helper.
+
+library
+  hs-source-dirs: src
+  exposed-modules:
+    Net.Mac
+    Net.IPv4
+    Net.IPv4.Range
+    Net.IPv6
+    Net.IP
+    Net.Types
+  other-modules:
+    Data.Word.Synthetic.Word12
+    Data.Text.Builder.Fixed
+    Data.Text.Builder.Variable
+    Data.Text.Builder.Common.Internal
+    Data.ByteString.Builder.Fixed
+  build-depends:
+      base >= 4.8  && < 5
+    , attoparsec >= 0.13 && < 0.14
+    , aeson >= 0.9  && < 1.3
+    , hashable >= 1.2  && < 1.3
+    , text >= 1.2  && < 1.3
+    , bytestring >= 0.10 && < 0.11
+    , vector >= 0.11 && < 0.13
+    , primitive >= 0.6 && < 0.7
+  -- if impl(ghcjs)
+  --   build-depends: ghcjs-base >= 0.2 && < 0.3
+  ghc-options: -Wall -O2
+  default-language: Haskell2010
+
+test-suite test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Test.hs
+  build-depends:
+      base
+    , ip
+    , test-framework
+    , test-framework-quickcheck2
+    , QuickCheck
+    , quickcheck-classes >= 0.3 && < 0.4
+    , text
+    , bytestring
+    , HUnit
+    , test-framework-hunit
+    , attoparsec
+  other-modules:
+    Naive
+    IPv4Text1
+    IPv4Text2
+    IPv4ByteString1
+    -- IPv4TextVariableBuilder
+  ghc-options: -Wall -O2
+  default-language: Haskell2010
+
+test-suite doctest
+  type: exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is: Doctests.hs
+  build-depends:
+      base
+    , ip
+    , doctest >= 0.10
+    , QuickCheck
+  default-language:    Haskell2010
+
+benchmark criterion
+  type: exitcode-stdio-1.0
+  build-depends:
+      base
+    , ip
+    , criterion
+    , text
+    , bytestring
+    , attoparsec
+  other-modules:
+    Naive
+    IPv4Text1
+    IPv4Text2
+    IPv4DecodeText1
+    IPv4DecodeText2
+    IPv4ByteString1
+    IPv4TextVariableBuilder
+  ghc-options: -Wall -O2
+  default-language: Haskell2010
+  hs-source-dirs: test
+  main-is: Bench.hs
+
+source-repository head
+  type: git
+  location: https://github.com/andrewthad/haskell-ip
+
diff --git a/test/golden-test-cases/ip.nix.golden b/test/golden-test-cases/ip.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ip.nix.golden
@@ -0,0 +1,27 @@
+{ mkDerivation, aeson, attoparsec, base, bytestring, criterion
+, doctest, fetchurl, hashable, HUnit, primitive, QuickCheck
+, quickcheck-classes, test-framework, test-framework-hunit
+, test-framework-quickcheck2, text, vector
+}:
+mkDerivation {
+  pname = "ip";
+  version = "1.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson attoparsec base bytestring hashable primitive text vector
+  ];
+  testHaskellDepends = [
+    attoparsec base bytestring doctest HUnit QuickCheck
+    quickcheck-classes test-framework test-framework-hunit
+    test-framework-quickcheck2 text
+  ];
+  benchmarkHaskellDepends = [
+    attoparsec base bytestring criterion text
+  ];
+  homepage = "https://github.com/andrewthad/haskell-ip#readme";
+  description = "Library for IP and MAC addresses";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/iso639.cabal b/test/golden-test-cases/iso639.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/iso639.cabal
@@ -0,0 +1,26 @@
+name:                iso639
+version:             0.1.0.3
+synopsis:            ISO-639-1 language codes 
+homepage:            https://github.com/HugoDaniel/iso639
+bug-reports:         https://github.com/HugoDaniel/iso639/issues
+description:
+    .
+    ISO-639-1 language codes mapping to Haskell datatypes 
+    .
+    The code is generated from the <http://www.loc.gov/standards/iso639-2/php/English_list.php official site> using haskell-src-exts in an extra file included in the .tar.gz.
+    .
+    Special thanks to Petter Bergman for the suggestions and bug fixing
+    .
+license:             BSD3
+license-file:        LICENSE
+author:              HugoDaniel
+maintainer:          mr.hugo.gomes@gmail.com
+copyright:           2013-2014 Hugo Daniel Gomes
+category:            Data
+build-type:          Simple
+extra-source-files:  generator/Generate.hs
+cabal-version:       >=1.8
+
+library
+  exposed-modules:     Data.LanguageCodes
+  build-depends:       base >=4.6 && <5
diff --git a/test/golden-test-cases/iso639.nix.golden b/test/golden-test-cases/iso639.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/iso639.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "iso639";
+  version = "0.1.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/HugoDaniel/iso639";
+  description = "ISO-639-1 language codes";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/iso8601-time.cabal b/test/golden-test-cases/iso8601-time.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/iso8601-time.cabal
@@ -0,0 +1,60 @@
+name:          iso8601-time
+version:       0.1.4
+license:       MIT
+copyright:     2013 Niklas Hambüchen <mail@nh2.me>
+author:        Niklas Hambüchen <mail@nh2.me>
+maintainer:    Niklas Hambüchen <mail@nh2.me>
+category:      Time
+build-type:    Simple
+stability:     experimental
+tested-With:   GHC==7.6.3
+cabal-version: >= 1.8
+homepage:      https://github.com/nh2/iso8601-time
+bug-Reports:   https://github.com/nh2/iso8601-time/issues
+synopsis:      Convert to/from the ISO 8601 time format
+description:
+  Conversion functions between Haskell time types and the ISO 8601 format,
+  which is often used for printing times, e.g. JavaScript's @new Date().toISOString()@.
+
+source-repository head
+  type:      git
+  location:  git://github.com/nh2/iso8601-time.git
+
+flag new-time
+  default: True
+
+library
+  exposed-modules:
+    Data.Time.ISO8601
+  hs-source-dirs:
+    src
+  build-depends:
+      base             <  5
+    , time             >= 1.4
+
+  if flag(new-time)
+    build-depends:
+        time           >= 1.5
+  else
+    build-depends:
+        time           == 1.4.*
+      , old-locale     >= 1.0
+
+  ghc-options:
+    -Wall
+
+
+test-Suite tests
+  type: exitcode-stdio-1.0
+  hs-source-dirs:
+    test
+  main-is:
+    Main.hs
+  build-depends:
+      base             >= 4 && < 5
+    , iso8601-time
+    , hspec            >= 1.3.0.1
+    , HUnit            >= 1.2
+    , time             >= 1.4
+  ghc-options:
+    -Wall
diff --git a/test/golden-test-cases/iso8601-time.nix.golden b/test/golden-test-cases/iso8601-time.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/iso8601-time.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, hspec, HUnit, time }:
+mkDerivation {
+  pname = "iso8601-time";
+  version = "0.1.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base time ];
+  testHaskellDepends = [ base hspec HUnit time ];
+  homepage = "https://github.com/nh2/iso8601-time";
+  description = "Convert to/from the ISO 8601 time format";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/jmacro-rpc-happstack.cabal b/test/golden-test-cases/jmacro-rpc-happstack.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/jmacro-rpc-happstack.cabal
@@ -0,0 +1,29 @@
+Name:                jmacro-rpc-happstack
+Version:             0.3.2
+Homepage:            http://hub.darcs.net/gershomb/jmacro-rpc
+License:             BSD3
+License-file:        LICENSE
+Author:              Gershom Bazerman
+Maintainer:          gershomb@gmail.com
+Category:            Network, Web
+Build-type:          Simple
+Cabal-version:       >=1.6
+Synopsis:            Happstack backend for jmacro-rpc
+Description:         Provides functions for serving jmacro-rpc json rpcs and panels from Happstack.
+
+Library
+  Exposed-modules: Network.JMacroRPC.Happstack
+
+  Build-depends: base >= 4, base < 7, bytestring > 0.9, jmacro > 0.6, happstack-server > 6, jmacro-rpc >= 0.2, mtl >= 2, containers >= 0.4, aeson >= 0.6, blaze-html >= 0.5
+
+  ghc-options: -Wall
+
+  -- Modules not exported by this package.
+  -- Other-modules:
+
+  -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
+  -- Build-tools:
+
+source-repository head
+  type:      darcs
+  location:  http://hub.darcs.net/gershomb/jmacro-rpc
diff --git a/test/golden-test-cases/jmacro-rpc-happstack.nix.golden b/test/golden-test-cases/jmacro-rpc-happstack.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/jmacro-rpc-happstack.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, aeson, base, blaze-html, bytestring, containers
+, fetchurl, happstack-server, jmacro, jmacro-rpc, mtl
+}:
+mkDerivation {
+  pname = "jmacro-rpc-happstack";
+  version = "0.3.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base blaze-html bytestring containers happstack-server jmacro
+    jmacro-rpc mtl
+  ];
+  homepage = "http://hub.darcs.net/gershomb/jmacro-rpc";
+  description = "Happstack backend for jmacro-rpc";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/jmacro-rpc.cabal b/test/golden-test-cases/jmacro-rpc.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/jmacro-rpc.cabal
@@ -0,0 +1,26 @@
+Name:                jmacro-rpc
+Version:             0.3.2
+Homepage:            http://hub.darcs.net/gershomb/jmacro
+License:             BSD3
+License-file:        LICENSE
+Author:              Gershom Bazerman
+Maintainer:          gershomb@gmail.com
+Category:            Network, Web
+Build-type:          Simple
+Cabal-version:       >=1.6
+
+Synopsis:            JSON-RPC clients and servers using JMacro, and evented client-server Reactive Programming.
+
+Description:         Base jmacro-rpc package. Provides server-independent functions.
+
+Library
+  Exposed-modules: Network.JMacroRPC.Base,
+                   Network.JMacroRPC.Panels
+
+  Build-depends: base >= 4, base < 7, jmacro > 0.6, text > 0.11, containers >= 0.4, bytestring >= 0.9.1, vector >= 0.8, attoparsec > 0.10, aeson >= 0.6, mtl > 2, unordered-containers > 0.1.4, split >= 0.2, blaze-html >= 0.4, contravariant >= 0.1, scientific > 0.3
+
+  ghc-options: -Wall
+
+source-repository head
+  type:      darcs
+  location:  http://hub.darcs.net/gershomb/jmacro
diff --git a/test/golden-test-cases/jmacro-rpc.nix.golden b/test/golden-test-cases/jmacro-rpc.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/jmacro-rpc.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, aeson, attoparsec, base, blaze-html, bytestring
+, containers, contravariant, fetchurl, jmacro, mtl, scientific
+, split, text, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "jmacro-rpc";
+  version = "0.3.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson attoparsec base blaze-html bytestring containers
+    contravariant jmacro mtl scientific split text unordered-containers
+    vector
+  ];
+  homepage = "http://hub.darcs.net/gershomb/jmacro";
+  description = "JSON-RPC clients and servers using JMacro, and evented client-server Reactive Programming";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/jose.cabal b/test/golden-test-cases/jose.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/jose.cabal
@@ -0,0 +1,147 @@
+name:                jose
+version:             0.6.0.3
+synopsis:
+  Javascript Object Signing and Encryption and JSON Web Token library
+description:
+  .
+  An implementation of the Javascript Object Signing and Encryption
+  (JOSE) and JSON Web Token (JWT; RFC 7519) formats.
+  .
+  The JSON Web Signature (JWS; RFC 7515) implementation is complete.
+  .
+  EdDSA signatures (RFC 8037) are supported (Ed25519 only).
+  .
+  JWK Thumbprint (RFC 7638) is supported (requires /aeson/ >= 0.10).
+  .
+  JSON Web Encryption (JWE; RFC 7516) is not yet implemented.
+  .
+  The __ECDSA implementation is vulnerable to timing attacks__ and
+  should only be used for verification.
+
+homepage:            https://github.com/frasertweedale/hs-jose
+bug-reports:         https://github.com/frasertweedale/hs-jose/issues
+license:             Apache-2.0
+license-file:        LICENSE
+extra-source-files:
+  README.md
+author:              Fraser Tweedale
+maintainer:          frase@frase.id.au
+copyright:           Copyright (C) 2013, 2014, 2015, 2016, 2017  Fraser Tweedale
+category:            Cryptography
+build-type:          Simple
+cabal-version:       >= 1.8
+tested-with:
+  GHC==7.10.3, GHC==8.0.1, GHC==8.0.2, GHC==8.2.1
+
+library
+  exposed-modules:
+    Crypto.JOSE
+    Crypto.JOSE.Compact
+    Crypto.JOSE.Error
+    Crypto.JOSE.Header
+    Crypto.JOSE.JWE
+    Crypto.JOSE.JWK
+    Crypto.JOSE.JWK.Store
+    Crypto.JOSE.JWS
+    Crypto.JOSE.Types
+    Crypto.JWT
+    Crypto.JOSE.AESKW
+    Crypto.JOSE.JWA.JWK
+    Crypto.JOSE.JWA.JWS
+    Crypto.JOSE.JWA.JWE
+    Crypto.JOSE.JWA.JWE.Alg
+
+  other-modules:
+    Crypto.JOSE.TH
+    Crypto.JOSE.Types.Internal
+    Crypto.JOSE.Types.Orphans
+
+  build-depends:
+    base >= 4.8 && < 5
+    , attoparsec
+    , base64-bytestring == 1.0.*
+    , concise >= 0.1
+    , containers >= 0.5
+    , cryptonite >= 0.7
+    , lens >= 4.3
+    , memory >= 0.7
+    , monad-time >= 0.1
+    , mtl >= 2
+    , semigroups >= 0.15
+    , template-haskell >= 2.4
+    , safe >= 0.3
+    , aeson >= 0.8.0.1
+    , unordered-containers == 0.2.*
+    , bytestring == 0.10.*
+    , text >= 1.1
+    , time >= 1.5
+    , network-uri >= 2.6
+    , QuickCheck >= 2
+    , quickcheck-instances
+    , x509 >= 1.4
+    , vector
+
+  ghc-options:    -Wall
+  hs-source-dirs: src
+
+source-repository head
+  type: git
+  location: https://github.com/frasertweedale/hs-jose.git
+
+test-suite tests
+  type:           exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is:        Test.hs
+  other-modules:
+    AESKW
+    JWK
+    JWS
+    JWT
+    Properties
+    Types
+
+  build-depends:
+    base
+    , attoparsec
+    , base64-bytestring
+    , containers
+    , cryptonite
+    , lens
+    , memory
+    , monad-time
+    , mtl
+    , semigroups
+    , template-haskell
+    , safe
+    , aeson
+    , unordered-containers
+    , bytestring
+    , text
+    , time
+    , network-uri
+    , vector
+    , x509
+
+    , concise
+    , jose
+
+    , tasty
+    , tasty-hspec
+    , tasty-quickcheck
+    , hspec
+    , QuickCheck
+    , quickcheck-instances
+
+executable example
+  hs-source-dirs: example
+  ghc-options:    -Wall
+  main-is:  Main.hs
+  other-modules:
+    JWS
+  build-depends:
+    base
+    , aeson
+    , bytestring
+    , lens
+    , mtl
+    , jose
diff --git a/test/golden-test-cases/jose.nix.golden b/test/golden-test-cases/jose.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/jose.nix.golden
@@ -0,0 +1,34 @@
+{ mkDerivation, aeson, attoparsec, base, base64-bytestring
+, bytestring, concise, containers, cryptonite, fetchurl, hspec
+, lens, memory, monad-time, mtl, network-uri, QuickCheck
+, quickcheck-instances, safe, semigroups, tasty, tasty-hspec
+, tasty-quickcheck, template-haskell, text, time
+, unordered-containers, vector, x509
+}:
+mkDerivation {
+  pname = "jose";
+  version = "0.6.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson attoparsec base base64-bytestring bytestring concise
+    containers cryptonite lens memory monad-time mtl network-uri
+    QuickCheck quickcheck-instances safe semigroups template-haskell
+    text time unordered-containers vector x509
+  ];
+  executableHaskellDepends = [ aeson base bytestring lens mtl ];
+  testHaskellDepends = [
+    aeson attoparsec base base64-bytestring bytestring concise
+    containers cryptonite hspec lens memory monad-time mtl network-uri
+    QuickCheck quickcheck-instances safe semigroups tasty tasty-hspec
+    tasty-quickcheck template-haskell text time unordered-containers
+    vector x509
+  ];
+  homepage = "https://github.com/frasertweedale/hs-jose";
+  description = "Javascript Object Signing and Encryption and JSON Web Token library";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/katip-elasticsearch.cabal b/test/golden-test-cases/katip-elasticsearch.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/katip-elasticsearch.cabal
@@ -0,0 +1,114 @@
+name:                katip-elasticsearch
+synopsis:            ElasticSearch scribe for the Katip logging framework.
+description:         See README.md for more details.
+version:             0.4.0.3
+license:             BSD3
+license-file:        LICENSE
+author:              Ozgun Ataman, Michael Xavier
+maintainer:          michael.xavier@soostone.com
+copyright:           Soostone Inc, 2015-2017
+category:            Data, Text, Logging
+homepage:            https://github.com/Soostone/katip
+bug-reports:         https://github.com/Soostone/katip/issues
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:
+  README.md
+  changelog.md
+  bench/Main.hs
+  examples/example.hs
+  test/Main.hs
+tested-with: GHC == 7.8.4, GHC== 7.10.3
+
+source-repository head
+  type:     git
+  location: https://github.com/Soostone/katip.git
+
+flag lib-Werror
+  default: False
+  manual: True
+
+library
+  exposed-modules:
+    Katip.Scribes.ElasticSearch
+    Katip.Scribes.ElasticSearch.Annotations
+    Katip.Scribes.ElasticSearch.Internal
+  build-depends:
+      base >=4.6 && <5
+    , katip >= 0.2.0.0 && < 0.6
+    , bloodhound >= 0.13.0.0 && < 0.16
+    , uuid >= 1.3.12 && < 1.4
+    , aeson >=0.6 && <1.3
+    , stm >= 2.4.3 && < 2.5
+    , stm-chans >= 3.0.0.2 && < 3.1
+    , async >= 2.0.1.0 && < 2.2
+    , enclosed-exceptions >= 1.0.0 && < 1.1
+    , http-client >= 0.3 && < 0.6
+    , text >= 0.11 && < 1.3
+    , retry >= 0.7 && < 0.8
+    , exceptions
+    , scientific >= 0.3.0.0 && < 0.4
+    , unordered-containers >= 0.1.0.0 && < 0.3
+    , transformers >= 0.2 && < 0.6
+    , http-types >= 0.8 && < 0.10
+    , time >= 1 && < 1.9
+    , bytestring
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  if flag(lib-Werror)
+    ghc-options: -Wall -Werror
+
+benchmark bench
+  type: exitcode-stdio-1.0
+  main-is: Main.hs
+  hs-source-dirs: bench
+  default-language:    Haskell2010
+  ghc-options: -O2
+  build-depends:
+                 base
+               , katip-elasticsearch
+               , bloodhound
+               , deepseq
+               , criterion >= 1.1.0.0
+               , random
+               , uuid
+               , text
+               , unordered-containers
+               , aeson
+
+test-suite test
+  type: exitcode-stdio-1.0
+  main-is: Main.hs
+  hs-source-dirs: test
+  default-language:    Haskell2010
+  build-depends:
+      katip-elasticsearch
+    , katip
+    , http-client
+    , bloodhound
+    , base
+    , tasty >= 0.11
+    , tasty-hunit
+    , tasty-quickcheck
+    , quickcheck-instances
+    , containers
+    , transformers
+    , lens
+    , lens-aeson
+    , text
+    , http-types
+    , aeson
+    , vector
+    , unordered-containers
+    , scientific
+    , time
+    , stm
+    , bytestring
+    , tagged
+
+  if flag(lib-Werror)
+    ghc-options: -Wall -Werror
+
+  ghc-options: -threaded -rtsopts
diff --git a/test/golden-test-cases/katip-elasticsearch.nix.golden b/test/golden-test-cases/katip-elasticsearch.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/katip-elasticsearch.nix.golden
@@ -0,0 +1,33 @@
+{ mkDerivation, aeson, async, base, bloodhound, bytestring
+, containers, criterion, deepseq, enclosed-exceptions, exceptions
+, fetchurl, http-client, http-types, katip, lens, lens-aeson
+, quickcheck-instances, random, retry, scientific, stm, stm-chans
+, tagged, tasty, tasty-hunit, tasty-quickcheck, text, time
+, transformers, unordered-containers, uuid, vector
+}:
+mkDerivation {
+  pname = "katip-elasticsearch";
+  version = "0.4.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson async base bloodhound bytestring enclosed-exceptions
+    exceptions http-client http-types katip retry scientific stm
+    stm-chans text time transformers unordered-containers uuid
+  ];
+  testHaskellDepends = [
+    aeson base bloodhound bytestring containers http-client http-types
+    katip lens lens-aeson quickcheck-instances scientific stm tagged
+    tasty tasty-hunit tasty-quickcheck text time transformers
+    unordered-containers vector
+  ];
+  benchmarkHaskellDepends = [
+    aeson base bloodhound criterion deepseq random text
+    unordered-containers uuid
+  ];
+  homepage = "https://github.com/Soostone/katip";
+  description = "ElasticSearch scribe for the Katip logging framework";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/katip.cabal b/test/golden-test-cases/katip.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/katip.cabal
@@ -0,0 +1,151 @@
+name:                katip
+version:             0.5.2.0
+synopsis:            A structured logging framework.
+description:
+  Katip is a structured logging framework. See README.md for more details.
+
+license:             BSD3
+license-file:        LICENSE
+author:              Ozgun Ataman, Michael Xavier
+maintainer:          michael.xavier@soostone.com
+copyright:           Soostone Inc, 2015-2017
+category:            Data, Text, Logging
+homepage:            https://github.com/Soostone/katip
+bug-reports:         https://github.com/Soostone/katip/issues
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:
+  README.md
+  changelog.md
+  examples/example.hs
+  examples/example_lens.hs
+  bench/Main.hs
+  test/Main.hs
+  test/Katip/Tests.hs
+  test/Katip/Tests/Scribes/Handle.hs
+  test/Katip/Tests/Scribes/Handle-text.golden
+  test/Katip/Tests/Format/Time.hs
+tested-with: GHC == 7.8.4, GHC== 7.10.3
+
+source-repository head
+  type:     git
+  location: https://github.com/Soostone/katip.git
+
+flag lib-Werror
+  default: False
+  manual: True
+
+library
+  exposed-modules:
+    Katip
+    Katip.Core
+    Katip.Format.Time
+    Katip.Monadic
+    Katip.Scribes.Handle
+
+  default-extensions:
+    DeriveGeneric
+    FlexibleContexts
+    GeneralizedNewtypeDeriving
+    MultiParamTypeClasses
+    RankNTypes
+    RecordWildCards
+    TemplateHaskell
+    OverloadedStrings
+
+  build-depends: base >=4.5 && <5
+               , aeson >=0.6 && <1.3
+               , async < 3.0.0.0
+               , auto-update >= 0.1 && < 0.2
+               , bytestring >= 0.9 && < 0.11
+               , containers >=0.4 && <0.6
+               , either >= 4 && < 5.1
+               , safe-exceptions >= 0.1.0.0
+               , hostname >=1.0 && <1.1
+               , old-locale >= 1.0 && < 1.1
+               , string-conv >= 0.1 && < 0.2
+               , template-haskell >= 2.8 && < 2.13
+               , text >= 0.11 && <1.3
+               , time >= 1 && < 1.9
+               , transformers >= 0.3 && < 0.6
+               , transformers-compat
+               , unordered-containers >= 0.2 && < 0.3
+               , monad-control >= 1.0 && < 1.1
+               , mtl >= 2.0 && < 2.3
+               , transformers-base >= 0.3 && < 0.6
+               , resourcet >= 1.1 && < 1.2
+               , scientific >= 0.3.3.0
+               , microlens >= 0.2.0.0 && < 0.5
+               , microlens-th >= 0.1.0.0 && < 0.5
+               , semigroups
+               , stm >= 2.4
+
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  ghc-options:        -Wall
+  if flag(lib-Werror)
+    ghc-options: -Werror
+  if os(windows)
+    build-depends: Win32 >=2.3 && <2.6
+    exposed-modules: Katip.Compat
+  else
+    build-depends: unix >= 2.5 && <2.8
+
+
+test-suite test
+  type: exitcode-stdio-1.0
+  main-is: Main.hs
+  hs-source-dirs: test
+  other-modules:
+    Katip.Tests.Format.Time
+    Katip.Tests.Scribes.Handle
+    Katip.Tests
+  default-language:    Haskell2010
+  build-depends: base
+               , katip
+               , aeson
+               , bytestring
+               , tasty >= 0.10.1.2
+               , tasty-golden
+               , tasty-hunit
+               , tasty-quickcheck
+               , quickcheck-instances
+               , template-haskell
+               , text
+               , time
+               , time-locale-compat >= 0.1.0.1 && < 0.2
+               , directory
+               , regex-tdfa
+               , unordered-containers
+               , microlens
+               , containers
+               , stm
+               , safe-exceptions
+  ghc-options: -Wall
+  if flag(lib-Werror)
+    ghc-options: -Werror
+
+
+benchmark bench
+  type: exitcode-stdio-1.0
+  main-is: Main.hs
+  hs-source-dirs: bench
+  default-language:    Haskell2010
+  ghc-options: -O2 -Wall -threaded -rtsopts -with-rtsopts=-N
+  if flag(lib-Werror)
+    ghc-options: -Werror
+  build-depends:
+                 base
+               , aeson
+               , blaze-builder
+               , katip
+               , criterion >= 1.1.0.0
+               , unix
+               , text
+               , time
+               , transformers
+               , deepseq
+               , async
+               , filepath
+               , safe-exceptions
+               , directory
diff --git a/test/golden-test-cases/katip.nix.golden b/test/golden-test-cases/katip.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/katip.nix.golden
@@ -0,0 +1,38 @@
+{ mkDerivation, aeson, async, auto-update, base, blaze-builder
+, bytestring, containers, criterion, deepseq, directory, either
+, fetchurl, filepath, hostname, microlens, microlens-th
+, monad-control, mtl, old-locale, quickcheck-instances, regex-tdfa
+, resourcet, safe-exceptions, scientific, semigroups, stm
+, string-conv, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
+, template-haskell, text, time, time-locale-compat, transformers
+, transformers-base, transformers-compat, unix
+, unordered-containers
+}:
+mkDerivation {
+  pname = "katip";
+  version = "0.5.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson async auto-update base bytestring containers either hostname
+    microlens microlens-th monad-control mtl old-locale resourcet
+    safe-exceptions scientific semigroups stm string-conv
+    template-haskell text time transformers transformers-base
+    transformers-compat unix unordered-containers
+  ];
+  testHaskellDepends = [
+    aeson base bytestring containers directory microlens
+    quickcheck-instances regex-tdfa safe-exceptions stm tasty
+    tasty-golden tasty-hunit tasty-quickcheck template-haskell text
+    time time-locale-compat unordered-containers
+  ];
+  benchmarkHaskellDepends = [
+    aeson async base blaze-builder criterion deepseq directory filepath
+    safe-exceptions text time transformers unix
+  ];
+  homepage = "https://github.com/Soostone/katip";
+  description = "A structured logging framework";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/katydid.cabal b/test/golden-test-cases/katydid.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/katydid.cabal
@@ -0,0 +1,89 @@
+name:                katydid
+version:             0.1.1.0
+synopsis:            A haskell implementation of Katydid
+description:         
+  A haskell implementation of Katydid
+  .
+  This includes:
+  .
+      - Relapse, a validation Language
+      - Parsers for JSON, XML and an abstraction for trees
+  .
+  You should only need the following modules:
+  .
+      - The Relapse module is used for validation.
+      - The Json and XML modules are used to create Json and XML trees that can be validated.
+  .
+  If you want to implement your own parser then you can look at the Parsers module
+  .
+
+homepage:            https://github.com/katydid/katydid-haskell
+license:             BSD3
+license-file:        LICENSE
+author:              Walter Schulze
+maintainer:          awalterschulze@gmail.com
+copyright:           Walter Schulze
+category:            Data
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:   Patterns
+                     , Derive
+                     , MemDerive
+                     , Zip
+                     , IfExprs
+                     , Expr
+                     , Simplify
+                     , Json
+                     , Xml
+                     , Parsers
+                     , ParsePatterns
+                     , VpaDerive
+                     , Parser
+                     , Relapse
+  build-depends:       base >= 4.7 && < 5
+                     , containers
+                     , json
+                     , hxt
+                     , regex-tdfa
+                     , mtl
+                     , parsec
+  default-language:    Haskell2010
+
+executable katydid-exe
+  hs-source-dirs:      app
+  main-is:             Main.hs
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  build-depends:       base
+                     , katydid
+                     , mtl
+  default-language:    Haskell2010
+
+test-suite katydid-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base
+                     , katydid
+                     , directory
+                     , filepath
+                     , containers
+                     , json
+                     , hxt
+                     , HUnit
+                     , parsec
+                     , mtl
+                     , tasty-hunit
+                     , tasty
+  other-modules:       ParserSpec
+                     , RelapseSpec
+                     , Suite
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/katydid/katydid-haskell
diff --git a/test/golden-test-cases/katydid.nix.golden b/test/golden-test-cases/katydid.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/katydid.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, base, containers, directory, fetchurl, filepath
+, HUnit, hxt, json, mtl, parsec, regex-tdfa, tasty, tasty-hunit
+}:
+mkDerivation {
+  pname = "katydid";
+  version = "0.1.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base containers hxt json mtl parsec regex-tdfa
+  ];
+  executableHaskellDepends = [ base mtl ];
+  testHaskellDepends = [
+    base containers directory filepath HUnit hxt json mtl parsec tasty
+    tasty-hunit
+  ];
+  homepage = "https://github.com/katydid/katydid-haskell";
+  description = "A haskell implementation of Katydid";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/kawhi.cabal b/test/golden-test-cases/kawhi.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/kawhi.cabal
@@ -0,0 +1,66 @@
+name: kawhi
+version: 0.3.0
+synopsis: stats.NBA.com library
+description: Functions and types for interacting with stats.NBA.com
+homepage: https://github.com/thunky-monk/kawhi
+license: MIT
+license-file: LICENSE
+author: Aaron Taylor
+maintainer: aaron@hamsterdam.co
+category: API
+build-type: Simple
+cabal-version: >=1.10
+extra-source-files:
+  README.md
+  guide.md
+  stack.yaml
+  changelog.md
+
+library
+  hs-source-dirs: library
+  exposed-modules:
+    Control.Monad.Http
+    Data.NBA.Stats
+  other-modules:
+  build-depends:
+    base >= 4.8 && < 5,
+    aeson >= 1.0,
+    bytestring >= 0.10,
+    exceptions >= 0.8,
+    http-conduit >= 2.2,
+    http-client >= 0.5.1,
+    http-types >= 0.9,
+    mtl >= 2.2,
+    safe >= 0.3,
+    scientific >= 0.3,
+    text >= 1.2
+  ghc-options: -Wall
+  default-language: Haskell2010
+
+test-suite tests
+  type: exitcode-stdio-1.0
+  hs-source-dirs: tests
+  main-is: Tests.hs
+  other-modules: Data.NBA.Stats.Tests
+  build-depends:
+    base >= 4.8 && < 5,
+    kawhi >= 0.0,
+    aeson >= 1.0,
+    bytestring >= 0.10,
+    exceptions >= 0.8,
+    http-client >= 0.4.30,
+    http-types >= 0.9,
+    mtl >= 2.2,
+    scientific >= 0.3,
+    smallcheck >= 1.1,
+    tasty >= 0.11,
+    tasty-hunit >= 0.9,
+    tasty-quickcheck >= 0.8,
+    tasty-smallcheck >= 0.8,
+    text >= 1.2
+  ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
+  default-language: Haskell2010
+
+source-repository head
+  type: git
+  location: https://github.com/thunky-monk/kawhi
diff --git a/test/golden-test-cases/kawhi.nix.golden b/test/golden-test-cases/kawhi.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/kawhi.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, aeson, base, bytestring, exceptions, fetchurl
+, http-client, http-conduit, http-types, mtl, safe, scientific
+, smallcheck, tasty, tasty-hunit, tasty-quickcheck
+, tasty-smallcheck, text
+}:
+mkDerivation {
+  pname = "kawhi";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bytestring exceptions http-client http-conduit
+    http-types mtl safe scientific text
+  ];
+  testHaskellDepends = [
+    aeson base bytestring exceptions http-client http-types mtl
+    scientific smallcheck tasty tasty-hunit tasty-quickcheck
+    tasty-smallcheck text
+  ];
+  homepage = "https://github.com/thunky-monk/kawhi";
+  description = "stats.NBA.com library";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/kraken.cabal b/test/golden-test-cases/kraken.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/kraken.cabal
@@ -0,0 +1,41 @@
+name:                kraken
+version:             0.1.0
+
+synopsis:            Kraken.io API client
+description:
+  Kraken is a robust, ultra-fast image optimizer and compressor with
+  best-in-class algorithms.
+
+license:             MIT
+license-file:        LICENSE
+
+author:              Tomas Carnecky
+maintainer:          tomas.carnecky@gmail.com
+
+category:            Network
+
+build-type:          Simple
+cabal-version:       >=1.10
+
+
+source-repository head
+    type:     git
+    location: git://github.com/wereHamster/kraken-haskell.git
+
+
+library
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+  ghc-options:         -Wall
+
+  exposed-modules:
+     Network.Kraken
+
+  build-depends:
+     base >=4.5 && <4.11
+   , bytestring >= 0.10
+   , http-client
+   , http-client-tls
+   , aeson
+   , mtl
diff --git a/test/golden-test-cases/kraken.nix.golden b/test/golden-test-cases/kraken.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/kraken.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, aeson, base, bytestring, fetchurl, http-client
+, http-client-tls, mtl
+}:
+mkDerivation {
+  pname = "kraken";
+  version = "0.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bytestring http-client http-client-tls mtl
+  ];
+  description = "Kraken.io API client";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/l10n.cabal b/test/golden-test-cases/l10n.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/l10n.cabal
@@ -0,0 +1,29 @@
+name:                l10n
+version:             0.1.0.1
+synopsis:            Enables providing localization as typeclass instances in separate files.
+description:         Please see README.md
+homepage:            https://github.com/louispan/l10n#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Louis Pan
+maintainer:          louis@pan.me
+copyright:           2016 Louis Pan
+category:            Text
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+tested-with:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     L10n
+                       L10n.TimeLocale
+  build-depends:       base < 6
+                     , text >= 1 && < 2
+                     , time >= 1.5 && < 2
+  ghc-options:         -Wall
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/louispan/l10n
diff --git a/test/golden-test-cases/l10n.nix.golden b/test/golden-test-cases/l10n.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/l10n.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, text, time }:
+mkDerivation {
+  pname = "l10n";
+  version = "0.1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base text time ];
+  homepage = "https://github.com/louispan/l10n#readme";
+  description = "Enables providing localization as typeclass instances in separate files";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/lambdabot-social-plugins.cabal b/test/golden-test-cases/lambdabot-social-plugins.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lambdabot-social-plugins.cabal
@@ -0,0 +1,60 @@
+name:                   lambdabot-social-plugins
+version:                5.1.0.1
+
+license:                GPL
+license-file:           LICENSE
+
+author:                 Don Stewart
+maintainer:             James Cook <mokus@deepbondi.net>
+
+category:               Development, Web
+synopsis:               Social plugins for Lambdabot
+description:            Lambdabot is an IRC bot written over several years by
+                        those on the #haskell IRC channel.
+                        .
+                        Provided plugins:
+                        .
+                        [activity] Check where and how much is lambdabot used.
+                        .
+                        [karma] Track who's been good and who's been naughty.
+                        .
+                        [poll] Let the people vote.
+                        .
+                        [seen] Track who was around when.
+                        .
+                        [tell] Leave messages for other users.
+
+homepage:               https://wiki.haskell.org/Lambdabot
+
+build-type:             Simple
+cabal-version:          >= 1.8
+tested-with:            GHC == 7.8.4, GHC == 7.10.3
+
+source-repository head
+  type:                 git
+  location:             https://github.com/lambdabot/lambdabot.git
+
+library
+  hs-source-dirs:       src
+  ghc-options:          -Wall
+                        -funbox-strict-fields
+
+  exposed-modules:      Lambdabot.Plugin.Social
+
+  other-modules:        Lambdabot.Plugin.Social.Activity
+                        Lambdabot.Plugin.Social.Karma
+                        Lambdabot.Plugin.Social.Poll
+                        Lambdabot.Plugin.Social.Seen
+                        Lambdabot.Plugin.Social.Seen.StopWatch
+                        Lambdabot.Plugin.Social.Seen.UserStatus
+                        Lambdabot.Plugin.Social.Tell
+                        Lambdabot.Util.NickEq
+
+  build-depends:        base                    >= 4.4 && < 5,
+                        binary                  >= 0.5,
+                        bytestring              >= 0.9,
+                        containers              >= 0.4,
+                        lambdabot-core          >= 5.1 && < 5.2,
+                        mtl                     >= 2,
+                        split                   >= 0.2,
+                        time                    >= 1.4
diff --git a/test/golden-test-cases/lambdabot-social-plugins.nix.golden b/test/golden-test-cases/lambdabot-social-plugins.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lambdabot-social-plugins.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, binary, bytestring, containers, fetchurl
+, lambdabot-core, mtl, split, time
+}:
+mkDerivation {
+  pname = "lambdabot-social-plugins";
+  version = "5.1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base binary bytestring containers lambdabot-core mtl split time
+  ];
+  homepage = "https://wiki.haskell.org/Lambdabot";
+  description = "Social plugins for Lambdabot";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/lazy-csv.cabal b/test/golden-test-cases/lazy-csv.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lazy-csv.cabal
@@ -0,0 +1,36 @@
+Name:         lazy-csv
+Version:      0.5.1
+License:      BSD3
+License-file: LICENCE-BSD3
+Copyright:    Malcolm Wallace, Ian Lynagh, and Well Typed LLP
+Author:       Malcolm Wallace <malcolm.wallace@me.com>,
+              Ian Lynagh <igloo@earth.li>
+Maintainer:   Malcolm Wallace <malcolm.wallace@me.com>
+Synopsis:     Efficient lazy parsers for CSV (comma-separated values).
+Description:  The CSV format is defined by RFC 4180.
+              These efficient lazy parsers (String and ByteString variants)
+	      can report all CSV formatting errors, whilst also
+	      returning all the valid data, so the user can choose
+	      whether to continue, to show warnings, or to halt on
+	      error.  Valid fields retain information about their
+	      original location in the input, so a secondary parser from
+	      textual fields to typed values can give intelligent error
+	      messages.
+Category:     Text
+Cabal-Version: >= 1.6
+Build-Type:   Simple
+Homepage:     http://code.haskell.org/lazy-csv
+Extra-source-files: index.html changelog.html
+Source-repository head
+  type:       darcs
+  location:   http://code.haskell.org/lazy-csv
+
+library
+  Build-Depends:   base < 5, bytestring
+  Exposed-Modules: Text.CSV.Lazy.String
+                   Text.CSV.Lazy.ByteString
+
+executable csvSelect
+  build-depends:   base < 5, bytestring
+  main-is:         csvSelect.hs
+  other-modules:   Text.CSV.Lazy.ByteString
diff --git a/test/golden-test-cases/lazy-csv.nix.golden b/test/golden-test-cases/lazy-csv.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lazy-csv.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, bytestring, fetchurl }:
+mkDerivation {
+  pname = "lazy-csv";
+  version = "0.5.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base bytestring ];
+  executableHaskellDepends = [ base bytestring ];
+  homepage = "http://code.haskell.org/lazy-csv";
+  description = "Efficient lazy parsers for CSV (comma-separated values)";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/lens-aeson.cabal b/test/golden-test-cases/lens-aeson.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lens-aeson.cabal
@@ -0,0 +1,80 @@
+name:          lens-aeson
+category:      Numeric
+version:       1.0.2
+license:       MIT
+cabal-version: >= 1.8
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     provisional
+homepage:      http://github.com/lens/lens-aeson/
+bug-reports:   http://github.com/lens/lens-aeson/issues
+copyright:
+  Copyright (C) 2012 Paul Wilson
+  Copyright (C) 2013 Edward A. Kmett
+build-type:    Custom
+tested-with:   GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC==8.0.2, GHC==8.2.1
+synopsis:      Law-abiding lenses for aeson
+description:   Law-abiding lenses for aeson
+
+extra-source-files:
+  .travis.yml
+  .ghci
+  .gitignore
+  .vim.custom
+  travis/cabal-apt-install
+  travis/config
+  AUTHORS.markdown
+  README.markdown
+  CHANGELOG.markdown
+  Warning.hs
+
+source-repository head
+  type: git
+  location: https://github.com/lens/lens-aeson
+
+custom-setup
+  setup-depends:
+    base          >= 4 && < 5,
+    Cabal,
+    cabal-doctest >= 1 && < 1.1
+
+-- You can disable the doctests test suite with -f-test-doctests
+flag test-doctests
+  default: True
+  manual: True
+
+library
+  build-depends:
+    base                 >= 4.5       && < 5,
+    lens                 >= 4.4       && < 5,
+    text                 >= 0.11.1.10 && < 1.3,
+    vector               >= 0.9       && < 0.13,
+    unordered-containers >= 0.2.3     && < 0.3,
+    attoparsec           >= 0.10      && < 0.14,
+    bytestring           >= 0.9       && < 0.11,
+    aeson                >= 0.7.0.5   && < 1.3,
+    scientific           >= 0.3.2     && < 0.4
+
+  exposed-modules:
+    Data.Aeson.Lens
+
+  ghc-options: -Wall -fwarn-tabs -O2
+  hs-source-dirs: src
+
+test-suite doctests
+  type:           exitcode-stdio-1.0
+  main-is:        doctests.hs
+  ghc-options:    -Wall -threaded
+  hs-source-dirs: tests
+
+  if !flag(test-doctests)
+    buildable: False
+  else
+    build-depends:
+      base,
+      doctest        >= 0.11.1 && < 0.13,
+      generic-deriving,
+      lens-aeson,
+      semigroups     >= 0.9,
+      simple-reflect >= 0.3.1
diff --git a/test/golden-test-cases/lens-aeson.nix.golden b/test/golden-test-cases/lens-aeson.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lens-aeson.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, aeson, attoparsec, base, bytestring, Cabal
+, cabal-doctest, doctest, fetchurl, generic-deriving, lens
+, scientific, semigroups, simple-reflect, text
+, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "lens-aeson";
+  version = "1.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  setupHaskellDepends = [ base Cabal cabal-doctest ];
+  libraryHaskellDepends = [
+    aeson attoparsec base bytestring lens scientific text
+    unordered-containers vector
+  ];
+  testHaskellDepends = [
+    base doctest generic-deriving semigroups simple-reflect
+  ];
+  homepage = "http://github.com/lens/lens-aeson/";
+  description = "Law-abiding lenses for aeson";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/lens.cabal b/test/golden-test-cases/lens.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lens.cabal
@@ -0,0 +1,503 @@
+name:          lens
+category:      Data, Lenses, Generics
+version:       4.15.4
+license:       BSD2
+cabal-version: >= 1.8
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     provisional
+homepage:      http://github.com/ekmett/lens/
+bug-reports:   http://github.com/ekmett/lens/issues
+copyright:     Copyright (C) 2012-2016 Edward A. Kmett
+build-type:    Custom
+-- build-tools:   cpphs
+tested-with:   GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
+synopsis:      Lenses, Folds and Traversals
+description:
+  This package comes \"Batteries Included\" with many useful lenses for the types
+  commonly used from the Haskell Platform, and with tools for automatically
+  generating lenses and isomorphisms for user-supplied data types.
+  .
+  The combinators in @Control.Lens@ provide a highly generic toolbox for composing
+  families of getters, folds, isomorphisms, traversals, setters and lenses and their
+  indexed variants.
+  .
+  An overview, with a large number of examples can be found in the <https://github.com/ekmett/lens#lens-lenses-folds-and-traversals README>.
+  .
+  An introductory video on the style of code used in this library by Simon Peyton Jones is available from <http://skillsmatter.com/podcast/scala/lenses-compositional-data-access-and-manipulation Skills Matter>.
+  .
+  A video on how to use lenses and how they are constructed is available on <http://youtu.be/cefnmjtAolY?hd=1 youtube>.
+  .
+  Slides for that second talk can be obtained from <http://comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.pdf comonad.com>.
+  .
+  More information on the care and feeding of lenses, including a brief tutorial and motivation
+  for their types can be found on the <https://github.com/ekmett/lens/wiki lens wiki>.
+  .
+  A small game of @pong@ and other more complex examples that manage their state using lenses can be found in the <https://github.com/ekmett/lens/blob/master/examples/ example folder>.
+  .
+  /Lenses, Folds and Traversals/
+  .
+  With some signatures simplified, the core of the hierarchy of lens-like constructions looks like:
+  .
+  .
+  <<http://i.imgur.com/ALlbPRa.png>>
+  .
+  <Hierarchy.png (Local Copy)>
+  .
+  You can compose any two elements of the hierarchy above using @(.)@ from the @Prelude@, and you can
+  use any element of the hierarchy as any type it linked to above it.
+  .
+  The result is their lowest upper bound in the hierarchy (or an error if that bound doesn't exist).
+  .
+  For instance:
+  .
+  * You can use any 'Traversal' as a 'Fold' or as a 'Setter'.
+  .
+  * The composition of a 'Traversal' and a 'Getter' yields a 'Fold'.
+  .
+  /Minimizing Dependencies/
+  .
+  If you want to provide lenses and traversals for your own types in your own libraries, then you
+  can do so without incurring a dependency on this (or any other) lens package at all.
+  .
+  /e.g./ for a data type:
+  .
+  > data Foo a = Foo Int Int a
+  .
+  You can define lenses such as
+  .
+  > -- bar :: Lens' (Foo a) Int
+  > bar :: Functor f => (Int -> f Int) -> Foo a -> f (Foo a)
+  > bar f (Foo a b c) = fmap (\a' -> Foo a' b c) (f a)
+  .
+  > -- quux :: Lens (Foo a) (Foo b) a b
+  > quux :: Functor f => (a -> f b) -> Foo a -> f (Foo b)
+  > quux f (Foo a b c) = fmap (Foo a b) (f c)
+  .
+  without the need to use any type that isn't already defined in the @Prelude@.
+  .
+  And you can define a traversal of multiple fields with 'Control.Applicative.Applicative':
+  .
+  > -- traverseBarAndBaz :: Traversal' (Foo a) Int
+  > traverseBarAndBaz :: Applicative f => (Int -> f Int) -> Foo a -> f (Foo a)
+  > traverseBarAndBaz f (Foo a b c) = Foo <$> f a <*> f b <*> pure c
+  .
+  What is provided in this library is a number of stock lenses and traversals for
+  common haskell types, a wide array of combinators for working them, and more
+  exotic functionality, (/e.g./ getters, setters, indexed folds, isomorphisms).
+
+extra-source-files:
+  .travis.yml
+  .gitignore
+  .vim.custom
+  cabal.project
+  examples/LICENSE
+  examples/lens-examples.cabal
+  examples/*.hs
+  examples/*.lhs
+  images/*.png
+  lens-properties/CHANGELOG.markdown
+  lens-properties/LICENSE
+  lens-properties/Setup.hs
+  travis/cabal-apt-install
+  travis/config
+  HLint.hs
+  Warning.hs
+  AUTHORS.markdown
+  CHANGELOG.markdown
+  README.markdown
+  SUPPORT.markdown
+
+source-repository head
+  type: git
+  location: https://github.com/ekmett/lens.git
+
+custom-setup
+  setup-depends:
+    Cabal >= 1.10 && <2.1,
+    base  >= 4.5 && <5,
+    cabal-doctest >= 1 && <1.1,
+    filepath
+
+-- Enable benchmarking against Neil Mitchell's uniplate library for comparative performance analysis. Defaults to being turned off to avoid
+-- the extra dependency.
+--
+-- > cabal configure --enable-benchmarks -fbenchmark-uniplate && cabal build && cabal bench
+flag benchmark-uniplate
+  default: False
+  manual: True
+
+-- Generate inline pragmas when using template-haskell. This defaults to enabled, but you can
+--
+-- > cabal install lens -f-inlining
+--
+-- to shut it off to benchmark the relative performance impact, or as last ditch effort to address compile
+-- errors resulting from the myriad versions of template-haskell that all purport to be 2.8.
+flag inlining
+  manual: True
+  default: True
+
+-- Some 7.6.1-rc1 users report their TH still uses old style inline pragmas. This lets them turn on inlining.
+flag old-inline-pragmas
+  default: False
+  manual: True
+
+-- Make the test suites dump their template-haskell splices.
+flag dump-splices
+  default: False
+  manual: True
+
+-- You can disable the doctests test suite with -f-test-doctests
+flag test-doctests
+  default: True
+  manual: True
+
+-- You can disable the hunit test suite with -f-test-hunit
+flag test-hunit
+  default: True
+  manual: True
+
+-- Build the properties test if we're building tests
+flag test-properties
+  default: True
+  manual: True
+
+flag test-templates
+  default: True
+  manual: True
+
+-- Disallow unsafeCoerce
+flag safe
+  default: False
+  manual: True
+
+-- Assert that we are trustworthy when we can
+flag trustworthy
+  default: True
+  manual: True
+
+-- Attempt a parallel build with GHC 7.8
+flag j
+  default: False
+  manual: True
+
+library
+  build-depends:
+    array                     >= 0.3.0.2  && < 0.6,
+    base                      >= 4.5      && < 5,
+    base-orphans              >= 0.5.2    && < 1,
+    bifunctors                >= 5.1      && < 6,
+    bytestring                >= 0.9.1.10 && < 0.11,
+    call-stack                >= 0.1      && < 0.2,
+    comonad                   >= 4        && < 6,
+    contravariant             >= 1.3      && < 2,
+    containers                >= 0.4.0    && < 0.6,
+    distributive              >= 0.3      && < 1,
+    filepath                  >= 1.2.0.0  && < 1.5,
+    free                      >= 4        && < 5,
+    ghc-prim,
+    hashable                  >= 1.1.2.3  && < 1.3,
+    kan-extensions            >= 5        && < 6,
+    exceptions                >= 0.1.1    && < 1,
+    mtl                       >= 2.0.1    && < 2.3,
+    parallel                  >= 3.1.0.1  && < 3.3,
+    profunctors               >= 5.2.1    && < 6,
+    reflection                >= 2.1      && < 3,
+    semigroupoids             >= 5        && < 6,
+    semigroups                >= 0.8.4    && < 1,
+    tagged                    >= 0.4.4    && < 1,
+    template-haskell          >= 2.4      && < 2.13,
+    th-abstraction            >= 0.2.1    && < 0.3,
+    text                      >= 0.11     && < 1.3,
+    transformers              >= 0.2      && < 0.6,
+    transformers-compat       >= 0.4      && < 1,
+    unordered-containers      >= 0.2.4    && < 0.3,
+    vector                    >= 0.9      && < 0.13,
+    void                      >= 0.5      && < 1
+
+  if impl(ghc < 8.0)
+    build-depends: generic-deriving >= 1.10 && < 2
+
+  exposed-modules:
+    Control.Exception.Lens
+    Control.Lens
+    Control.Lens.At
+    Control.Lens.Combinators
+    Control.Lens.Cons
+    Control.Lens.Each
+    Control.Lens.Empty
+    Control.Lens.Equality
+    Control.Lens.Extras
+    Control.Lens.Fold
+    Control.Lens.Getter
+    Control.Lens.Indexed
+    Control.Lens.Internal
+    Control.Lens.Internal.Bazaar
+    Control.Lens.Internal.ByteString
+    Control.Lens.Internal.Coerce
+    Control.Lens.Internal.Context
+    Control.Lens.Internal.CTypes
+    Control.Lens.Internal.Deque
+    Control.Lens.Internal.Exception
+    Control.Lens.Internal.FieldTH
+    Control.Lens.Internal.PrismTH
+    Control.Lens.Internal.Fold
+    Control.Lens.Internal.Getter
+    Control.Lens.Internal.Indexed
+    Control.Lens.Internal.Instances
+    Control.Lens.Internal.Iso
+    Control.Lens.Internal.Level
+    Control.Lens.Internal.List
+    Control.Lens.Internal.Magma
+    Control.Lens.Internal.Prism
+    Control.Lens.Internal.Review
+    Control.Lens.Internal.Setter
+    Control.Lens.Internal.TH
+    Control.Lens.Internal.Zoom
+    Control.Lens.Iso
+    Control.Lens.Lens
+    Control.Lens.Level
+    Control.Lens.Operators
+    Control.Lens.Plated
+    Control.Lens.Prism
+    Control.Lens.Reified
+    Control.Lens.Review
+    Control.Lens.Setter
+    Control.Lens.TH
+    Control.Lens.Traversal
+    Control.Lens.Tuple
+    Control.Lens.Type
+    Control.Lens.Wrapped
+    Control.Lens.Zoom
+    Control.Monad.Error.Lens
+    Control.Parallel.Strategies.Lens
+    Control.Seq.Lens
+    Data.Array.Lens
+    Data.Bits.Lens
+    Data.ByteString.Lens
+    Data.ByteString.Strict.Lens
+    Data.ByteString.Lazy.Lens
+    Data.Complex.Lens
+    Data.Data.Lens
+    Data.Dynamic.Lens
+    Data.HashSet.Lens
+    Data.IntSet.Lens
+    Data.List.Lens
+    Data.Map.Lens
+    Data.Sequence.Lens
+    Data.Set.Lens
+    Data.Text.Lens
+    Data.Text.Strict.Lens
+    Data.Text.Lazy.Lens
+    Data.Tree.Lens
+    Data.Typeable.Lens
+    Data.Vector.Lens
+    Data.Vector.Generic.Lens
+    GHC.Generics.Lens
+    System.Exit.Lens
+    System.FilePath.Lens
+    System.IO.Error.Lens
+    Language.Haskell.TH.Lens
+    Numeric.Lens
+
+  other-modules:
+    Paths_lens
+
+  cpp-options: -traditional
+
+  if flag(safe)
+    cpp-options: -DSAFE=1
+
+  if flag(trustworthy) && impl(ghc>=7.2)
+    other-extensions: Trustworthy
+    cpp-options: -DTRUSTWORTHY=1
+
+  if flag(old-inline-pragmas) && impl(ghc>=7.6.0.20120810)
+      cpp-options: -DOLD_INLINE_PRAGMAS=1
+
+  if flag(inlining)
+    cpp-options: -DINLINING
+
+  if impl(ghc<7.4)
+    ghc-options: -fno-spec-constr-count
+
+  -- hack around the buggy unused matches check for class associated types in ghc 8 rc1
+  if impl(ghc >= 8)
+    ghc-options: -Wno-missing-pattern-synonym-signatures -Wno-unused-matches
+
+  if flag(j) && impl(ghc>=7.8)
+    ghc-options: -j4
+
+  ghc-options: -Wall -fwarn-tabs -O2 -fdicts-cheap -funbox-strict-fields -fmax-simplifier-iterations=10
+
+  hs-source-dirs: src
+
+-- Verify that Template Haskell expansion works
+test-suite templates
+  type: exitcode-stdio-1.0
+  main-is: templates.hs
+  ghc-options: -Wall -threaded
+  hs-source-dirs: tests
+
+  if flag(dump-splices)
+    ghc-options: -ddump-splices
+
+  if !flag(test-templates)
+    buildable: False
+  else
+    build-depends: base, lens
+
+-- Verify the properties of lenses with QuickCheck
+test-suite properties
+  type: exitcode-stdio-1.0
+  main-is: properties.hs
+  other-modules:
+    Control.Lens.Properties
+  ghc-options: -w -threaded -rtsopts -with-rtsopts=-N
+  hs-source-dirs:
+    tests
+    lens-properties/src
+  if !flag(test-properties)
+    buildable: False
+  else
+    build-depends:
+      base,
+      lens,
+      QuickCheck                 >= 2.4,
+      test-framework             >= 0.6,
+      test-framework-quickcheck2 >= 0.2,
+      test-framework-th          >= 0.2,
+      transformers
+
+test-suite hunit
+  type: exitcode-stdio-1.0
+  main-is: hunit.hs
+  ghc-options: -w -threaded -rtsopts -with-rtsopts=-N
+  hs-source-dirs: tests
+
+  if !flag(test-hunit)
+    buildable: False
+  else
+    build-depends:
+      base,
+      containers,
+      HUnit >= 1.2,
+      lens,
+      mtl,
+      test-framework       >= 0.6,
+      test-framework-hunit >= 0.2,
+      test-framework-th    >= 0.2
+
+-- Verify the results of the examples
+test-suite doctests
+  type:              exitcode-stdio-1.0
+  main-is:           doctests.hs
+  ghc-options:       -Wall -threaded
+  hs-source-dirs:    tests
+  x-doctest-options: --fast
+
+  if flag(trustworthy) && impl(ghc>=7.2)
+    other-extensions: Trustworthy
+    cpp-options: -DTRUSTWORTHY=1
+
+  if !flag(test-doctests)
+    buildable: False
+  else
+    build-depends:
+      base,
+      bytestring,
+      containers,
+      directory      >= 1.0,
+      deepseq,
+      doctest        >= 0.11.4 && < 0.12 || >= 0.13 && < 0.14,
+      filepath,
+      generic-deriving,
+      lens,
+      mtl,
+      nats,
+      parallel,
+      semigroups     >= 0.9,
+      simple-reflect >= 0.3.1,
+      text,
+      unordered-containers,
+      vector
+
+-- Basic benchmarks for the uniplate-style combinators
+benchmark plated
+  type:           exitcode-stdio-1.0
+  main-is:        plated.hs
+  ghc-options:    -Wall -O2 -threaded -fdicts-cheap -funbox-strict-fields
+  hs-source-dirs: benchmarks
+  build-depends:
+    base,
+    comonad,
+    criterion,
+    deepseq,
+    generic-deriving,
+    lens,
+    transformers
+
+  if flag(benchmark-uniplate)
+    build-depends: uniplate >= 1.6.7 && < 1.7
+    cpp-options: -DBENCHMARK_UNIPLATE
+
+-- Benchmarking alongside variants
+benchmark alongside
+  type:           exitcode-stdio-1.0
+  main-is:        alongside.hs
+  ghc-options:    -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
+  hs-source-dirs: benchmarks
+  build-depends:
+    base,
+    comonad >= 4,
+    criterion,
+    deepseq,
+    lens,
+    transformers
+
+-- Benchmarking folds
+benchmark folds
+  type:           exitcode-stdio-1.0
+  main-is:        folds.hs
+  ghc-options:    -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
+  hs-source-dirs: benchmarks
+  build-depends:
+    base,
+    criterion,
+    containers,
+    bytestring,
+    unordered-containers,
+    vector,
+    lens
+
+-- Benchmarking traversals
+benchmark traversals
+  type:           exitcode-stdio-1.0
+  main-is:        traversals.hs
+  ghc-options:    -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
+  hs-source-dirs: benchmarks
+  build-depends:
+    base,
+    criterion,
+    containers,
+    deepseq,
+    bytestring,
+    unordered-containers,
+    vector,
+    lens
+
+-- Benchmarking unsafe implementation strategies
+benchmark unsafe
+  type:           exitcode-stdio-1.0
+  main-is:        unsafe.hs
+  ghc-options:    -w -O2 -threaded -fdicts-cheap -funbox-strict-fields
+  hs-source-dirs: benchmarks
+  build-depends:
+    base,
+    comonad >= 4,
+    criterion >= 1,
+    deepseq,
+    generic-deriving,
+    lens,
+    transformers
diff --git a/test/golden-test-cases/lens.nix.golden b/test/golden-test-cases/lens.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lens.nix.golden
@@ -0,0 +1,42 @@
+{ mkDerivation, array, base, base-orphans, bifunctors, bytestring
+, Cabal, cabal-doctest, call-stack, comonad, containers
+, contravariant, criterion, deepseq, directory, distributive
+, doctest, exceptions, fetchurl, filepath, free, generic-deriving
+, ghc-prim, hashable, HUnit, kan-extensions, mtl, nats, parallel
+, profunctors, QuickCheck, reflection, semigroupoids, semigroups
+, simple-reflect, tagged, template-haskell, test-framework
+, test-framework-hunit, test-framework-quickcheck2
+, test-framework-th, text, th-abstraction, transformers
+, transformers-compat, unordered-containers, vector, void
+}:
+mkDerivation {
+  pname = "lens";
+  version = "4.15.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  setupHaskellDepends = [ base Cabal cabal-doctest filepath ];
+  libraryHaskellDepends = [
+    array base base-orphans bifunctors bytestring call-stack comonad
+    containers contravariant distributive exceptions filepath free
+    ghc-prim hashable kan-extensions mtl parallel profunctors
+    reflection semigroupoids semigroups tagged template-haskell text
+    th-abstraction transformers transformers-compat
+    unordered-containers vector void
+  ];
+  testHaskellDepends = [
+    base bytestring containers deepseq directory doctest filepath
+    generic-deriving HUnit mtl nats parallel QuickCheck semigroups
+    simple-reflect test-framework test-framework-hunit
+    test-framework-quickcheck2 test-framework-th text transformers
+    unordered-containers vector
+  ];
+  benchmarkHaskellDepends = [
+    base bytestring comonad containers criterion deepseq
+    generic-deriving transformers unordered-containers vector
+  ];
+  homepage = "http://github.com/ekmett/lens/";
+  description = "Lenses, Folds and Traversals";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/libgit.cabal b/test/golden-test-cases/libgit.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/libgit.cabal
@@ -0,0 +1,29 @@
+Name:                libgit
+Version:             0.3.1
+Description:
+    Simple git wrapper to access common git functions in a simple haskell way.
+License:             BSD3
+License-file:        LICENSE
+Copyright:           Vincent Hanquez <vincent@snarc.org>
+Author:              Vincent Hanquez <vincent@snarc.org>
+Maintainer:          Vincent Hanquez <vincent@snarc.org>
+Synopsis:            Simple Git Wrapper
+Category:            Development
+Stability:           experimental
+Build-Type:          Simple
+Homepage:            https://github.com/vincenthz/hs-libgit
+Cabal-Version:       >=1.6
+extra-doc-files:     README.md
+
+Library
+  Build-Depends:     base >= 3 && < 6, mtl, process
+  Exposed-modules:   Lib.Git
+  Exposed-modules:   Lib.Git.Type
+                     Lib.Git.Tree
+                     Lib.Git.Index
+                     Lib.Git.Lowlevel
+  ghc-options:       -Wall
+
+source-repository head
+  type: git
+  location: https://github.com/vincenthz/hs-libgit
diff --git a/test/golden-test-cases/libgit.nix.golden b/test/golden-test-cases/libgit.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/libgit.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, mtl, process }:
+mkDerivation {
+  pname = "libgit";
+  version = "0.3.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base mtl process ];
+  homepage = "https://github.com/vincenthz/hs-libgit";
+  description = "Simple Git Wrapper";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/librato.cabal b/test/golden-test-cases/librato.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/librato.cabal
@@ -0,0 +1,52 @@
+-- Initial librato.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                librato
+version:             0.2.0.1
+synopsis:            Bindings to the Librato API
+-- description:         
+homepage:            https://github.com/SaneTracker/librato
+license:             MIT
+license-file:        LICENSE
+author:              Ian Duncan
+maintainer:          ian@iankduncan.com
+-- copyright:           
+category:            Network
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Librato.Types,
+                       Librato.Internal,
+                       Librato,
+                       -- Librato.Alerts,
+                       -- Librato.Annotations,
+                       -- Librato.ApiTokens,
+                       -- Librato.ChartTokens,
+                       -- Librato.Dashboards,
+                       -- Librato.Instruments,
+                       -- Librato.Jobs,
+                       Librato.Metrics
+                       -- Librato.Services,
+                       -- Librato.Sources,
+                       -- Librato.Tags,
+                       -- Librato.Users
+  -- other-modules:       
+  -- other-extensions:    
+  build-depends:       base < 5,
+                       bytestring,
+                       http-client,
+                       http-conduit,
+                       text,
+                       aeson,
+                       vector,
+                       unordered-containers,
+                       resourcet,
+                       mtl,
+                       http-types,
+                       attoparsec,
+                       uri-templater >= 0.2,
+                       either
+  hs-source-dirs:      src
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/librato.nix.golden b/test/golden-test-cases/librato.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/librato.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, aeson, attoparsec, base, bytestring, either
+, fetchurl, http-client, http-conduit, http-types, mtl, resourcet
+, text, unordered-containers, uri-templater, vector
+}:
+mkDerivation {
+  pname = "librato";
+  version = "0.2.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson attoparsec base bytestring either http-client http-conduit
+    http-types mtl resourcet text unordered-containers uri-templater
+    vector
+  ];
+  homepage = "https://github.com/SaneTracker/librato";
+  description = "Bindings to the Librato API";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/lifted-async.cabal b/test/golden-test-cases/lifted-async.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lifted-async.cabal
@@ -0,0 +1,115 @@
+name:                lifted-async
+version:             0.9.3.2
+synopsis:            Run lifted IO operations asynchronously and wait for their results
+homepage:            https://github.com/maoe/lifted-async
+bug-reports:         https://github.com/maoe/lifted-async/issues
+license:             BSD3
+license-file:        LICENSE
+author:              Mitsutoshi Aoe
+maintainer:          Mitsutoshi Aoe <maoe@foldr.in>
+copyright:           Copyright (C) 2012-2017 Mitsutoshi Aoe
+category:            Concurrency
+build-type:          Simple
+cabal-version:       >= 1.8
+tested-with:
+    GHC == 8.2.1
+  , GHC == 8.0.2
+  , GHC == 7.10.2
+  , GHC == 7.8.4
+  , GHC == 7.6.3
+
+extra-source-files:
+  README.md
+  CHANGELOG.md
+
+description:
+  This package provides IO operations from @async@ package lifted to any
+  instance of 'MonadBase' or 'MonadBaseControl'.
+
+flag monad-control-1
+  description: User moand-control == 1.*
+  default: True
+  manual: False
+
+library
+  exposed-modules:
+    Control.Concurrent.Async.Lifted
+    Control.Concurrent.Async.Lifted.Safe
+  build-depends:
+      base >= 4.5 && < 4.11
+    , async >= 2.1.1 && < 2.2
+    , lifted-base >= 0.2 && < 0.3
+    , transformers-base >= 0.4 && < 0.5
+  if flag(monad-control-1)
+    build-depends: monad-control == 1.0.*
+    if impl(ghc >= 7.8)
+        build-depends: constraints >= 0.2 && < 0.10
+    else
+        build-depends: constraints >= 0.2 && < 0.6
+  else
+    build-depends:
+      monad-control == 0.*
+  ghc-options: -Wall
+  hs-source-dirs: src
+
+test-suite test-lifted-async
+  type: exitcode-stdio-1.0
+  hs-source-dirs: tests
+  main-is: TestSuite.hs
+  other-modules:
+    Test.Async.Common
+    Test.Async.IO
+    Test.Async.State
+    Test.Async.Reader
+  build-depends:
+      base
+    , HUnit
+    , lifted-async
+    , lifted-base
+    , monad-control
+    , mtl
+    , tasty
+    , tasty-hunit >= 0.9 && < 0.11
+    , tasty-th
+
+test-suite regression-tests
+  type: exitcode-stdio-1.0
+  hs-source-dirs: tests
+  main-is: RegressionTests.hs
+  ghc-options: -Wall -threaded
+  build-depends:
+      base
+    , async
+    , lifted-async
+    , mtl
+    , tasty-hunit >= 0.9 && < 0.11
+    , tasty-th
+
+benchmark benchmark-lifted-async
+  type: exitcode-stdio-1.0
+  hs-source-dirs: benchmarks
+  main-is: Benchmarks.hs
+  ghc-options: -Wall
+  build-depends:
+      base
+    , async
+    , criterion
+    , deepseq
+    , lifted-async
+
+benchmark benchmark-lifted-async-threaded
+  type: exitcode-stdio-1.0
+  hs-source-dirs: benchmarks
+  main-is: Benchmarks.hs
+  ghc-options: -Wall -threaded
+  build-depends:
+      base
+    , async
+    , criterion
+    , deepseq
+    , lifted-async
+
+source-repository head
+  type: git
+  branch: develop
+  location: https://github.com/maoe/lifted-async.git
diff --git a/test/golden-test-cases/lifted-async.nix.golden b/test/golden-test-cases/lifted-async.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lifted-async.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, async, base, constraints, criterion, deepseq
+, fetchurl, HUnit, lifted-base, monad-control, mtl, tasty
+, tasty-hunit, tasty-th, transformers-base
+}:
+mkDerivation {
+  pname = "lifted-async";
+  version = "0.9.3.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    async base constraints lifted-base monad-control transformers-base
+  ];
+  testHaskellDepends = [
+    async base HUnit lifted-base monad-control mtl tasty tasty-hunit
+    tasty-th
+  ];
+  benchmarkHaskellDepends = [ async base criterion deepseq ];
+  homepage = "https://github.com/maoe/lifted-async";
+  description = "Run lifted IO operations asynchronously and wait for their results";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/lmdb.cabal b/test/golden-test-cases/lmdb.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lmdb.cabal
@@ -0,0 +1,51 @@
+Name: lmdb
+Version: 0.2.5
+Synopsis: Lightning MDB bindings 
+Category: Database
+Description:
+  LMDB is a read-optimized Berkeley DB replacement developed by Symas
+  for the OpenLDAP project. LMDB has impressive performance characteristics 
+  and a friendly BSD-style OpenLDAP license. See <http://symas.com/mdb/>.
+  .
+  This library has Haskell bindings to the LMDB library. You must install 
+  the lmdb development files before installing this library, 
+  e.g. `sudo apt-get install liblmdb-dev` works for Ubuntu 14.04.
+  .
+  For now, only a low level interface is provided, and the author is moving
+  on to use LMDB rather than further develop its bindings. If a higher level 
+  API is desired, please consider contributing, or develop a separate package. 
+  
+Author: David Barbour
+Maintainer: dmbarbour@gmail.com
+Homepage: http://github.com/dmbarbour/haskell-lmdb
+
+Package-Url: 
+Copyright: (c) 2014 by David Barbour
+License: BSD2
+license-file: LICENSE
+Stability: experimental
+build-type: Simple
+cabal-version: >= 1.16.0.3
+
+Source-repository head
+  type: git
+  location: http://github.com/dmbarbour/haskell-lmdb.git
+
+Library
+  hs-Source-Dirs: hsrc_lib
+  default-language: Haskell2010
+  Build-Depends: base (>= 4.6 && < 5), array
+  Build-Tools: hsc2hs
+
+  Exposed-Modules:
+
+    Database.LMDB.Raw
+
+  Other-Modules:
+
+  include-dirs: 
+  c-sources: 
+  extra-libraries: lmdb
+  
+  ghc-options: -Wall -auto-all
+
diff --git a/test/golden-test-cases/lmdb.nix.golden b/test/golden-test-cases/lmdb.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lmdb.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, array, base, fetchurl, lmdb }:
+mkDerivation {
+  pname = "lmdb";
+  version = "0.2.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ array base ];
+  librarySystemDepends = [ lmdb ];
+  homepage = "http://github.com/dmbarbour/haskell-lmdb";
+  description = "Lightning MDB bindings";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/logging-effect-extra-file.cabal b/test/golden-test-cases/logging-effect-extra-file.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/logging-effect-extra-file.cabal
@@ -0,0 +1,63 @@
+-- This file has been generated from package.yaml by hpack version 0.17.1.
+--
+-- see: https://github.com/sol/hpack
+
+name:           logging-effect-extra-file
+version:        1.1.1
+synopsis:       TH splices to augment log messages with file info
+description:    TH splices to augment log messages with file info.
+category:       Other
+homepage:       https://github.com/jship/logging-effect-extra#readme
+bug-reports:    https://github.com/jship/logging-effect-extra/issues
+author:         Jason Shipman
+maintainer:     Jason Shipman
+license:        MIT
+build-type:     Simple
+cabal-version:  >= 1.10
+
+extra-source-files:
+    CHANGELOG.md
+    LICENSE.md
+    package.yaml
+    README.md
+
+source-repository head
+  type: git
+  location: https://github.com/jship/logging-effect-extra
+
+library
+  hs-source-dirs:
+      library
+  ghc-options: -Wall
+  build-depends:
+      base >=4.8 && <4.11
+    , logging-effect >= 1.1.0 && <1.3
+    , wl-pprint-text >=1.1.0.4 && <1.2
+    , template-haskell
+  exposed-modules:
+      Control.Monad.Log.Extra.File
+  default-language: Haskell2010
+
+executable log-file
+  main-is: log-file.hs
+  hs-source-dirs:
+      executable
+  ghc-options: -Wall -rtsopts -threaded -with-rtsopts=-N
+  build-depends:
+      base >=4.8 && <4.11
+    , logging-effect >= 1.1.0 && <1.3
+    , wl-pprint-text >=1.1.0.4 && <1.2
+    , logging-effect-extra-file
+  default-language: Haskell2010
+
+executable log-file-and-severity
+  main-is: log-file-and-severity.hs
+  hs-source-dirs:
+      executable
+  ghc-options: -Wall -rtsopts -threaded -with-rtsopts=-N
+  build-depends:
+      base >=4.8 && <4.11
+    , logging-effect >= 1.1.0 && <1.3
+    , wl-pprint-text >=1.1.0.4 && <1.2
+    , logging-effect-extra-file
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/logging-effect-extra-file.nix.golden b/test/golden-test-cases/logging-effect-extra-file.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/logging-effect-extra-file.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, fetchurl, logging-effect, template-haskell
+, wl-pprint-text
+}:
+mkDerivation {
+  pname = "logging-effect-extra-file";
+  version = "1.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base logging-effect template-haskell wl-pprint-text
+  ];
+  executableHaskellDepends = [ base logging-effect wl-pprint-text ];
+  homepage = "https://github.com/jship/logging-effect-extra#readme";
+  description = "TH splices to augment log messages with file info";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/lucid.cabal b/test/golden-test-cases/lucid.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lucid.cabal
@@ -0,0 +1,75 @@
+name:                lucid
+version:             2.9.9
+synopsis:            Clear to write, read and edit DSL for HTML
+description:         Clear to write, read and edit DSL for HTML. See the 'Lucid' module
+                     for description and documentation.
+homepage:            https://github.com/chrisdone/lucid
+license:             BSD3
+license-file:        LICENSE
+author:              Chris Done
+maintainer:          chrisdone@gmail.com, oleg.grenrus@iki.fi
+copyright:           2014-2017 Chris Done
+category:            Web
+build-type:          Simple
+cabal-version:       >=1.8
+extra-source-files:  README.md, CHANGELOG.md
+tested-with:         GHC==7.4.2,GHC==7.6.3,GHC==7.8.4,GHC==7.10.3,GHC==8.0.2,GHC==8.2.1
+
+library
+  hs-source-dirs:    src/
+  ghc-options:       -Wall -O2
+  exposed-modules:   Lucid
+                     Lucid.Base
+                     Lucid.Html5
+                     Lucid.Bootstrap
+  build-depends:     base >= 4.5 && <5
+                   , blaze-builder
+                   , bytestring
+                   , containers
+                   , hashable
+                   , mmorph
+                   , mtl
+                   , text
+                   , transformers
+                   , unordered-containers
+  if !impl(ghc >= 8.0)
+    build-depends:   semigroups
+
+test-suite test
+    type: exitcode-stdio-1.0
+    main-is: Main.hs
+    hs-source-dirs: test
+    other-modules: Example1
+    build-depends: base,
+                   lucid,
+                   HUnit,
+                   hspec,
+                   parsec,
+                   bifunctors,
+                   text,
+                   mtl
+
+benchmark bench
+  type:             exitcode-stdio-1.0
+  hs-source-dirs:   benchmarks
+  main-is:          Main.hs
+  other-modules:    HtmlBenchmarks
+  build-depends:    base,
+                    deepseq,
+                    criterion,
+                    blaze-builder,
+                    text,
+                    bytestring,
+                    lucid
+  ghc-options:      -O2
+
+benchmark bench-io
+  type:             exitcode-stdio-1.0
+  hs-source-dirs:   benchmarks
+  main-is:          IO.hs
+  build-depends:    base,
+                    criterion,
+                    transformers,
+                    text,
+                    lucid
+  ghc-options:      -O2
diff --git a/test/golden-test-cases/lucid.nix.golden b/test/golden-test-cases/lucid.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/lucid.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, base, bifunctors, blaze-builder, bytestring
+, containers, criterion, deepseq, fetchurl, hashable, hspec, HUnit
+, mmorph, mtl, parsec, text, transformers, unordered-containers
+}:
+mkDerivation {
+  pname = "lucid";
+  version = "2.9.9";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base blaze-builder bytestring containers hashable mmorph mtl text
+    transformers unordered-containers
+  ];
+  testHaskellDepends = [
+    base bifunctors hspec HUnit mtl parsec text
+  ];
+  benchmarkHaskellDepends = [
+    base blaze-builder bytestring criterion deepseq text transformers
+  ];
+  homepage = "https://github.com/chrisdone/lucid";
+  description = "Clear to write, read and edit DSL for HTML";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/mainland-pretty.cabal b/test/golden-test-cases/mainland-pretty.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mainland-pretty.cabal
@@ -0,0 +1,40 @@
+name:           mainland-pretty
+version:        0.6.1
+cabal-version:  >= 1.6
+license:        BSD3
+license-file:   LICENSE
+copyright:      (c) 2006-2011 Harvard University
+                (c) 2011-2012 Geoffrey Mainland
+                (c) 2015-2017 Drexel University
+author:         Geoffrey Mainland <mainland@drexel.edu>
+maintainer:     Geoffrey Mainland <mainland@drexel.edu>
+stability:      alpha
+homepage:       https://github.com/mainland/mainland-pretty
+bug-reports:    https://github.com/mainland/mainland-pretty/issues
+category:       Text
+synopsis:       Pretty printing designed for printing source code.
+description:    Pretty printing designed for printing source code based on
+		Wadler's paper /A Prettier Printer/. The main advantage of this
+		library is its ability to automatically track the source
+		locations associated with pretty printed values and output
+		appropriate #line pragmas and its ability to produce output
+                in the form of lazy text using a builder.
+tested-with:    GHC==7.4.2, GHC==7.6.3, GHC==7.8.3, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
+
+build-type:     Simple
+
+library
+  exposed-modules:
+    Text.PrettyPrint.Mainland
+    Text.PrettyPrint.Mainland.Class
+
+  build-depends:
+    base         >= 4.5  && < 5,
+    containers   >= 0.2  && < 0.6,
+    srcloc       >= 0.2  && < 0.6,
+    text         >  0.11 && < 1.3,
+    transformers >  0.3  && < 0.6
+
+source-repository head
+  type:     git
+  location: git://github.com/mainland/mainland-pretty.git
diff --git a/test/golden-test-cases/mainland-pretty.nix.golden b/test/golden-test-cases/mainland-pretty.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mainland-pretty.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, containers, fetchurl, srcloc, text
+, transformers
+}:
+mkDerivation {
+  pname = "mainland-pretty";
+  version = "0.6.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers srcloc text transformers
+  ];
+  homepage = "https://github.com/mainland/mainland-pretty";
+  description = "Pretty printing designed for printing source code";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/matrices.cabal b/test/golden-test-cases/matrices.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/matrices.cabal
@@ -0,0 +1,73 @@
+-- Initial matrices.cabal generated by cabal init.  For further
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+name:                matrices
+version:             0.4.5
+synopsis:            native matrix based on vector
+description:         Pure Haskell matrix library, supporting creating, indexing,
+                     and modifying dense/sparse matrices.
+license:             BSD3
+license-file:        LICENSE
+author:              Kai Zhang
+maintainer:          kai@kzhang.org
+copyright:           (c) 2015-2017 Kai Zhang
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+
+library
+  exposed-modules:
+    Data.Matrix
+    Data.Matrix.Mutable
+    Data.Matrix.Storable
+    Data.Matrix.Storable.Mutable
+    Data.Matrix.Unboxed
+    Data.Matrix.Unboxed.Mutable
+    Data.Matrix.Generic
+    Data.Matrix.Generic.Mutable
+    Data.Matrix.Dense.Generic
+    Data.Matrix.Dense.Generic.Mutable
+    Data.Matrix.Sparse.Generic
+    Data.Matrix.Symmetric
+    Data.Matrix.Symmetric.Mutable
+
+  ghc-options: -Wall -funbox-strict-fields
+
+  build-depends:
+      base >=4.8 && <5
+    , deepseq
+    , vector >=0.11
+    , primitive
+
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+benchmark benchmarks
+  type:           exitcode-stdio-1.0
+  main-is:        benchmarks.hs
+  hs-source-dirs: benchmarks
+  build-depends:
+      base
+    , matrices
+    , vector
+    , criterion
+  default-language:    Haskell2010
+
+source-repository head
+  type: git
+  location: https://github.com/kaizhang/matrices.git
+
+test-suite test
+  type: exitcode-stdio-1.0
+  hs-source-dirs: tests
+  main-is: test.hs
+  other-modules:
+
+  default-language:    Haskell2010
+  build-depends:
+      base
+    , matrices
+    , vector
+    , tasty
+    , tasty-hunit
+    , tasty-quickcheck
diff --git a/test/golden-test-cases/matrices.nix.golden b/test/golden-test-cases/matrices.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/matrices.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, criterion, deepseq, fetchurl, primitive
+, tasty, tasty-hunit, tasty-quickcheck, vector
+}:
+mkDerivation {
+  pname = "matrices";
+  version = "0.4.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base deepseq primitive vector ];
+  testHaskellDepends = [
+    base tasty tasty-hunit tasty-quickcheck vector
+  ];
+  benchmarkHaskellDepends = [ base criterion vector ];
+  description = "native matrix based on vector";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/median-stream.cabal b/test/golden-test-cases/median-stream.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/median-stream.cabal
@@ -0,0 +1,38 @@
+name:                median-stream
+version:             0.7.0.0
+synopsis:            Constant-time queries for the median of a stream of numeric
+                     data.
+description:         Uses the two-heap approach to support O(lg n) insertions
+                     and O(1) queries for the median.
+homepage:            https://github.com/caneroj1/median-stream#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Joe Canero
+maintainer:          jmc41493@gmail.com
+copyright:           Copyright: (c) 2016 Joe Canero
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Data.MedianStream
+  build-depends:       base >= 4.7 && < 5
+                     , heap >= 1.0
+  default-language:    Haskell2010
+
+test-suite median-stream-test
+  type:                exitcode-stdio-1.0
+  other-modules:       Utils
+  hs-source-dirs:      test
+                     , utils
+  main-is:             Spec.hs
+  build-depends:       base
+                     , median-stream
+                     , QuickCheck
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/caneroj1/median-stream
diff --git a/test/golden-test-cases/median-stream.nix.golden b/test/golden-test-cases/median-stream.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/median-stream.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, heap, QuickCheck }:
+mkDerivation {
+  pname = "median-stream";
+  version = "0.7.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base heap ];
+  testHaskellDepends = [ base QuickCheck ];
+  homepage = "https://github.com/caneroj1/median-stream#readme";
+  description = "Constant-time queries for the median of a stream of numeric data";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/megaparsec.cabal b/test/golden-test-cases/megaparsec.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/megaparsec.cabal
@@ -0,0 +1,142 @@
+name:                 megaparsec
+version:              6.3.0
+cabal-version:        >= 1.18
+tested-with:          GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
+license:              BSD2
+license-file:         LICENSE.md
+author:               Megaparsec contributors,
+                      Paolo Martini <paolo@nemail.it>,
+                      Daan Leijen <daan@microsoft.com>
+
+maintainer:           Mark Karpov <markkarpov92@gmail.com>
+homepage:             https://github.com/mrkkrp/megaparsec
+bug-reports:          https://github.com/mrkkrp/megaparsec/issues
+category:             Parsing
+synopsis:             Monadic parser combinators
+build-type:           Simple
+description:
+
+  This is industrial-strength monadic parser combinator library. Megaparsec
+  is a fork of Parsec library originally written by Daan Leijen.
+
+extra-doc-files:      AUTHORS.md
+                    , CHANGELOG.md
+                    , README.md
+
+source-repository head
+  type:               git
+  location:           https://github.com/mrkkrp/megaparsec.git
+
+flag dev
+  description:        Turn on development settings.
+  manual:             True
+  default:            False
+
+library
+  build-depends:      base         >= 4.7   && < 5.0
+                    , bytestring   >= 0.2   && < 0.11
+                    , case-insensitive >= 1.2 && < 1.3
+                    , containers   >= 0.5   && < 0.6
+                    , deepseq      >= 1.3   && < 1.5
+                    , mtl          >= 2.0   && < 3.0
+                    , parser-combinators >= 0.1 && < 0.3
+                    , scientific   >= 0.3.1 && < 0.4
+                    , text         >= 0.2   && < 1.3
+                    , transformers >= 0.4   && < 0.6
+  if !impl(ghc >= 8.0)
+    build-depends:    fail         == 4.9.*
+                    , semigroups   == 0.18.*
+  if !impl(ghc >= 7.10)
+    build-depends:    void         == 0.7.*
+  exposed-modules:    Text.Megaparsec
+                    , Text.Megaparsec.Byte
+                    , Text.Megaparsec.Byte.Lexer
+                    , Text.Megaparsec.Char
+                    , Text.Megaparsec.Char.Lexer
+                    , Text.Megaparsec.Error
+                    , Text.Megaparsec.Error.Builder
+                    , Text.Megaparsec.Expr
+                    , Text.Megaparsec.Perm
+                    , Text.Megaparsec.Pos
+                    , Text.Megaparsec.Stream
+  if flag(dev)
+    ghc-options:      -O0 -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-language:   Haskell2010
+
+test-suite tests
+  main-is:            Spec.hs
+  hs-source-dirs:     tests
+  type:               exitcode-stdio-1.0
+  if flag(dev)
+    ghc-options:      -O0 -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  other-modules:      Control.Applicative.CombinatorsSpec
+                    , Test.Hspec.Megaparsec
+                    , Test.Hspec.Megaparsec.AdHoc
+                    , Text.Megaparsec.Byte.LexerSpec
+                    , Text.Megaparsec.ByteSpec
+                    , Text.Megaparsec.Char.LexerSpec
+                    , Text.Megaparsec.CharSpec
+                    , Text.Megaparsec.ErrorSpec
+                    , Text.Megaparsec.ExprSpec
+                    , Text.Megaparsec.PermSpec
+                    , Text.Megaparsec.PosSpec
+                    , Text.Megaparsec.StreamSpec
+                    , Text.MegaparsecSpec
+  build-depends:      QuickCheck   >= 2.7   && < 2.11
+                    , base         >= 4.7   && < 5.0
+                    , bytestring   >= 0.2   && < 0.11
+                    , containers   >= 0.5   && < 0.6
+                    , hspec        >= 2.0   && < 3.0
+                    , hspec-expectations >= 0.5 && < 0.9
+                    , megaparsec
+                    , mtl          >= 2.0   && < 3.0
+                    , scientific   >= 0.3.1 && < 0.4
+                    , text         >= 0.2   && < 1.3
+                    , transformers >= 0.4   && < 0.6
+  if !impl(ghc >= 8.0)
+    build-depends:    semigroups   == 0.18.*
+  if !impl(ghc >= 7.10)
+    build-depends:    void         == 0.7.*
+  default-language:   Haskell2010
+
+benchmark bench-speed
+  main-is:            Main.hs
+  hs-source-dirs:     bench/speed
+  type:               exitcode-stdio-1.0
+  build-depends:      base         >= 4.7  && < 5.0
+                    , criterion    >= 0.6.2.1 && < 1.3
+                    , deepseq      >= 1.3  && < 1.5
+                    , megaparsec
+                    , text         >= 0.2  && < 1.3
+  if !impl(ghc >= 8.0)
+    build-depends:    semigroups   == 0.18.*
+  if !impl(ghc >= 7.10)
+    build-depends:    void         == 0.7.*
+  if flag(dev)
+    ghc-options:      -O2 -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-language:   Haskell2010
+
+benchmark bench-memory
+  main-is:            Main.hs
+  hs-source-dirs:     bench/memory
+  type:               exitcode-stdio-1.0
+  build-depends:      base         >= 4.7  && < 5.0
+                    , deepseq      >= 1.3  && < 1.5
+                    , megaparsec
+                    , text         >= 0.2  && < 1.3
+                    , weigh        >= 0.0.4
+  if !impl(ghc >= 8.0)
+    build-depends:    semigroups   == 0.18.*
+  if !impl(ghc >= 7.10)
+    build-depends:    void         == 0.7.*
+  if flag(dev)
+    ghc-options:      -O2 -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-language:   Haskell2010
diff --git a/test/golden-test-cases/megaparsec.nix.golden b/test/golden-test-cases/megaparsec.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/megaparsec.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, base, bytestring, case-insensitive, containers
+, criterion, deepseq, fetchurl, hspec, hspec-expectations, mtl
+, parser-combinators, QuickCheck, scientific, text, transformers
+, weigh
+}:
+mkDerivation {
+  pname = "megaparsec";
+  version = "6.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring case-insensitive containers deepseq mtl
+    parser-combinators scientific text transformers
+  ];
+  testHaskellDepends = [
+    base bytestring containers hspec hspec-expectations mtl QuickCheck
+    scientific text transformers
+  ];
+  benchmarkHaskellDepends = [ base criterion deepseq text weigh ];
+  homepage = "https://github.com/mrkkrp/megaparsec";
+  description = "Monadic parser combinators";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/mersenne-random.cabal b/test/golden-test-cases/mersenne-random.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mersenne-random.cabal
@@ -0,0 +1,111 @@
+name:            mersenne-random
+version:         1.0.0.1
+homepage:        http://code.haskell.org/~dons/code/mersenne-random
+synopsis:        Generate high quality pseudorandom numbers using a SIMD Fast Mersenne Twister
+description:
+    The Mersenne twister is a pseudorandom number generator developed by
+    Makoto Matsumoto and Takuji Nishimura that is based on a matrix linear
+    recurrence over a finite binary field. It provides for fast generation
+    of very high quality pseudorandom numbers
+    .
+    This library uses SFMT, the SIMD-oriented Fast Mersenne Twister, a
+    variant of Mersenne Twister that is much faster than the original. 
+    It is designed to be fast when it runs on 128-bit SIMD. It can be
+    compiled with either SSE2 and PowerPC AltiVec support, to take
+    advantage of these instructions.
+    .
+    > cabal install -fuse_sse2
+    .
+    On an x86 system, for performance win.
+    .
+    By default the period of the function is 2^19937-1, however, you can
+    compile in other defaults. Note that this algorithm on its own
+    is not cryptographically secure.
+    .
+    For more information about the algorithm and implementation, see
+    the SFMT homepage,
+    .
+    <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html>
+    .
+    and, Mutsuo Saito and Makoto Matsumoto,
+    /SIMD-oriented Fast Mersenne Twister: a 128-bit Pseudorandom Number
+    Generator/, in the Proceedings of MCQMC2006, here:
+    .
+    <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/sfmt.pdf>
+    .
+category:        Math, System
+license:         BSD3
+license-file:    LICENSE
+copyright:       (c) 2008-2011. Don Stewart <dons00@gmail.com>
+author:          Don Stewart
+maintainer:      Don Stewart <dons00@gmail.com>
+cabal-version: >= 1.2.0
+tested-with:     GHC ==6.8.2, Hugs ==2005, GHC ==7.0.2
+build-type:      Simple
+
+flag small_base
+  description: Build with new smaller base library
+  default:     False
+
+flag use_sse2
+  description: Build with SSE2 support.
+  default:     False
+
+flag use_altivec
+  description: Build with Altivec support.
+  default:     False
+
+flag big_endian64
+  description: Build for a big endian 64 bit machine.
+  default:     False
+
+library
+    exposed-modules: System.Random.Mersenne
+    extensions:      CPP, ForeignFunctionInterface, BangPatterns
+
+    if flag(small_base)
+        build-depends: base  < 3
+    else
+        build-depends: base >= 3 && < 5, old-time
+
+    -- For information on how to set different periods, or tune 
+    -- for your arch, see,
+    --
+    -- <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/howto-compile.html>
+    --
+    -- SSE2 supported on: Pentium M, Pentium 4, Core, Core 2 etc.
+    -- See: http://en.wikipedia.org/wiki/SSE2#CPUs_supporting_SSE2
+    --
+    -- Enable use_sse2 flag if you have one of those archs.
+    --
+    -- Works well on core 2 duo.
+    --
+    -- Enable use_altivec flag to use smid on powerpc.
+    -- Enable big_endian64 flag on a big endian machine 64 bit machine
+    --  (e.g. UltraSparc)
+    --
+    cc-options:
+        -DMEXP=19937
+        -DNDEBUG 
+        -O3 -finline-functions -fomit-frame-pointer
+        -fno-strict-aliasing --param max-inline-insns-single=1800
+
+    if flag(use_sse2)
+        cc-options:
+            -msse2 
+            -DHAVE_SSE2
+
+    if flag(big_endian64)
+        cc-options:
+            -DBIG_ENDIAN64
+
+    if flag(use_altivec)
+        cc-options:
+            -DHAVE_ALTIVEC
+
+    ghc-options:     -Wall -O2 -fexcess-precision
+
+    c-sources:        cbits/SFMT.c cbits/SFMT_wrap.c
+    include-dirs:     include
+    includes:         SFMT.h SFMT_wrap.h
+    install-includes: SFMT.h SFMT_wrap.h
diff --git a/test/golden-test-cases/mersenne-random.nix.golden b/test/golden-test-cases/mersenne-random.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mersenne-random.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, old-time }:
+mkDerivation {
+  pname = "mersenne-random";
+  version = "1.0.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base old-time ];
+  homepage = "http://code.haskell.org/~dons/code/mersenne-random";
+  description = "Generate high quality pseudorandom numbers using a SIMD Fast Mersenne Twister";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/messagepack.cabal b/test/golden-test-cases/messagepack.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/messagepack.cabal
@@ -0,0 +1,48 @@
+name               : messagepack
+version            : 0.5.4
+synopsis           : Serialize instance for Message Pack Object
+description        : Serialize instance for Message Pack Object
+homepage           : https://github.com/rodrigosetti/messagepack
+license            : MIT
+license-file       : LICENSE
+author             : Rodrigo Setti
+stability          : experimental
+bug-reports        : https://github.com/rodrigosetti/messagepack/issues
+package-url        : https://github.com/rodrigosetti/messagepack/archive/master.zip
+maintainer         : rodrigosetti@gmail.com
+copyright          : (c) 2014 Rodrigo Setti
+category           : Data
+build-type         : Simple
+cabal-version      : >=1.10
+extra-source-files : CHANGELOG
+                   , README.md
+
+source-repository head
+  type     : git
+  location : git@github.com:rodrigosetti/messagepack.git
+
+library
+  exposed-modules  : Data.MessagePack
+                   , Data.MessagePack.Spec
+  default-language : Haskell2010
+  build-depends    : base       == 4.*
+                   , bytestring == 0.10.*
+                   , cereal     == 0.5.*
+                   , containers == 0.5.*
+                   , deepseq
+
+test-suite messagepack-tests
+  type             : exitcode-stdio-1.0
+  hs-source-dirs   : tests
+  main-is          : Main.hs
+  default-language : Haskell2010
+  build-depends    : base                       == 4.*
+                   , QuickCheck                 == 2.*
+                   , bytestring                 == 0.10.*
+                   , cereal                     == 0.5.*
+                   , containers                 == 0.5.*
+                   , test-framework             == 0.8.*
+                   , test-framework-quickcheck2 == 0.3.*
+                   , test-framework-th          == 0.2.*
+                   , messagepack
+
diff --git a/test/golden-test-cases/messagepack.nix.golden b/test/golden-test-cases/messagepack.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/messagepack.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, bytestring, cereal, containers, deepseq
+, fetchurl, QuickCheck, test-framework, test-framework-quickcheck2
+, test-framework-th
+}:
+mkDerivation {
+  pname = "messagepack";
+  version = "0.5.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring cereal containers deepseq
+  ];
+  testHaskellDepends = [
+    base bytestring cereal containers QuickCheck test-framework
+    test-framework-quickcheck2 test-framework-th
+  ];
+  homepage = "https://github.com/rodrigosetti/messagepack";
+  description = "Serialize instance for Message Pack Object";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/microlens-ghc.cabal b/test/golden-test-cases/microlens-ghc.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/microlens-ghc.cabal
@@ -0,0 +1,44 @@
+name:                microlens-ghc
+version:             0.4.8.0
+synopsis:            microlens + array, bytestring, containers, transformers
+description:
+  Use this package instead of <http://hackage.haskell.org/package/microlens microlens> if you don't mind depending on all dependencies here – @Lens.Micro.GHC@ reexports everything from @Lens.Micro@ and additionally provides orphan instances of microlens classes for packages coming with GHC (<http://hackage.haskell.org/package/array array>, <http://hackage.haskell.org/package/bytestring bytestring>, <http://hackage.haskell.org/package/containers containers>, <http://hackage.haskell.org/package/transfromers transformers>).
+  .
+  The minor and major versions of microlens-ghc are incremented whenever the minor and major versions of microlens are incremented, so you can depend on the exact version of microlens-ghc without specifying the version of microlens you need.
+  .
+  This package is a part of the <http://hackage.haskell.org/package/microlens microlens> family; see the readme <https://github.com/aelve/microlens#readme on Github>.
+license:             BSD3
+license-file:        LICENSE
+author:              Edward Kmett, Artyom
+maintainer:          Artyom <yom@artyom.me>
+homepage:            http://github.com/aelve/microlens
+bug-reports:         http://github.com/aelve/microlens/issues
+category:            Data, Lenses
+build-type:          Simple
+extra-source-files:
+  CHANGELOG.md
+cabal-version:       >=1.10
+
+source-repository head
+  type:                git
+  location:            git://github.com/aelve/microlens.git
+
+library
+  exposed-modules:     Lens.Micro.GHC
+                       Lens.Micro.GHC.Internal
+  -- other-modules:       
+  -- other-extensions:    
+  build-depends:       array >=0.3.0.2 && <0.6
+                     , base >=4.5 && <5
+                     , bytestring >=0.9.1.10 && <0.11
+                     , containers >=0.4.0 && <0.6
+                     , microlens ==0.4.8.*
+                     , transformers >=0.2 && <0.6
+
+  ghc-options:
+    -Wall -fwarn-tabs
+    -O2 -fdicts-cheap -funbox-strict-fields
+    -fmax-simplifier-iterations=10
+
+  hs-source-dirs:      src
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/microlens-ghc.nix.golden b/test/golden-test-cases/microlens-ghc.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/microlens-ghc.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, array, base, bytestring, containers, fetchurl
+, microlens, transformers
+}:
+mkDerivation {
+  pname = "microlens-ghc";
+  version = "0.4.8.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bytestring containers microlens transformers
+  ];
+  homepage = "http://github.com/aelve/microlens";
+  description = "microlens + array, bytestring, containers, transformers";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/microlens.cabal b/test/golden-test-cases/microlens.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/microlens.cabal
@@ -0,0 +1,71 @@
+name:                microlens
+version:             0.4.8.1
+synopsis:            A tiny lens library with no dependencies. If you're writing an app, you probably want microlens-platform, not this.
+description:
+  NOTE: If you're writing an app, you probably want <http://hackage.haskell.org/package/microlens-platform microlens-platform> – it has the most features. <http://hackage.haskell.org/package/microlens microlens> is intended more for library writers who want a tiny lens library (after all, lenses are pretty useful for everything, not just for updating records!).
+  .
+  This library is an extract from <http://hackage.haskell.org/package/lens lens> (with no dependencies). It's not a toy lenses library, unsuitable for “real world”, but merely a small one. It is compatible with lens, and should have same performance. It also has better documentation.
+  .
+  There's a longer readme <https://github.com/aelve/microlens#readme on Github>. It has a migration guide for lens users, a description of other packages in the family, a discussion of other lens libraries you could use instead, and so on.
+  .
+  Here are some usecases for this library:
+  .
+    * You want to define lenses or traversals in your own library, but don't want to depend on lens. Having lenses available often make working with a library more pleasant.
+  .
+    * You just want to be able to use lenses to transform data (or even just use @over _1@ to change the first element of a tuple).
+  .
+    * You are new to lenses and want a small library to play with.
+  .
+  However, don't use this library if:
+  .
+    * You need @Iso@s, @Prism@s, indexed traversals, or actually anything else which isn't defined here (tho some indexed functions are available elsewhere – containers and vector provide them for their types, and <http://hackage.haskell.org/package/ilist ilist> provides indexed functions for lists).
+  .
+    * You want a library with a clean, understandable implementation (in which case you're looking for <http://hackage.haskell.org/package/lens-simple lens-simple>).
+  .
+  As already mentioned, if you're writing an application which uses lenses more extensively, look at <http://hackage.haskell.org/package/microlens-platform microlens-platform> – it combines features of most other microlens packages (<http://hackage.haskell.org/package/microlens-mtl microlens-mtl>, <http://hackage.haskell.org/package/microlens-th microlens-th>, <http://hackage.haskell.org/package/microlens-ghc microlens-ghc>).
+  .
+  If you want to export getters or folds and don't mind the <http://hackage.haskell.org/package/contravariant contravariant> dependency, please consider using <http://hackage.haskell.org/package/microlens-contra microlens-contra>.
+  .
+  If you haven't ever used lenses before, read <http://hackage.haskell.org/package/lens-tutorial/docs/Control-Lens-Tutorial.html this tutorial>. (It's for lens, but it applies to microlens just as well.)
+  .
+  Note that microlens has no dependencies starting from GHC 7.10 (base-4.8). Prior to that, it depends on transformers-0.2 or above.
+license:             BSD3
+license-file:        LICENSE
+author:              Edward Kmett, Artyom
+maintainer:          Artyom <yom@artyom.me>
+homepage:            http://github.com/aelve/microlens
+bug-reports:         http://github.com/aelve/microlens/issues
+-- copyright:           
+category:            Data, Lenses
+build-type:          Simple
+extra-source-files:
+  CHANGELOG.md
+cabal-version:       >=1.10
+
+source-repository head
+  type:                git
+  location:            git://github.com/aelve/microlens.git
+
+library
+  exposed-modules:     Lens.Micro
+                       Lens.Micro.Extras
+                       Lens.Micro.Internal
+                       Lens.Micro.Type
+  -- other-modules:       
+  -- other-extensions:    
+
+  -- Since base-4.8 we get the Identity functor in base, so we can avoid a
+  -- transformers dependency.
+  if impl(ghc>=7.9)
+    build-depends:     base >=4.8 && <5
+  if !impl(ghc>=7.9)
+    build-depends:     base >=4.5 && <5
+                     , transformers >=0.2
+
+  ghc-options:
+    -Wall -fwarn-tabs
+    -O2 -fdicts-cheap -funbox-strict-fields
+    -fmax-simplifier-iterations=10
+
+  hs-source-dirs:      src
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/microlens.nix.golden b/test/golden-test-cases/microlens.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/microlens.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "microlens";
+  version = "0.4.8.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "http://github.com/aelve/microlens";
+  description = "A tiny lens library with no dependencies. If you're writing an app, you probably want microlens-platform, not this.";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/minio-hs.cabal b/test/golden-test-cases/minio-hs.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/minio-hs.cabal
@@ -0,0 +1,245 @@
+name:                minio-hs
+version:             0.3.2
+synopsis:            A Minio Haskell Library for Amazon S3 compatible cloud
+                     storage.
+description:         The Minio Haskell client library provides simple APIs to
+                     access Minio, Amazon S3 and other API compatible cloud
+                     storage servers.
+homepage:            https://github.com/minio/minio-hs#readme
+license:             Apache-2.0
+license-file:        LICENSE
+author:              Aditya Manthramurthy, Krishnan Parthasarathi
+maintainer:          dev@minio.io
+category:            Network, AWS, Object Storage
+build-type:          Simple
+stability:           Experimental
+-- extra-source-files:
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  ghc-options:         -Wall
+  exposed-modules:     Network.Minio
+                     , Network.Minio.S3API
+  other-modules:       Lib.Prelude
+                     , Network.Minio.API
+                     , Network.Minio.Data
+                     , Network.Minio.Data.ByteString
+                     , Network.Minio.Data.Crypto
+                     , Network.Minio.Data.Time
+                     , Network.Minio.Errors
+                     , Network.Minio.ListOps
+                     , Network.Minio.PresignedOperations
+                     , Network.Minio.PutObject
+                     , Network.Minio.Sign.V4
+                     , Network.Minio.Utils
+                     , Network.Minio.XmlGenerator
+                     , Network.Minio.XmlParser
+  build-depends:       base >= 4.7 && < 5
+                     , protolude >= 0.1.6
+                     , aeson
+                     , async
+                     , base64-bytestring
+                     , bytestring
+                     , case-insensitive
+                     , conduit
+                     , conduit-combinators
+                     , conduit-extra
+                     , containers
+                     , cryptonite
+                     , cryptonite-conduit
+                     , data-default
+                     , exceptions
+                     , filepath
+                     , http-client
+                     , http-conduit
+                     , http-types
+                     , lifted-async
+                     , lifted-base
+                     , memory
+                     , monad-control
+                     , resourcet
+                     , text
+                     , text-format
+                     , time
+                     , transformers
+                     , transformers-base
+                     , vector
+                     , xml-conduit
+  default-language:    Haskell2010
+  default-extensions:  FlexibleContexts
+                     , FlexibleInstances
+                     , BangPatterns
+                     , MultiParamTypeClasses
+                     , MultiWayIf
+                     , NoImplicitPrelude
+                     , OverloadedStrings
+                     , RankNTypes
+                     , ScopedTypeVariables
+                     , TypeFamilies
+                     , TupleSections
+
+Flag live-test
+  Default: True
+  Manual: True
+
+test-suite minio-hs-live-server-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test, src
+  main-is:             LiveServer.hs
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+  default-extensions:  BangPatterns
+                     , FlexibleContexts
+                     , FlexibleInstances
+                     , OverloadedStrings
+                     , NoImplicitPrelude
+                     , MultiParamTypeClasses
+                     , MultiWayIf
+                     , ScopedTypeVariables
+                     , RankNTypes
+                     , TupleSections
+                     , TypeFamilies
+  other-modules:       Lib.Prelude
+                     , Network.Minio
+                     , Network.Minio.API
+                     , Network.Minio.Data
+                     , Network.Minio.Data.ByteString
+                     , Network.Minio.Data.Crypto
+                     , Network.Minio.Data.Time
+                     , Network.Minio.Errors
+                     , Network.Minio.ListOps
+                     , Network.Minio.PresignedOperations
+                     , Network.Minio.PutObject
+                     , Network.Minio.S3API
+                     , Network.Minio.Sign.V4
+                     , Network.Minio.Utils
+                     , Network.Minio.Utils.Test
+                     , Network.Minio.API.Test
+                     , Network.Minio.XmlGenerator
+                     , Network.Minio.XmlGenerator.Test
+                     , Network.Minio.XmlParser
+                     , Network.Minio.XmlParser.Test
+  build-depends:       base
+                     , minio-hs
+                     , protolude >= 0.1.6
+                     , aeson
+                     , async
+                     , base64-bytestring
+                     , bytestring
+                     , case-insensitive
+                     , conduit
+                     , conduit-combinators
+                     , conduit-extra
+                     , containers
+                     , cryptonite
+                     , cryptonite-conduit
+                     , data-default
+                     , directory
+                     , exceptions
+                     , filepath
+                     , http-client
+                     , http-conduit
+                     , http-types
+                     , lifted-async
+                     , lifted-base
+                     , memory
+                     , monad-control
+                     , QuickCheck
+                     , resourcet
+                     , tasty
+                     , tasty-hunit
+                     , tasty-quickcheck
+                     , tasty-smallcheck
+                     , temporary
+                     , text
+                     , text-format
+                     , time
+                     , transformers
+                     , transformers-base
+                     , vector
+                     , xml-conduit
+  if !flag(live-test)
+    buildable: False
+
+test-suite minio-hs-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test, src
+  main-is:             Spec.hs
+  build-depends:       base
+                     , minio-hs
+                     , protolude >= 0.1.6
+                     , aeson
+                     , async
+                     , base64-bytestring
+                     , bytestring
+                     , case-insensitive
+                     , conduit
+                     , conduit-combinators
+                     , conduit-extra
+                     , containers
+                     , cryptonite
+                     , cryptonite-conduit
+                     , data-default
+                     , directory
+                     , exceptions
+                     , filepath
+                     , http-client
+                     , http-conduit
+                     , http-types
+                     , lifted-async
+                     , lifted-base
+                     , memory
+                     , monad-control
+                     , QuickCheck
+                     , resourcet
+                     , tasty
+                     , tasty-hunit
+                     , tasty-quickcheck
+                     , tasty-smallcheck
+                     , temporary
+                     , text
+                     , text-format
+                     , time
+                     , transformers
+                     , transformers-base
+                     , vector
+                     , xml-conduit
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+  default-extensions:  BangPatterns
+                     , FlexibleContexts
+                     , FlexibleInstances
+                     , OverloadedStrings
+                     , NoImplicitPrelude
+                     , MultiParamTypeClasses
+                     , MultiWayIf
+                     , ScopedTypeVariables
+                     , RankNTypes
+                     , TupleSections
+                     , TypeFamilies
+  other-modules:       Lib.Prelude
+                     , Network.Minio
+                     , Network.Minio.API
+                     , Network.Minio.Data
+                     , Network.Minio.Data.ByteString
+                     , Network.Minio.Data.Crypto
+                     , Network.Minio.Data.Time
+                     , Network.Minio.Errors
+                     , Network.Minio.ListOps
+                     , Network.Minio.PresignedOperations
+                     , Network.Minio.PutObject
+                     , Network.Minio.S3API
+                     , Network.Minio.Sign.V4
+                     , Network.Minio.Utils
+                     , Network.Minio.Utils.Test
+                     , Network.Minio.API.Test
+                     , Network.Minio.XmlGenerator
+                     , Network.Minio.XmlGenerator.Test
+                     , Network.Minio.XmlParser
+                     , Network.Minio.XmlParser.Test
+
+
+source-repository head
+  type:     git
+  location: https://github.com/minio/minio-hs
diff --git a/test/golden-test-cases/minio-hs.nix.golden b/test/golden-test-cases/minio-hs.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/minio-hs.nix.golden
@@ -0,0 +1,38 @@
+{ mkDerivation, aeson, async, base, base64-bytestring, bytestring
+, case-insensitive, conduit, conduit-combinators, conduit-extra
+, containers, cryptonite, cryptonite-conduit, data-default
+, directory, exceptions, fetchurl, filepath, http-client
+, http-conduit, http-types, lifted-async, lifted-base, memory
+, monad-control, protolude, QuickCheck, resourcet, tasty
+, tasty-hunit, tasty-quickcheck, tasty-smallcheck, temporary, text
+, text-format, time, transformers, transformers-base, vector
+, xml-conduit
+}:
+mkDerivation {
+  pname = "minio-hs";
+  version = "0.3.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson async base base64-bytestring bytestring case-insensitive
+    conduit conduit-combinators conduit-extra containers cryptonite
+    cryptonite-conduit data-default exceptions filepath http-client
+    http-conduit http-types lifted-async lifted-base memory
+    monad-control protolude resourcet text text-format time
+    transformers transformers-base vector xml-conduit
+  ];
+  testHaskellDepends = [
+    aeson async base base64-bytestring bytestring case-insensitive
+    conduit conduit-combinators conduit-extra containers cryptonite
+    cryptonite-conduit data-default directory exceptions filepath
+    http-client http-conduit http-types lifted-async lifted-base memory
+    monad-control protolude QuickCheck resourcet tasty tasty-hunit
+    tasty-quickcheck tasty-smallcheck temporary text text-format time
+    transformers transformers-base vector xml-conduit
+  ];
+  homepage = "https://github.com/minio/minio-hs#readme";
+  description = "A Minio Haskell Library for Amazon S3 compatible cloud storage";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/mmorph.cabal b/test/golden-test-cases/mmorph.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mmorph.cabal
@@ -0,0 +1,28 @@
+Name: mmorph
+Version: 1.1.0
+Cabal-Version: >= 1.8.0.2
+Build-Type: Simple
+License: BSD3
+License-File: LICENSE
+Copyright: 2013 Gabriel Gonzalez
+Author: Gabriel Gonzalez
+Maintainer: Gabriel439@gmail.com
+Bug-Reports: https://github.com/Gabriel439/Haskell-MMorph-Library/issues
+Synopsis: Monad morphisms
+Description: This library provides monad morphism utilities, most commonly used
+    for manipulating monad transformer stacks.
+Category: Control
+Extra-Source-Files: CHANGELOG.md
+Source-Repository head
+    Type: git
+    Location: https://github.com/Gabriel439/Haskell-MMorph-Library
+
+Library
+    Hs-Source-Dirs: src
+    Build-Depends:
+        base                >= 4       && < 5  ,
+        mtl                 >= 2.1     && < 2.3,
+        transformers        >= 0.2.0.0 && < 0.6,
+        transformers-compat >= 0.3     && < 0.6
+    Exposed-Modules: Control.Monad.Morph, Control.Monad.Trans.Compose
+    GHC-Options: -O2
diff --git a/test/golden-test-cases/mmorph.nix.golden b/test/golden-test-cases/mmorph.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mmorph.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, fetchurl, mtl, transformers
+, transformers-compat
+}:
+mkDerivation {
+  pname = "mmorph";
+  version = "1.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base mtl transformers transformers-compat
+  ];
+  description = "Monad morphisms";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/mnist-idx.cabal b/test/golden-test-cases/mnist-idx.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mnist-idx.cabal
@@ -0,0 +1,83 @@
+name:                mnist-idx
+
+version:             0.1.2.8
+
+-- A short (one-line) description of the package.
+synopsis:            Read and write IDX data that is used in e.g. the MNIST database.
+
+-- A longer description of the package.
+description:         This package provides functionality to read and write data in the IDX
+                     binary format. This format is relevant for machine learning applications,
+                     like the MNIST handwritten digit database.
+
+-- URL for the project homepage or repository.
+homepage:            https://github.com/kryoxide/mnist-idx/
+
+-- The license under which the package is released.
+license:             LGPL-3
+
+-- The file containing the license text.
+license-file:        LICENSE
+
+-- The package author(s).
+author:              Christof Schramm
+
+-- An email address to which users can send suggestions, bug reports, and 
+-- patches.
+maintainer:          christof.schramm@campus.lmu.de
+
+-- A copyright notice.
+-- copyright:           
+
+category:            Data
+
+build-type:          Simple
+
+-- Extra files to be distributed with the package, such as examples or a 
+-- README.
+-- extra-source-files:  
+
+-- Constraint on the version of Cabal needed to build this package.
+cabal-version:       >= 1.10
+
+source-repository head
+  type:              git
+  location:          https://github.com/kryoxide/mnist-idx/
+
+library
+  -- Modules exported by the library.
+  exposed-modules: Data.IDX
+                   Data.IDX.Internal
+  
+  -- Modules included in this library but not exported.
+  -- other-modules:
+  
+  -- LANGUAGE extensions used by modules in this package.
+  -- other-extensions:    
+  
+  -- Other library packages from which modules are imported.
+  default-language:    Haskell2010
+  build-depends:       base >=4.6 && <5,
+                       binary >= 0.7 && < 0.9,
+                       vector >= 0.10 && < 0.13,
+                       bytestring >= 0.10 && < 0.11 
+  -- Directories containing source files.
+  hs-source-dirs:      src
+  
+  -- Base language which the package is written in.
+  default-language:    Haskell2010
+
+test-suite tests
+
+  type:                exitcode-stdio-1.0
+
+  hs-source-dirs:      test
+
+  main-is:             Main.hs
+
+  build-depends:       base >= 4.6
+                     , hspec >= 1.9
+                     , vector >= 0.10 && < 0.13
+                     , binary >= 0.7 && < 0.9
+                     , directory >= 1.2 && < 1.4
+                     , mnist-idx
diff --git a/test/golden-test-cases/mnist-idx.nix.golden b/test/golden-test-cases/mnist-idx.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mnist-idx.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, binary, bytestring, directory, fetchurl
+, hspec, vector
+}:
+mkDerivation {
+  pname = "mnist-idx";
+  version = "0.1.2.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base binary bytestring vector ];
+  testHaskellDepends = [ base binary directory hspec vector ];
+  homepage = "https://github.com/kryoxide/mnist-idx/";
+  description = "Read and write IDX data that is used in e.g. the MNIST database.";
+  license = stdenv.lib.licenses.lgpl3;
+}
diff --git a/test/golden-test-cases/mole.cabal b/test/golden-test-cases/mole.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mole.cabal
@@ -0,0 +1,98 @@
+name:                mole
+version:             0.0.6
+
+synopsis:            A glorified string replacement tool
+description:
+    A glorified string replacement tool. For a very specific purpose. That
+    purpose being to compile and optimize a static website (or a single-page
+    application). Mole inspects source, builds a complete dependency tree,
+    minifies and compresses the files, adds fingerprints and writes the result
+    to a directory.
+
+license:             MIT
+license-file:        LICENSE
+author:              Tomas Carnecky
+maintainer:          tomas.carnecky@gmail.com
+
+category:            System
+
+build-type:          Simple
+cabal-version:       >=1.10
+
+
+source-repository head
+    type:     git
+    location: git://github.com/wereHamster/mole.git
+
+
+executable mole
+    hs-source-dirs:      src
+    default-language:    Haskell2010
+
+    ghc-options:         -Wall -threaded -rtsopts
+
+    main-is:             Main.hs
+
+    other-modules:
+       Data.Mole.Builder.Internal.Fingerprint
+     , Data.Mole.Builder.Internal.Template
+     , Data.Mole.Builder.Binary
+     , Data.Mole.Builder.External
+     , Data.Mole.Builder.Html
+     , Data.Mole.Builder.Image
+     , Data.Mole.Builder.JavaScript
+     , Data.Mole.Builder.Stylesheet
+     , Data.Mole.Builder
+     , Data.Mole.Core
+     , Data.Mole.Server
+     , Data.Mole.Types
+     , Data.Mole.Watcher
+
+    build-depends:
+       base >=4.6 && <4.11
+     , containers
+     , bytestring
+     , base64-bytestring
+     , tagsoup
+     , stm
+     , cryptohash
+     , filepath
+     , filemanip
+     , fsnotify >=0.2
+     , directory
+     , snap-core
+     , snap-server
+     , text
+     , transformers
+     , process
+     , attoparsec
+     , network-uri
+     , optparse-applicative
+     , time
+     , mtl
+     , kraken
+     , unix
+     , css-syntax
+
+
+test-suite spec
+    hs-source-dirs:      src test
+    default-language:    Haskell2010
+
+    main-is:             Test.hs
+    type:                exitcode-stdio-1.0
+
+    build-depends:
+       base >=4.6 && <4.11
+     , hspec
+     , smallcheck
+     , hspec-smallcheck
+     , vector
+     , text
+     , unordered-containers
+     , time
+     , kraken
+     , attoparsec
+     , stm
+     , bytestring
+     , containers
diff --git a/test/golden-test-cases/mole.nix.golden b/test/golden-test-cases/mole.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mole.nix.golden
@@ -0,0 +1,29 @@
+{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
+, containers, cryptohash, css-syntax, directory, fetchurl
+, filemanip, filepath, fsnotify, hspec, hspec-smallcheck, kraken
+, mtl, network-uri, optparse-applicative, process, smallcheck
+, snap-core, snap-server, stm, tagsoup, text, time, transformers
+, unix, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "mole";
+  version = "0.0.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  executableHaskellDepends = [
+    attoparsec base base64-bytestring bytestring containers cryptohash
+    css-syntax directory filemanip filepath fsnotify kraken mtl
+    network-uri optparse-applicative process snap-core snap-server stm
+    tagsoup text time transformers unix
+  ];
+  testHaskellDepends = [
+    attoparsec base bytestring containers hspec hspec-smallcheck kraken
+    smallcheck stm text time unordered-containers vector
+  ];
+  description = "A glorified string replacement tool";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/monad-products.cabal b/test/golden-test-cases/monad-products.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monad-products.cabal
@@ -0,0 +1,30 @@
+name:          monad-products
+category:      Control, Monads
+version:       4.0.1
+license:       BSD3
+cabal-version: >= 1.6
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     provisional
+homepage:      http://github.com/ekmett/monad-products
+bug-reports:   http://github.com/ekmett/monad-products/issues
+copyright:     Copyright (C) 2011-2013 Edward A. Kmett
+synopsis:      Monad products
+description:   Monad products
+build-type:    Simple
+extra-source-files: .travis.yml CHANGELOG.md .gitignore
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/monad-products.git
+
+library
+  build-depends:
+    base          >= 4 && < 5,
+    semigroupoids >= 4 && < 6
+
+  exposed-modules:
+    Control.Monad.Product
+
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/monad-products.nix.golden b/test/golden-test-cases/monad-products.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monad-products.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, semigroupoids }:
+mkDerivation {
+  pname = "monad-products";
+  version = "4.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base semigroupoids ];
+  homepage = "http://github.com/ekmett/monad-products";
+  description = "Monad products";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/monadcryptorandom.cabal b/test/golden-test-cases/monadcryptorandom.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monadcryptorandom.cabal
@@ -0,0 +1,41 @@
+name:           monadcryptorandom
+version:        0.7.1
+license:        BSD3
+license-file:   LICENSE
+copyright:      Thomas DuBuisson <thomas.dubuisson@gmail.com>
+author:         Thomas DuBuisson <thomas.dubuisson@gmail.com>
+maintainer:     Thomas DuBuisson <thomas.dubuisson@gmail.com>
+description:    A monad for using CryptoRandomGen
+synopsis:       A monad for using CryptoRandomGen
+category:       Control, Cryptography
+homepage:       https://github.com/TomMD/monadcryptorandom
+stability:      stable
+build-type:     Simple
+cabal-version:  >= 1.6
+tested-with:    GHC == 6.12.1,
+                GHC == 7.0.4,
+                GHC == 7.2.2,
+                GHC == 7.4.2
+                GHC == 7.6.3,
+                GHC == 7.8.2,
+                GHC == 7.10.3
+Data-Files:
+extra-source-files:
+
+Library
+  Build-Depends: base == 4.*,
+                 bytestring >= 0.9 && < 0.11,
+                 crypto-api >= 0.2,
+                 exceptions >= 0.8 && <0.9,
+                 transformers >= 0.2,
+                 mtl >= 2.0 && < 2.3,
+                 transformers-compat >= 0.3,
+                 tagged >= 0.2
+  ghc-options:
+  hs-source-dirs:
+  exposed-modules: Control.Monad.CryptoRandom
+
+source-repository head
+  type:     git
+  location: https://github.com/TomMD/monadcryptorandom
+
diff --git a/test/golden-test-cases/monadcryptorandom.nix.golden b/test/golden-test-cases/monadcryptorandom.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monadcryptorandom.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, crypto-api, exceptions, fetchurl
+, mtl, tagged, transformers, transformers-compat
+}:
+mkDerivation {
+  pname = "monadcryptorandom";
+  version = "0.7.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring crypto-api exceptions mtl tagged transformers
+    transformers-compat
+  ];
+  homepage = "https://github.com/TomMD/monadcryptorandom";
+  description = "A monad for using CryptoRandomGen";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/monadloc.cabal b/test/golden-test-cases/monadloc.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monadloc.cabal
@@ -0,0 +1,43 @@
+name: monadloc
+version: 0.7.1
+Cabal-Version:  >= 1.6
+build-type: Simple
+license: PublicDomain
+author: Pepe Iborra
+maintainer: pepeiborra@gmail.com
+homepage: http://github.com/pepeiborra/monadloc
+synopsis: A class for monads which can keep a monadic call trace
+category: Control, Monads
+stability: provisional
+description:
+  This package defines a class for monads which can keep a monadic call trace.
+  .
+  * See the blog post <http://pepeiborra.wordpress.com/2009/11/01/monadic-stack-traces-that-make-a-lot-of-sense> for more information.
+  .
+  A preprocessor is available (see the package monadloc-pp) which inserts calls
+  to "Control.Monad.Loc.withLoc" before every monadic statement in a module.
+  To invoke the preprocessor, add the pragma @OPTIONS_GHC -F -pgmF MonadLoc@  at the top of your Haskell files  together with an import for the "Control.Monad.Loc" module
+  .
+  This package provides no implementation of the "Control.Monad.Loc.MonadLoc" interface.
+  Currently the only package that does so is @control-monad-exception@,
+  but any other package can implement it and provide monadic call traces.
+
+  /Changes/:
+  .
+      * 0.7 - Extracted Template Haskell macro to separate module to allow @Control.Monad.Loc@ to be Safe. (thanks to Deian Stefan)
+  .
+      * 0.6 - Extracted the preprocessor to a separate package @monadloc-pp@ to minimize the set of dependencies.
+
+Library
+  buildable: True
+  build-depends: base >= 4 && < 5, template-haskell, transformers
+  
+  ghc-options: -Wall -fno-warn-orphans
+  exposed-modules:
+     Control.Monad.Loc
+     Control.Monad.Loc.TH
+     Control.Monad.Loc.Transformers
+
+source-repository head
+  type:     git
+  location: git://github.com/pepeiborra/monadloc.git
diff --git a/test/golden-test-cases/monadloc.nix.golden b/test/golden-test-cases/monadloc.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monadloc.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, template-haskell, transformers }:
+mkDerivation {
+  pname = "monadloc";
+  version = "0.7.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base template-haskell transformers ];
+  homepage = "http://github.com/pepeiborra/monadloc";
+  description = "A class for monads which can keep a monadic call trace";
+  license = stdenv.lib.licenses.publicDomain;
+}
diff --git a/test/golden-test-cases/mongoDB.cabal b/test/golden-test-cases/mongoDB.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mongoDB.cabal
@@ -0,0 +1,117 @@
+Name:           mongoDB
+Version:        2.3.0.1
+Synopsis:       Driver (client) for MongoDB, a free, scalable, fast, document
+                DBMS
+Description:    This package lets you connect to MongoDB servers and
+                update/query their data. Please see the example in
+                Database.MongoDB and the tutorial from the homepage. For
+                information about MongoDB itself, see www.mongodb.org.
+Category:       Database
+Homepage:       https://github.com/mongodb-haskell/mongodb
+Bug-reports:    https://github.com/mongodb-haskell/mongodb/issues
+Author:         Tony Hannan
+Maintainer:     Victor Denisov <denisovenator@gmail.com>
+Copyright:      Copyright (c) 2010-2012 10gen Inc.
+License:        Apache-2.0
+License-file:   LICENSE
+Cabal-version:  >= 1.10
+Build-type:     Simple
+Stability:      alpha
+Extra-Source-Files: CHANGELOG.md
+
+Library
+  GHC-options:      -Wall
+  default-language: Haskell2010
+
+  Build-depends:      array -any
+                    , base <5
+                    , binary -any
+                    , bson >= 0.3 && < 0.4
+                    , text
+                    , bytestring -any
+                    , containers -any
+                    , conduit
+                    , conduit-extra
+                    , mtl >= 2
+                    , cryptohash -any
+                    , network -any
+                    , parsec -any
+                    , random -any
+                    , random-shuffle -any
+                    , resourcet
+                    , monad-control >= 0.3.1
+                    , lifted-base >= 0.1.0.3
+                    , pureMD5
+                    , tagged
+                    , tls >= 1.2.0
+                    , time
+                    , data-default-class -any
+                    , transformers
+                    , transformers-base >= 0.4.1
+                    , hashtables >= 1.1.2.0
+                    , base16-bytestring >= 0.1.1.6
+                    , base64-bytestring >= 1.0.0.1
+                    , nonce >= 1.0.2
+
+  Exposed-modules:  Database.MongoDB
+                    Database.MongoDB.Admin
+                    Database.MongoDB.Connection
+                    Database.MongoDB.GridFS
+                    Database.MongoDB.Query
+                    Database.MongoDB.Transport
+                    Database.MongoDB.Transport.Tls
+  Other-modules:    Database.MongoDB.Internal.Protocol
+                    Database.MongoDB.Internal.Util
+
+Source-repository head
+    Type:     git
+    Location: https://github.com/mongodb-haskell/mongodb
+
+test-suite test
+  hs-source-dirs: test
+  main-is: Main.hs
+  other-modules:    Spec
+                  , QuerySpec
+                  , TestImport
+  ghc-options:       -Wall -with-rtsopts "-K64m"
+  type: exitcode-stdio-1.0
+  build-depends:   mongoDB
+                 , base
+                 , mtl
+                 , hspec >= 2
+                 -- Keep supporting the old-locale and time < 1.5 packages for
+                 -- now. It's too difficult to support old versions of GHC and
+                 -- the new version of time.
+                 , old-locale
+                 , text
+                 , time
+
+  default-language: Haskell2010
+  default-extensions: OverloadedStrings
+
+Benchmark bench
+  main-is:            Benchmark.hs
+  type:               exitcode-stdio-1.0
+  Build-depends:      array -any
+                    , base < 5
+                    , base64-bytestring
+                    , base16-bytestring
+                    , binary -any
+                    , bson >= 0.3 && < 0.4
+                    , text
+                    , bytestring -any
+                    , containers -any
+                    , mtl >= 2
+                    , cryptohash -any
+                    , network -any
+                    , nonce
+                    , parsec -any
+                    , random -any
+                    , random-shuffle -any
+                    , monad-control >= 0.3.1
+                    , lifted-base >= 0.1.0.3
+                    , transformers-base >= 0.4.1
+                    , hashtables >= 1.1.2.0
+                    , criterion
+  default-language: Haskell2010
+  default-extensions: OverloadedStrings
diff --git a/test/golden-test-cases/mongoDB.nix.golden b/test/golden-test-cases/mongoDB.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mongoDB.nix.golden
@@ -0,0 +1,32 @@
+{ mkDerivation, array, base, base16-bytestring, base64-bytestring
+, binary, bson, bytestring, conduit, conduit-extra, containers
+, criterion, cryptohash, data-default-class, fetchurl, hashtables
+, hspec, lifted-base, monad-control, mtl, network, nonce
+, old-locale, parsec, pureMD5, random, random-shuffle, resourcet
+, tagged, text, time, tls, transformers, transformers-base
+}:
+mkDerivation {
+  pname = "mongoDB";
+  version = "2.3.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base base16-bytestring base64-bytestring binary bson
+    bytestring conduit conduit-extra containers cryptohash
+    data-default-class hashtables lifted-base monad-control mtl network
+    nonce parsec pureMD5 random random-shuffle resourcet tagged text
+    time tls transformers transformers-base
+  ];
+  testHaskellDepends = [ base hspec mtl old-locale text time ];
+  benchmarkHaskellDepends = [
+    array base base16-bytestring base64-bytestring binary bson
+    bytestring containers criterion cryptohash hashtables lifted-base
+    monad-control mtl network nonce parsec random random-shuffle text
+    transformers-base
+  ];
+  homepage = "https://github.com/mongodb-haskell/mongodb";
+  description = "Driver (client) for MongoDB, a free, scalable, fast, document DBMS";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/monoid-extras.cabal b/test/golden-test-cases/monoid-extras.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monoid-extras.cabal
@@ -0,0 +1,57 @@
+name:                monoid-extras
+version:             0.4.2
+synopsis:            Various extra monoid-related definitions and utilities
+description:         Various extra monoid-related definitions and utilities,
+                     such as monoid actions, monoid coproducts, semi-direct
+                     products, \"deletable\" monoids, \"split\" monoids,
+                     and \"cut\" monoids.
+license:             BSD3
+license-file:        LICENSE
+extra-source-files:  CHANGES
+author:              Brent Yorgey
+maintainer:          diagrams-discuss@googlegroups.com
+bug-reports:         https://github.com/diagrams/monoid-extras/issues
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:         GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.1
+
+source-repository head
+  type: git
+  location: https://github.com/diagrams/monoid-extras.git
+
+library
+  default-language:  Haskell2010
+  exposed-modules:   Data.Monoid.Action,
+                     Data.Monoid.SemiDirectProduct,
+                     Data.Monoid.SemiDirectProduct.Strict
+                     Data.Monoid.Coproduct,
+                     Data.Monoid.Cut,
+                     Data.Monoid.Deletable,
+                     Data.Monoid.Endomorphism,
+                     Data.Monoid.Inf,
+                     Data.Monoid.MList,
+                     Data.Monoid.Recommend,
+                     Data.Monoid.Split,
+                     Data.Monoid.WithSemigroup
+
+  build-depends:     base >= 4.3 && < 4.10,
+                     groups < 0.5,
+                     semigroups >= 0.8 && < 0.19,
+                     semigroupoids >= 4.0 && < 5.2
+
+  hs-source-dirs:    src
+
+  other-extensions:  DeriveFunctor,
+                     FlexibleInstances,
+                     MultiParamTypeClasses,
+                     TypeOperators
+
+benchmark semi-direct-product
+  default-language:  Haskell2010
+  hs-source-dirs: benchmarks
+  main-is: SemiDirectProduct.hs
+  type: exitcode-stdio-1.0
+  build-depends: base          >= 4.3 &&  < 4.10
+               , criterion
+               , monoid-extras
diff --git a/test/golden-test-cases/monoid-extras.nix.golden b/test/golden-test-cases/monoid-extras.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/monoid-extras.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, criterion, fetchurl, groups, semigroupoids
+, semigroups
+}:
+mkDerivation {
+  pname = "monoid-extras";
+  version = "0.4.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base groups semigroupoids semigroups ];
+  benchmarkHaskellDepends = [ base criterion ];
+  description = "Various extra monoid-related definitions and utilities";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/mwc-random-monad.cabal b/test/golden-test-cases/mwc-random-monad.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mwc-random-monad.cabal
@@ -0,0 +1,41 @@
+Name:                mwc-random-monad
+Version:             0.7.3.1
+License:             BSD3
+License-file:        LICENSE
+Author:              Alexey Khudyakov <alexey.skladnoy@gmail.com>
+Maintainer:          Alexey Khudyakov <alexey.skladnoy@gmail.com>
+bug-reports:         https://github.com/Shimuuar/mwc-random-monad/issues
+Category:            Math, Statistics
+Build-type:          Simple
+Cabal-version:       >=1.6
+Synopsis:            Monadic interface for mwc-random
+Description:         
+  Simple monadic interface for mwc-random.
+extra-source-files:
+  ChangeLog
+
+Library
+  build-depends:
+    base         >= 3 && < 5,
+    transformers >= 0.3,
+    primitive,
+    monad-primitive,
+    vector     >= 0.7,
+    mwc-random >= 0.13.3.0
+  Exposed-modules:
+    System.Random.MWC.Monad
+    System.Random.MWC.Distributions.Monad
+    System.Random.MWC.CondensedTable.Monad
+  if impl(GHC > 7.2.2)
+    Ghc-options:     -fsimpl-tick-factor=500
+  Ghc-options:       -O2 -Wall
+  Ghc-prof-options:  -auto-all
+
+source-repository head
+  type:     mercurial
+  location: http://bitbucket.org/Shimuuar/mwc-random-monad
+
+source-repository head
+  type:     git
+  location: git://github.com/Shimuuar/mwc-random-monad
+
diff --git a/test/golden-test-cases/mwc-random-monad.nix.golden b/test/golden-test-cases/mwc-random-monad.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mwc-random-monad.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, fetchurl, monad-primitive, mwc-random
+, primitive, transformers, vector
+}:
+mkDerivation {
+  pname = "mwc-random-monad";
+  version = "0.7.3.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base monad-primitive mwc-random primitive transformers vector
+  ];
+  description = "Monadic interface for mwc-random";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/mwc-random.cabal b/test/golden-test-cases/mwc-random.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mwc-random.cabal
@@ -0,0 +1,88 @@
+name:           mwc-random
+version:        0.13.6.0
+synopsis:       Fast, high quality pseudo random number generation
+description:
+  This package contains code for generating high quality random
+  numbers that follow either a uniform or normal distribution.  The
+  generated numbers are suitable for use in statistical applications.
+  .
+  The uniform PRNG uses Marsaglia's MWC256 (also known as MWC8222)
+  multiply-with-carry generator, which has a period of 2^8222 and
+  fares well in tests of randomness.  It is also extremely fast,
+  between 2 and 3 times faster than the Mersenne Twister.
+  .
+  Compared to the mersenne-random package, this package has a more
+  convenient API, is faster, and supports more statistical
+  distributions.
+
+license:        BSD3
+license-file:   LICENSE
+homepage:       https://github.com/bos/mwc-random
+bug-reports:    https://github.com/bos/mwc-random/issues
+author:         Bryan O'Sullivan <bos@serpentine.com>
+maintainer:     Bryan O'Sullivan <bos@serpentine.com>
+copyright:      2009, 2010, 2011 Bryan O'Sullivan
+category:       Math, Statistics
+build-type:     Simple
+cabal-version:  >= 1.8.0.4
+extra-source-files:
+  changelog.md
+  README.markdown
+  benchmarks/*.hs
+  benchmarks/Quickie.hs
+  benchmarks/mwc-random-benchmarks.cabal
+  test/*.R
+  test/*.sh
+  test/visual.hs
+
+library
+  exposed-modules:
+    System.Random.MWC
+    System.Random.MWC.Distributions
+    System.Random.MWC.CondensedTable
+  build-depends:
+    base < 5,
+    primitive,
+    time,
+    vector         >= 0.7,
+    math-functions >= 0.2.1.0
+  if impl(ghc >= 6.10)
+    build-depends:
+      base >= 4
+
+  -- gather extensive profiling data for now
+  ghc-prof-options: -auto-all
+
+  ghc-options: -Wall -funbox-strict-fields
+  if impl(ghc >= 6.8)
+    ghc-options: -fwarn-tabs
+
+test-suite tests
+  buildable:      False
+  type:           exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is:        tests.hs
+  other-modules:  KS
+                  QC
+
+  ghc-options:
+    -Wall -threaded -rtsopts
+
+  build-depends:
+    vector >= 0.7,
+    HUnit,
+    QuickCheck,
+    base,
+    mwc-random,
+    statistics >= 0.10.1.0,
+    test-framework,
+    test-framework-hunit,
+    test-framework-quickcheck2
+
+source-repository head
+  type:     git
+  location: git://github.com/bos/mwc-random
+
+source-repository head
+  type:     mercurial
+  location: https://bitbucket.org/bos/mwc-random
diff --git a/test/golden-test-cases/mwc-random.nix.golden b/test/golden-test-cases/mwc-random.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/mwc-random.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, fetchurl, HUnit, math-functions, primitive
+, QuickCheck, statistics, test-framework, test-framework-hunit
+, test-framework-quickcheck2, time, vector
+}:
+mkDerivation {
+  pname = "mwc-random";
+  version = "0.13.6.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base math-functions primitive time vector
+  ];
+  testHaskellDepends = [
+    base HUnit QuickCheck statistics test-framework
+    test-framework-hunit test-framework-quickcheck2 vector
+  ];
+  doCheck = false;
+  homepage = "https://github.com/bos/mwc-random";
+  description = "Fast, high quality pseudo random number generation";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/nanospec.cabal b/test/golden-test-cases/nanospec.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/nanospec.cabal
@@ -0,0 +1,45 @@
+name:             nanospec
+version:          0.2.1
+license:          MIT
+license-file:     LICENSE
+copyright:        (c) 2012-2015 Simon Hengel
+author:           Simon Hengel <sol@typeful.net>
+maintainer:       Simon Hengel <sol@typeful.net>
+category:         Testing
+synopsis:         A lightweight implementation of a subset of Hspec's API
+description:      A lightweight implementation of a subset of Hspec's API with
+                  minimal dependencies.
+build-type:       Simple
+cabal-version:    >= 1.8
+
+source-repository head
+  type: git
+  location: https://github.com/hspec/nanospec
+
+library
+  exposed:
+      False
+  ghc-options:
+      -Wall
+  hs-source-dirs:
+      src
+  exposed-modules:
+      Test.Hspec
+  build-depends:
+      base >= 4 && <= 5
+
+test-suite spec
+  type:
+      exitcode-stdio-1.0
+  cpp-options:
+      -DTEST
+  ghc-options:
+      -Wall
+  hs-source-dirs:
+      src, test
+  main-is:
+      Test/HspecSpec.hs
+  build-depends:
+      base
+    , hspec >= 1.3
+    , silently >= 1.2.4
diff --git a/test/golden-test-cases/nanospec.nix.golden b/test/golden-test-cases/nanospec.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/nanospec.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, hspec, silently }:
+mkDerivation {
+  pname = "nanospec";
+  version = "0.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [ base hspec silently ];
+  description = "A lightweight implementation of a subset of Hspec's API";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/netpbm.cabal b/test/golden-test-cases/netpbm.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/netpbm.cabal
@@ -0,0 +1,166 @@
+name:          netpbm
+version:       1.0.2
+license:       MIT
+copyright:     2013 Niklas Hambüchen <mail@nh2.me>
+author:        Niklas Hambüchen <mail@nh2.me>
+maintainer:    Niklas Hambüchen <mail@nh2.me>
+category:      Codec, Graphics
+build-type:    Simple
+stability:     experimental
+tested-With:   GHC==7.4.2
+cabal-version: >= 1.10
+homepage:      https://github.com/nh2/haskell-netpbm
+bug-Reports:   https://github.com/nh2/haskell-netpbm/issues
+synopsis:      Loading PBM, PGM, PPM image files
+description:
+  This package contains pure Haskell parsers for the netpbm image formats: PBM, PGM and PPM, for both ASCII and binary encodings.
+  .
+  All netpbm image formats are implemented (P1 - P6).
+  .
+  The current implementation parses PPM images at around 10 MB/s on a Core i5-2520M.
+  .
+  CHANGELOG
+  .
+  Version 1.0.1
+  .
+  * Added required Vector imports necessary for deriving Unbox instances.
+  .
+  Version 1.0.0
+  .
+  * Use storable instead of unboxed vectors to allow easier integration with Ptr based APIs.
+
+extra-source-files:
+  test/ppms/SIPI-16.ppm
+  test/ppms/SIPI-convert-16.pgm
+  test/ppms/SIPI-convert-plain-16.pbm
+  test/ppms/SIPI-convert-plain-16.pgm
+  test/ppms/SIPI-convert-plain-16.ppm
+  test/ppms/SIPI-convert-plain.pbm
+  test/ppms/SIPI-convert-plain.pgm
+  test/ppms/SIPI-convert-plain.ppm
+  test/ppms/SIPI-convert.pbm
+  test/ppms/SIPI-convert.pgm
+  test/ppms/SIPI.ppm
+  test/ppms/SIPI.tiff
+  test/ppms/SOURCES
+  test/ppms/bad/gitlogo-comment-in-magic-number.ppm
+  test/ppms/bad/gitlogo-comment-user-error-no-space-after-magic.ppm
+  test/ppms/bad/gitlogo-comment-user-error.ppm
+  test/ppms/bad/gitlogo-comment-without-following-extra-newline-before-data-block.ppm
+  test/ppms/bad/gitlogo-garbage-in-numbers.ppm
+  test/ppms/bad/gitlogo-not-enough-data.ppm
+  test/ppms/bad/gitlogo-value-bigger-than-maxval.ppm
+  test/ppms/bad/gitlogo-width--1.ppm
+  test/ppms/bad/pbm-plain-from-spec-multiple-no-space-before-junk.pbm
+  test/ppms/gimp.ppm
+  test/ppms/gitlogo-16bit-created-by-simg_convert_-16be_gitlogo.ppm_output.ppm
+  test/ppms/gitlogo-comment-after-magic-number.ppm
+  test/ppms/gitlogo-comment-is-data.ppm
+  test/ppms/gitlogo-comments.ppm
+  test/ppms/gitlogo-double.ppm
+  test/ppms/gitlogo-only-spaces-in-header.ppm
+  test/ppms/gitlogo.ppm
+  test/ppms/graceful/face.ppm
+  test/ppms/graceful/gitlogo-double-with-whitespace-in-between.ppm
+  test/ppms/graceful/gitlogo-one-and-a-half.ppm
+  test/ppms/image.ppm
+  test/ppms/internet/set1/boxes_1.ppm
+  test/ppms/internet/set1/boxes_2.ppm
+  test/ppms/internet/set1/house_1.ppm
+  test/ppms/internet/set1/house_2.ppm
+  test/ppms/internet/set1/moreboxes_1.ppm
+  test/ppms/internet/set1/moreboxes_2.ppm
+  test/ppms/internet/set1/sign_1.ppm
+  test/ppms/internet/set1/sign_2.ppm
+  test/ppms/internet/set1/stop_1.ppm
+  test/ppms/internet/set1/stop_2.ppm
+  test/ppms/internet/set1/synth_1.ppm
+  test/ppms/internet/set1/synth_2.ppm
+  test/ppms/internet/set1/tree_1.ppm
+  test/ppms/internet/set1/tree_2.ppm
+  test/ppms/internet/set1/west_1.ppm
+  test/ppms/internet/set1/west_2.ppm
+  test/ppms/internet/set2/comments.pgm
+  test/ppms/internet/set2/half.pgm
+  test/ppms/internet/set2/half.ppm
+  test/ppms/internet/set2/mandrill.pgm
+  test/ppms/internet/set2/mandrill.ppm
+  test/ppms/internet/set3/balloons.pgm
+  test/ppms/internet/set3/birch.pnm
+  test/ppms/internet/set3/cathedral.pnm
+  test/ppms/internet/set3/checkers.pnm
+  test/ppms/internet/set3/circle_ascii.pbm
+  test/ppms/internet/set3/columns.pgm
+  test/ppms/internet/set3/cotton.pnm
+  test/ppms/internet/set3/feep.pbm
+  test/ppms/internet/set3/feep.pgm
+  test/ppms/internet/set3/feep.ppm
+  test/ppms/internet/set3/fish_tile.pnm
+  test/ppms/internet/set3/garnet.pnm
+  test/ppms/internet/set3/oak.pnm
+  test/ppms/internet/set3/quilt.pnm
+  test/ppms/internet/set3/snail.ppm
+  test/ppms/internet/set3/tracks.pgm
+  test/ppms/obj10__0-from-coil-100-invalid-since-16-bit-little-endian.ppm
+  test/ppms/pbm-plain-from-spec-multiple-but-treated-as-junk.pbm
+  test/ppms/pbm-plain-from-spec.pbm
+  test/ppms/pgm-plain-made-up-from-pbm-spec.pgm
+  test/ppms/testgrid.pbm
+  test/ppms/testimg.ppm
+  test/ppms/weird/gitlogo-comments-everywhere.ppm
+  test/ppms/weird/gitlogo-width-0.ppm
+
+
+source-repository head
+  type:      git
+  location:  git://github.com/nh2/haskell-netpbm.git
+
+
+library
+  exposed-modules:
+    Graphics.Netpbm
+  build-depends:
+      base < 5
+    , attoparsec >= 0.10
+    , attoparsec-binary >= 0.2
+    , bytestring >= 0.9
+    , storable-record >= 0.0.2.5
+    , unordered-containers >= 0.1.3.0
+    , vector >= 0.7
+    , vector-th-unbox >= 0.2.0.1
+  hs-source-dirs:
+    src
+  default-language: Haskell2010
+  ghc-options: -Wall
+
+
+test-Suite tests
+  default-language: Haskell2010
+  type: exitcode-stdio-1.0
+  hs-source-dirs:
+    test
+  main-is:
+    Main.hs
+  build-depends:
+      base >= 4
+    , netpbm
+    , bytestring >= 0.9
+    , hspec >= 1.3.0.1
+    , HUnit >= 1.2
+    , vector >= 0.7
+  ghc-options: -Wall
+
+
+benchmark bench
+  default-language: Haskell2010
+  type: exitcode-stdio-1.0
+  hs-source-dirs:
+    bench
+  main-is:
+    Bench.hs
+  build-depends:
+      base >= 4
+    , netpbm
+    , bytestring >= 0.9
+    , criterion >= 0.6.0.0
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/netpbm.nix.golden b/test/golden-test-cases/netpbm.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/netpbm.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, attoparsec, attoparsec-binary, base, bytestring
+, criterion, fetchurl, hspec, HUnit, storable-record
+, unordered-containers, vector, vector-th-unbox
+}:
+mkDerivation {
+  pname = "netpbm";
+  version = "1.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec attoparsec-binary base bytestring storable-record
+    unordered-containers vector vector-th-unbox
+  ];
+  testHaskellDepends = [ base bytestring hspec HUnit vector ];
+  benchmarkHaskellDepends = [ base bytestring criterion ];
+  homepage = "https://github.com/nh2/haskell-netpbm";
+  description = "Loading PBM, PGM, PPM image files";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/network-protocol-xmpp.cabal b/test/golden-test-cases/network-protocol-xmpp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/network-protocol-xmpp.cabal
@@ -0,0 +1,57 @@
+name: network-protocol-xmpp
+version: 0.4.8
+license: GPL-3
+license-file: license.txt
+author: John Millikin <jmillikin@gmail.com>, Stephan Maka <stephan@spaceboyz.net>
+maintainer: John Millikin <jmillikin@gmail.com>
+build-type: Simple
+cabal-version: >= 1.6
+category: Network
+stability: experimental
+homepage: https://john-millikin.com/software/haskell-xmpp/
+bug-reports: mailto:jmillikin@gmail.com
+
+synopsis: Client library for the XMPP protocol.
+description:
+
+source-repository head
+  type: git
+  location: https://john-millikin.com/code/haskell-xmpp/
+
+source-repository this
+  type: git
+  location: https://john-millikin.com/code/haskell-xmpp/
+  tag: network-protocol-xmpp_0.4.8
+
+library
+  ghc-options: -Wall -O2
+  hs-source-dirs: lib
+
+  build-depends:
+      base >= 4.0 && < 5.0
+    , bytestring >= 0.9
+    , gnuidn >= 0.2 && < 0.3
+    , gnutls >= 0.1.4 && < 0.3
+    , gsasl >= 0.3 && < 0.4
+    , libxml-sax >= 0.7 && < 0.8
+    , monads-tf >= 0.1 && < 0.2
+    , network >= 2.2
+    , text >= 0.10
+    , transformers >= 0.2
+    , xml-types >= 0.3 && < 0.4
+
+  exposed-modules:
+    Network.Protocol.XMPP
+
+  other-modules:
+    Network.Protocol.XMPP.Client
+    Network.Protocol.XMPP.Client.Authentication
+    Network.Protocol.XMPP.Client.Features
+    Network.Protocol.XMPP.Component
+    Network.Protocol.XMPP.Connections
+    Network.Protocol.XMPP.ErrorT
+    Network.Protocol.XMPP.Handle
+    Network.Protocol.XMPP.JID
+    Network.Protocol.XMPP.Monad
+    Network.Protocol.XMPP.Stanza
+    Network.Protocol.XMPP.XML
diff --git a/test/golden-test-cases/network-protocol-xmpp.nix.golden b/test/golden-test-cases/network-protocol-xmpp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/network-protocol-xmpp.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, fetchurl, gnuidn, gnutls, gsasl
+, libxml-sax, monads-tf, network, text, transformers, xml-types
+}:
+mkDerivation {
+  pname = "network-protocol-xmpp";
+  version = "0.4.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring gnuidn gnutls gsasl libxml-sax monads-tf network
+    text transformers xml-types
+  ];
+  homepage = "https://john-millikin.com/software/haskell-xmpp/";
+  description = "Client library for the XMPP protocol";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/network-transport-tcp.cabal b/test/golden-test-cases/network-transport-tcp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/network-transport-tcp.cabal
@@ -0,0 +1,93 @@
+Name:          network-transport-tcp
+Version:       0.6.0
+Cabal-Version: >=1.10
+Build-Type:    Simple
+License:       BSD3
+License-file:  LICENSE
+Copyright:     Well-Typed LLP, Tweag I/O Limited
+Author:        Duncan Coutts, Nicolas Wu, Edsko de Vries
+maintainer:    Facundo Domínguez <facundo.dominguez@tweag.io>
+Stability:     experimental
+Homepage:      http://haskell-distributed.github.com
+Bug-Reports:   https://cloud-haskell.atlassian.net/browse/NTTCP
+Synopsis:      TCP instantiation of Network.Transport
+Description:   TCP instantiation of Network.Transport
+Tested-With:   GHC==7.6.3 GHC==7.8.4 GHC==7.10.3
+Category:      Network
+extra-source-files: ChangeLog
+
+Source-Repository head
+  Type:     git
+  Location: https://github.com/haskell-distributed/network-transport-tcp
+
+Flag use-mock-network
+  Description:     Use mock network implementation (for testing)
+  Default:         False
+
+Library
+  Build-Depends:   base >= 4.3 && < 5,
+                   network-transport >= 0.5 && < 0.6,
+                   data-accessor >= 0.2 && < 0.3,
+                   containers >= 0.4 && < 0.6,
+                   bytestring >= 0.9 && < 0.11,
+                   network >= 2.6.2 && < 2.7
+  Exposed-modules: Network.Transport.TCP,
+                   Network.Transport.TCP.Internal
+  Default-Extensions: CPP
+  default-language: Haskell2010
+  Other-Extensions:   RecursiveDo
+  ghc-options:     -Wall -fno-warn-unused-do-bind
+  HS-Source-Dirs:  src
+  If flag(use-mock-network)
+    CPP-Options:     -DUSE_MOCK_NETWORK
+    Exposed-modules: Network.Transport.TCP.Mock.Socket
+                     Network.Transport.TCP.Mock.Socket.ByteString
+
+Test-Suite TestTCP 
+  Type:            exitcode-stdio-1.0
+  Main-Is:         TestTCP.hs
+  Build-Depends:   base >= 4.3 && < 5,
+                   bytestring >= 0.9 && < 0.11,
+                   network-transport-tests >= 0.2.1.0 && < 0.3,
+                   network >= 2.3 && < 2.7,
+                   network-transport,
+                   network-transport-tcp
+  ghc-options:     -threaded -rtsopts -with-rtsopts=-N
+  HS-Source-Dirs:  tests
+  default-extensions:      CPP,
+                   OverloadedStrings
+  default-language: Haskell2010
+  If flag(use-mock-network)
+    CPP-Options:   -DUSE_MOCK_NETWORK
+
+Test-Suite TestQC
+  Type:           exitcode-stdio-1.0
+  Main-Is:        TestQC.hs
+  If flag(use-mock-network)
+    Build-Depends:  base >= 4.3 && < 5,
+                    test-framework,
+                    test-framework-quickcheck2,
+                    test-framework-hunit,
+                    QuickCheck,
+                    HUnit,
+                    network-transport,
+                    network-transport-tcp,
+                    containers,
+                    bytestring,
+                    pretty,
+                    data-accessor,
+                    data-accessor-transformers,
+                    mtl,
+                    transformers,
+                    lockfree-queue
+  Else
+    Buildable: False
+  ghc-options:    -threaded -Wall -fno-warn-orphans
+  HS-Source-Dirs: tests
+  default-extensions: TypeSynonymInstances
+                  FlexibleInstances
+                  OverlappingInstances
+                  OverloadedStrings
+                  DeriveDataTypeable
+                  MultiParamTypeClasses
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/network-transport-tcp.nix.golden b/test/golden-test-cases/network-transport-tcp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/network-transport-tcp.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, bytestring, containers, data-accessor
+, fetchurl, network, network-transport, network-transport-tests
+}:
+mkDerivation {
+  pname = "network-transport-tcp";
+  version = "0.6.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring containers data-accessor network network-transport
+  ];
+  testHaskellDepends = [
+    base bytestring network network-transport network-transport-tests
+  ];
+  homepage = "http://haskell-distributed.github.com";
+  description = "TCP instantiation of Network.Transport";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/nix-paths.cabal b/test/golden-test-cases/nix-paths.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/nix-paths.cabal
@@ -0,0 +1,37 @@
+name:                   nix-paths
+version:                1.0.1
+synopsis:               Knowledge of Nix's installation directories.
+description:            This module provides full paths to various Nix
+                        utilities, like @nix-store@, @nix-instantiate@, and
+                        @nix-env@.
+category:               Distribution, Nix
+homepage:               https://github.com/peti/nix-paths
+bug-reports:            https://github.com/peti/nix-paths/issues
+author:                 Peter Simons
+maintainer:             simons@cryp.to
+license:                BSD3
+license-file:           LICENSE
+build-type:             Custom
+cabal-version:          >= 1.10
+tested-with:            GHC > 7.2 && < 8.3
+
+flag allow-relative-paths
+  description:          If any of the required Nix tools are missing at
+                        build-time, compile a run-time $PATH dependent
+                        variant of this library instead of failing. This is
+                        useful for test environment such as Travis-CI, which
+                        may not have Nix installed.
+  default:              False
+  manual:               True
+
+source-repository head
+  type: git
+  location: https://github.com/peti/nix-paths
+
+library
+  default-language:     Haskell2010
+  hs-source-dirs:       src
+  exposed-modules:      Nix.Paths, Nix.FindFile
+  build-depends:        base < 5, process
+  if !flag(allow-relative-paths)
+    build-tools:        nix-instantiate, nix-build, nix-env, nix-store, nix-hash
diff --git a/test/golden-test-cases/nix-paths.nix.golden b/test/golden-test-cases/nix-paths.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/nix-paths.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, nix, process }:
+mkDerivation {
+  pname = "nix-paths";
+  version = "1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base process ];
+  libraryToolDepends = [ nix ];
+  homepage = "https://github.com/peti/nix-paths";
+  description = "Knowledge of Nix's installation directories";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/nvim-hs.cabal b/test/golden-test-cases/nvim-hs.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/nvim-hs.cabal
@@ -0,0 +1,201 @@
+name:                nvim-hs
+version:             0.2.5
+synopsis:            Haskell plugin backend for neovim
+description:
+  This package provides a plugin provider for neovim. It allows you to write
+  plugins for one of the great editors of our time in the best programming
+  language of our time! ;-)
+  .
+  You should find all the documentation you need inside the "Neovim" module.
+  Most other modules are considered internal, so don't be annoyed if using
+  things from there may break your code!
+  .
+  The following modules may also be of interest and they should not change
+  their API: "Neovim.Quickfix"
+  .
+  If you want to write unit tests that interact with neovim, "Neovim.Test"
+  provides some useful functions for that.
+  .
+  If you are keen to debug /nvim-hs/ or a module you are writing, take a look
+  at the "Neovim.Debug" module.
+  .
+  If you spot any errors or if you have great ideas, feel free to open an issue
+  on github.
+homepage:            https://github.com/neovimhaskell/nvim-hs
+license:             Apache-2.0
+license-file:        LICENSE
+author:              Sebastian Witte
+maintainer:          woozletoff@gmail.com
+copyright:           Copyright 2017 Sebastian Witte <woozletoff@gmail.com>
+category:            Editor
+build-type:          Simple
+cabal-version:       >=1.18
+tested-with:         GHC == 7.10.3, GHC == 8.0.2
+extra-source-files:    nvim-hs-devel.sh
+                     , test-files/compile-error-for-quickfix-test1
+                     , test-files/compile-error-for-quickfix-test2
+                     , test-files/compile-error-for-quickfix-test3
+                     , test-files/compile-error-for-quickfix-test4
+                     , test-files/compile-error-for-quickfix-test5
+                     , test-files/compile-error-for-quickfix-test6
+                     , test-files/hello
+                     , apiblobs/0.1.7.msgpack
+                     , apiblobs/0.2.0.msgpack
+                     , api
+
+extra-doc-files:       CHANGELOG.md
+                     , README.md
+                     , apiblobs/README.md
+
+source-repository head
+    type:            git
+    location:        https://github.com/neovimhaskell/nvim-hs
+
+executable nvim-hs
+  main-is:              Main.hs
+  hs-source-dirs:       executable
+  default-language:     Haskell2010
+  build-depends:        base >=4.6 && <5, nvim-hs, data-default
+  ghc-options:          -threaded -rtsopts -with-rtsopts=-N
+
+library
+  exposed-modules:      Neovim
+                      , Neovim.Quickfix
+                      , Neovim.Plugin.ConfigHelper
+                      , Neovim.Debug
+                      , Neovim.Test
+  -- Note that every module below this is considered internal and if you have to
+  -- import it somewhere in your code and you think it should be generally
+  -- available , you should open a ticket about inclusion in the export list of
+  -- the Neovim module. Since we are still in a prototyping stage, every user of
+  -- this library should have the freedom to do what she wants.
+                      , Neovim.API.String
+                      , Neovim.Classes
+                      , Neovim.Compat.Megaparsec
+                      , Neovim.Config
+                      , Neovim.Context
+                      , Neovim.Context.Internal
+                      , Neovim.Exceptions
+                      , Neovim.Plugin
+                      , Neovim.Plugin.Classes
+                      , Neovim.Plugin.Internal
+                      , Neovim.Plugin.IPC
+                      , Neovim.Plugin.IPC.Classes
+                      , Neovim.Log
+                      , Neovim.Main
+                      , Neovim.RPC.Classes
+                      , Neovim.RPC.Common
+                      , Neovim.RPC.EventHandler
+                      , Neovim.RPC.FunctionCall
+                      , Neovim.RPC.SocketReader
+                      , Neovim.Plugin.Startup
+                      , Neovim.Util
+                      , Neovim.Plugin.ConfigHelper.Internal
+                      , Neovim.API.Parser
+                      , Neovim.API.TH
+  other-extensions:     DeriveGeneric
+  build-depends:        base >=4.6 && < 5
+                      , ansi-wl-pprint
+                      , bytestring
+                      , cereal
+                      , cereal-conduit >= 0.7.3
+                      , conduit
+
+                      -- sinkHandle flushed after every yield in the releases
+                      -- [1.1.2, 1.1.17) and in release 1.2.2 an API was added
+                      -- to flush manually, so any other version probably does
+                      -- not work unless you set NoBuffering on the handle (see #61)
+                      -- I think having NoBuffering on TCP-Handles is kind of
+                      -- ridicilous, so the version range [1.1.17, 1.2.2) is
+                      -- simply excluded
+                      , conduit-extra >= 1.1.2 && < 1.1.17 || >= 1.2.2
+
+                      , containers
+                      , data-default
+                      , deepseq >= 1.1 && < 1.5
+                      , directory
+                      , dyre
+                      , exceptions
+                      , filepath
+                      , foreign-store
+                      , hslogger
+                      , messagepack >= 0.5.4
+                      , monad-control
+                      , network
+                      , lifted-base
+                      , mtl >= 2.2.1 && < 2.3
+                      , optparse-applicative
+                      , time-locale-compat
+                      , megaparsec
+                      , process
+                      , resourcet
+                      , setenv >= 0.1.1.3
+                      , stm
+                      , streaming-commons
+                      , template-haskell
+                      , text
+                      , time
+                      , transformers
+                      , transformers-base
+                      , utf8-string
+                      , void
+  hs-source-dirs:       library
+  default-language:     Haskell2010
+  ghc-options:          -Wall
+
+
+test-suite hspec
+  type:                 exitcode-stdio-1.0
+  hs-source-dirs:       test-suite
+  main-is:              Spec.hs
+  default-language:     Haskell2010
+  build-depends:        base >= 4.6 && < 5
+                      , nvim-hs
+
+                      , hspec ==2.*
+                      , hspec-discover
+                      , QuickCheck >=2.6
+
+                      , ansi-wl-pprint
+                      , bytestring
+                      , cereal
+                      , cereal-conduit
+                      , conduit
+                      , conduit-extra
+                      , containers
+                      , data-default
+                      , directory
+                      , dyre
+                      , exceptions
+                      , filepath
+                      , foreign-store
+                      , hslogger
+                      , lifted-base
+                      , mtl
+                      , messagepack
+                      , time-locale-compat
+                      , network
+                      , optparse-applicative
+                      , megaparsec
+                      , process
+                      , resourcet
+                      , setenv >= 0.1.1.3
+                      , stm
+                      , streaming-commons
+                      , text
+                      , template-haskell
+                      , time
+                      , transformers
+                      , transformers-base
+                      , utf8-string
+                      , HUnit
+
+  other-modules:        Neovim.API.THSpec
+                      , Neovim.API.THSpecFunctions
+                      , Neovim.EmbeddedRPCSpec
+                      , Neovim.Plugin.ClassesSpec
+                      , Neovim.Plugin.ConfigHelperSpec
+                      , Neovim.RPC.SocketReaderSpec
+
+  ghc-options:          -threaded -rtsopts -with-rtsopts=-N
+
diff --git a/test/golden-test-cases/nvim-hs.nix.golden b/test/golden-test-cases/nvim-hs.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/nvim-hs.nix.golden
@@ -0,0 +1,41 @@
+{ mkDerivation, ansi-wl-pprint, base, bytestring, cereal
+, cereal-conduit, conduit, conduit-extra, containers, data-default
+, deepseq, directory, dyre, exceptions, fetchurl, filepath
+, foreign-store, hslogger, hspec, hspec-discover, HUnit
+, lifted-base, megaparsec, messagepack, monad-control, mtl, network
+, optparse-applicative, process, QuickCheck, resourcet, setenv, stm
+, streaming-commons, template-haskell, text, time
+, time-locale-compat, transformers, transformers-base, utf8-string
+, void
+}:
+mkDerivation {
+  pname = "nvim-hs";
+  version = "0.2.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    ansi-wl-pprint base bytestring cereal cereal-conduit conduit
+    conduit-extra containers data-default deepseq directory dyre
+    exceptions filepath foreign-store hslogger lifted-base megaparsec
+    messagepack monad-control mtl network optparse-applicative process
+    resourcet setenv stm streaming-commons template-haskell text time
+    time-locale-compat transformers transformers-base utf8-string void
+  ];
+  executableHaskellDepends = [ base data-default ];
+  testHaskellDepends = [
+    ansi-wl-pprint base bytestring cereal cereal-conduit conduit
+    conduit-extra containers data-default directory dyre exceptions
+    filepath foreign-store hslogger hspec hspec-discover HUnit
+    lifted-base megaparsec messagepack mtl network optparse-applicative
+    process QuickCheck resourcet setenv stm streaming-commons
+    template-haskell text time time-locale-compat transformers
+    transformers-base utf8-string
+  ];
+  homepage = "https://github.com/neovimhaskell/nvim-hs";
+  description = "Haskell plugin backend for neovim";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/once.cabal b/test/golden-test-cases/once.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/once.cabal
@@ -0,0 +1,30 @@
+name:                once
+version:             0.2
+synopsis:            memoization for IO actions and functions
+description:         Please see Control.Once for examples
+homepage:            https://anonscm.debian.org/cgit/users/kaction-guest/haskell-once.git
+license:             GPL-3
+license-file:        LICENSE
+author:              Dmitry Bogatov
+maintainer:          KAction@gnu.org
+copyright:           2015,2016 Dmitry Bogatov
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Control.Once
+  other-modules:       Control.Once.Internal
+                       Control.Once.TH
+                       Control.Once.Class
+  build-depends:       base >= 4.7 && < 5,
+                       containers >= 0.5,
+                       hashable >= 1.2,
+                       unordered-containers >= 0.2,
+                       template-haskell >= 2.10
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: git://anonscm.debian.org/users/kaction-guest/haskell-once.git
diff --git a/test/golden-test-cases/once.nix.golden b/test/golden-test-cases/once.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/once.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, containers, fetchurl, hashable
+, template-haskell, unordered-containers
+}:
+mkDerivation {
+  pname = "once";
+  version = "0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers hashable template-haskell unordered-containers
+  ];
+  homepage = "https://anonscm.debian.org/cgit/users/kaction-guest/haskell-once.git";
+  description = "memoization for IO actions and functions";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/one-liner.cabal b/test/golden-test-cases/one-liner.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/one-liner.cabal
@@ -0,0 +1,50 @@
+Name:                 one-liner
+Version:              0.9.2
+Synopsis:             Constraint-based generics
+Description:          Write short and concise generic instances of type classes.
+                      one-liner is particularly useful for writing default
+                      implementations of type class methods.
+Homepage:             https://github.com/sjoerdvisscher/one-liner
+Bug-reports:          https://github.com/sjoerdvisscher/one-liner/issues
+License:              BSD3
+License-file:         LICENSE
+Author:               Sjoerd Visscher
+Maintainer:           sjoerd@w3future.com
+Category:             Generics
+Build-type:           Simple
+Cabal-version:        >= 1.8
+
+Extra-Source-Files:
+  examples/*.hs
+
+Library
+  HS-Source-Dirs:  src
+
+  Exposed-modules:
+    Generics.OneLiner
+    Generics.OneLiner.Internal
+
+  Build-depends:
+      base          >= 4.9 && < 5
+    , transformers  >= 0.5 && < 0.6
+    , contravariant >= 1.4 && < 1.5
+    , ghc-prim      >= 0.5 && < 1.0
+    , bifunctors    >= 5.4 && < 6.0
+    , profunctors   >= 5.2 && < 6.0
+    , tagged        >= 0.8 && < 0.9
+
+source-repository head
+  type:     git
+  location: git://github.com/sjoerdvisscher/one-liner.git
+
+Test-suite unittests
+  Hs-source-dirs:  test
+  Main-is:         unittests.hs
+
+  Build-depends:
+      base
+    , contravariant
+    , HUnit
+    , one-liner
+
+  Type: exitcode-stdio-1.0
diff --git a/test/golden-test-cases/one-liner.nix.golden b/test/golden-test-cases/one-liner.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/one-liner.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, bifunctors, contravariant, fetchurl, ghc-prim
+, HUnit, profunctors, tagged, transformers
+}:
+mkDerivation {
+  pname = "one-liner";
+  version = "0.9.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bifunctors contravariant ghc-prim profunctors tagged
+    transformers
+  ];
+  testHaskellDepends = [ base contravariant HUnit ];
+  homepage = "https://github.com/sjoerdvisscher/one-liner";
+  description = "Constraint-based generics";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/online.cabal b/test/golden-test-cases/online.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/online.cabal
@@ -0,0 +1,85 @@
+name: online
+version: 0.2.0
+synopsis:
+  online statistics
+description:
+  transformation of statistics to online algorithms
+homepage:
+  https://github.com/tonyday567/online
+license:
+  BSD3
+license-file:
+  LICENSE
+author:
+  Tony Day
+maintainer:
+  tonyday567@gmail.com
+copyright:
+  Tony Day
+category:
+  statistics            
+build-type:
+  Simple
+cabal-version:
+  >=1.10
+extra-source-files:
+  readme.md
+  stack.yaml
+
+library
+  default-language:
+    Haskell2010
+  ghc-options:
+    -Wall
+  hs-source-dirs:
+    src
+  exposed-modules:
+    Online,
+    Online.Stats,
+    Online.StatsL1,
+    Online.Quantiles
+  build-depends:
+    base >= 4.7 && < 5,
+    protolude,
+    foldl,
+    vector,
+    tdigest,
+    numhask,
+    vector-algorithms
+  default-extensions:
+    NoImplicitPrelude,
+    UnicodeSyntax,
+    BangPatterns,
+    BinaryLiterals,
+    DeriveFoldable,
+    DeriveFunctor,
+    DeriveGeneric,
+    DeriveTraversable,
+    DisambiguateRecordFields,
+    EmptyCase,
+    FlexibleContexts,
+    FlexibleInstances,
+    FunctionalDependencies,
+    GADTSyntax,
+    InstanceSigs,
+    KindSignatures,
+    LambdaCase,
+    MonadComprehensions,
+    MultiParamTypeClasses,
+    MultiWayIf,
+    NegativeLiterals,
+    OverloadedStrings,
+    ParallelListComp,
+    PartialTypeSignatures,
+    PatternSynonyms,
+    RankNTypes,
+    RecordWildCards,
+    RecursiveDo,
+    ScopedTypeVariables,
+    TupleSections,
+    TypeFamilies,
+    TypeOperators
+
+source-repository head
+  type:     git
+  location: https://github.com/tonyday567/online
diff --git a/test/golden-test-cases/online.nix.golden b/test/golden-test-cases/online.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/online.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, foldl, numhask, protolude, tdigest
+, vector, vector-algorithms
+}:
+mkDerivation {
+  pname = "online";
+  version = "0.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base foldl numhask protolude tdigest vector vector-algorithms
+  ];
+  homepage = "https://github.com/tonyday567/online";
+  description = "online statistics";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/openexr-write.cabal b/test/golden-test-cases/openexr-write.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/openexr-write.cabal
@@ -0,0 +1,52 @@
+name:                openexr-write
+version:             0.1.0.1
+synopsis:            Library for writing images in OpenEXR HDR file format.
+description:         OpenEXR allows to store pixels as floating point numbers and thus can capture high dynamic range.
+homepage:            https://github.com/pavolzetor/openexr-write#readme
+license:             GPL-3
+license-file:        LICENSE
+author:              Pavol Klacansky
+maintainer:          pavol@klacansky.com
+copyright:           2017 Pavol Klacansky
+category:            Graphics
+build-type:          Simple
+extra-source-files:  .gitignore
+                     .travis.yml
+                     CHANGELOG.md
+                     README.md
+                     stack.yaml
+                     test/generate.cpp
+                     test/images/red_1x1_no_compression.exr
+                     test/images/red_1x1_zips_compression.exr
+                     test/images/red_1x1_zip_compression.exr
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Graphics.OpenEXR
+  build-depends:       base >= 4.8 && < 5
+                     , binary
+                     , bytestring
+                     , data-binary-ieee754
+                     , deepseq
+                     , split
+                     , vector
+                     , vector-split
+                     , zlib
+  default-language:    Haskell2010
+
+test-suite spec
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base >= 4.8 && < 5
+                     , bytestring
+                     , directory
+                     , hspec
+                     , openexr-write
+                     , vector
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/pavolzetor/openexr-write
diff --git a/test/golden-test-cases/openexr-write.nix.golden b/test/golden-test-cases/openexr-write.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/openexr-write.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, binary, bytestring, data-binary-ieee754
+, deepseq, directory, fetchurl, hspec, split, vector, vector-split
+, zlib
+}:
+mkDerivation {
+  pname = "openexr-write";
+  version = "0.1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base binary bytestring data-binary-ieee754 deepseq split vector
+    vector-split zlib
+  ];
+  testHaskellDepends = [ base bytestring directory hspec vector ];
+  homepage = "https://github.com/pavolzetor/openexr-write#readme";
+  description = "Library for writing images in OpenEXR HDR file format";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/openpgp-asciiarmor.cabal b/test/golden-test-cases/openpgp-asciiarmor.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/openpgp-asciiarmor.cabal
@@ -0,0 +1,62 @@
+Name:                openpgp-asciiarmor
+Version:             0.1
+Synopsis:            OpenPGP (RFC4880) ASCII Armor codec
+Description:         OpenPGP (RFC4880) ASCII Armor codec
+Homepage:            http://floss.scru.org/openpgp-asciiarmor
+License:             OtherLicense
+License-file:        LICENSE
+Author:              Clint Adams
+Maintainer:          Clint Adams <clint@debian.org>
+Copyright:           2012, Clint Adams
+Category:            Codec, Data
+Build-type:          Simple
+Extra-source-files: tests/suite.hs
+  , tests/data/msg1.asc
+  , tests/data/msg1a.asc
+  , tests/data/msg1b.asc
+  , tests/data/msg1c.asc
+  , tests/data/msg1.gpg
+  , tests/data/msg2.asc
+  , tests/data/msg2.pgp
+  , tests/data/msg3
+  , tests/data/msg3.asc
+  , tests/data/msg3.sig
+  , tests/data/msg4
+  , tests/data/msg4.asc
+  , tests/data/msg4.sig
+
+Cabal-version:       >= 1.10
+
+
+Library
+  Exposed-modules:     Codec.Encryption.OpenPGP.ASCIIArmor
+                     , Codec.Encryption.OpenPGP.ASCIIArmor.Decode
+                     , Codec.Encryption.OpenPGP.ASCIIArmor.Encode
+                     , Codec.Encryption.OpenPGP.ASCIIArmor.Types
+  Other-Modules: Data.Digest.CRC24
+               , Codec.Encryption.OpenPGP.ASCIIArmor.Multipart
+               , Codec.Encryption.OpenPGP.ASCIIArmor.Utils
+  Build-depends: attoparsec
+               , base                  > 4       && < 5
+               , base64-bytestring
+               , bytestring
+               , cereal
+  default-language: Haskell98
+
+
+Test-Suite tests
+  type:       exitcode-stdio-1.0
+  main-is:    tests/suite.hs
+  Build-depends: attoparsec
+               , base                  > 4       && < 5
+               , base64-bytestring
+               , bytestring
+               , cereal
+               , HUnit
+               , test-framework
+               , test-framework-hunit
+  default-language: Haskell98
+
+source-repository head
+  type:     git
+  location: git://git.debian.org/users/clint/openpgp-asciiarmor.git
diff --git a/test/golden-test-cases/openpgp-asciiarmor.nix.golden b/test/golden-test-cases/openpgp-asciiarmor.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/openpgp-asciiarmor.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
+, cereal, fetchurl, HUnit, test-framework, test-framework-hunit
+}:
+mkDerivation {
+  pname = "openpgp-asciiarmor";
+  version = "0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base base64-bytestring bytestring cereal
+  ];
+  testHaskellDepends = [
+    attoparsec base base64-bytestring bytestring cereal HUnit
+    test-framework test-framework-hunit
+  ];
+  homepage = "http://floss.scru.org/openpgp-asciiarmor";
+  description = "OpenPGP (RFC4880) ASCII Armor codec";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/pager.cabal b/test/golden-test-cases/pager.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pager.cabal
@@ -0,0 +1,69 @@
+name:                pager
+version:             0.1.1.0
+synopsis:            Open up a pager, like 'less' or 'more'
+description:         
+  This opens up the user's $PAGER. On Linux, this is usually called @less@. On
+  the various BSDs, this is usually @more@.
+  .
+  CHANGES
+  .
+  [0.1.1.0] Add @printOrPage@ function and @sendToPagerStrict@ function.
+homepage:            https://github.com/pharpend/pager
+license:             BSD2
+license-file:        LICENSE
+author:              Peter Harpending
+maintainer:          peter@harpending.org
+bug-reports:         https://github.com/pharpend/pager
+copyright:           Copyright (c) 2015, Peter Harpending.
+category:            Data, System, Text
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:  
+  README.md
+  LICENSE
+data-files:
+  LICENSE
+
+source-repository head
+  type:                git
+  location:            https://github.com/pharpend/pager.git
+
+source-repository this
+  type:                git
+  location:            https://github.com/pharpend/pager.git
+  tag:                 0.1.1.0
+
+library
+  other-extensions:    
+    LambdaCase
+    MultiWayIf
+    OverloadedStrings
+  default-language:    Haskell2010
+  exposed-modules:     
+    System.Pager
+  build-depends:
+      base ==4.*
+    , bytestring
+    , conduit >=1.2.3
+    , conduit-extra
+    , directory
+    , process
+    , resourcet
+    , safe
+    , unix
+    , terminfo
+    , text
+    , transformers
+  
+executable hs-pager-test-pager
+  default-language:    Haskell2010
+  hs-source-dirs: test
+  other-modules: Paths_pager
+  main-is: main.hs
+  build-depends:
+      base ==4.*
+    , bytestring
+    , conduit-extra
+    , pager
+    , text
+  
diff --git a/test/golden-test-cases/pager.nix.golden b/test/golden-test-cases/pager.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pager.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, bytestring, conduit, conduit-extra, directory
+, fetchurl, process, resourcet, safe, terminfo, text, transformers
+, unix
+}:
+mkDerivation {
+  pname = "pager";
+  version = "0.1.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    base bytestring conduit conduit-extra directory process resourcet
+    safe terminfo text transformers unix
+  ];
+  executableHaskellDepends = [ base bytestring conduit-extra text ];
+  homepage = "https://github.com/pharpend/pager";
+  description = "Open up a pager, like 'less' or 'more'";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/partial-isomorphisms.cabal b/test/golden-test-cases/partial-isomorphisms.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/partial-isomorphisms.cabal
@@ -0,0 +1,50 @@
+Name:                partial-isomorphisms
+Version:             0.2.2.1
+Synopsis:            Partial isomorphisms.
+Description:         Partial isomorphisms as described in the
+                     paper:
+                     .
+                     Tillmann Rendel and Klaus Ostermann.
+                     Invertible Syntax Descriptions:
+                     Unifying Parsing and Pretty Printing.
+                     In /Proc. of Haskell Symposium/, 2010.
+                     .
+                     The paper also describes invertible syntax
+                     descriptions as a common interface for
+                     parsers and pretty printers. These are
+                     distributed separately in the
+                     /invertible-syntax/ package.
+Homepage:            http://www.informatik.uni-marburg.de/~rendel/unparse
+License:             BSD3
+License-file:        LICENSE
+Author:              Tillmann Rendel
+Maintainer:          Tillmann Rendel <rendel@informatik.uni-marburg.de>
+                     Stanislav Chernichkin <schernichkin@gmail.com>
+-- Copyright:
+Category:            Control
+Build-type:          Simple
+-- Extra-source-files:
+Cabal-version:       >=1.10
+
+source-repository head
+  type: git
+  location: git://github.com/schernichkin/partial-isomorphisms.git
+
+Library
+  Hs-source-dirs:   src
+  Exposed-modules:  Control.Isomorphism.Partial
+                    Control.Isomorphism.Partial.Constructors
+                    Control.Isomorphism.Partial.Derived
+                    Control.Isomorphism.Partial.Prim
+                    Control.Isomorphism.Partial.TH
+                    Control.Isomorphism.Partial.Unsafe
+
+  default-language: Haskell2010
+  other-extensions: TemplateHaskell, KindSignatures
+  Build-depends:    base >= 3 && < 5, template-haskell >= 2.11
+
+  ghc-options:     -Wall
+
+  -- Other-modules:
+
+  -- Build-tools:
diff --git a/test/golden-test-cases/partial-isomorphisms.nix.golden b/test/golden-test-cases/partial-isomorphisms.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/partial-isomorphisms.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, template-haskell }:
+mkDerivation {
+  pname = "partial-isomorphisms";
+  version = "0.2.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base template-haskell ];
+  homepage = "http://www.informatik.uni-marburg.de/~rendel/unparse";
+  description = "Partial isomorphisms";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/partial-semigroup.cabal b/test/golden-test-cases/partial-semigroup.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/partial-semigroup.cabal
@@ -0,0 +1,154 @@
+name: partial-semigroup
+version: 0.3.0.2
+synopsis: A partial binary associative operator
+category: Algebra
+
+description:
+  A partial semigroup is like a semigroup, but the operator is partial. We
+  represent this in Haskell as a total function @(<>?) :: a -> a -> Maybe a@.
+
+homepage:    https://github.com/chris-martin/partial-semigroup
+bug-reports: https://github.com/chris-martin/partial-semigroup/issues
+
+author:     Chris Martin <ch.martin@gmail.com>
+maintainer: Chris Martin <ch.martin@gmail.com>
+
+license: Apache-2.0
+license-file: license.txt
+
+build-type: Simple
+cabal-version: >= 1.10
+
+source-repository head
+  type: git
+  location: https://github.com/chris-martin/partial-semigroup
+
+flag semigroup-in-base
+  default: True
+  description:
+    Require a version of `base` that provides the `Data.Semigroup` and
+    `Data.List.NonEmpty` modules.
+    .
+    Disabling this flag adds a dependency on the `semigroups` package.
+
+flag identity-in-base
+  default: True
+  description:
+    Require a version of `base` that provides the `Data.Functor.Identity`
+    module.
+
+flag generics-in-base
+  default: True
+  description:
+    Require a version of `base` that provides the `GHC.Generics` module.
+    .
+    Disabling this flag removes the `Data.PartialSemigroup.Generics` module
+    from the package.
+
+flag enable-hedgehog
+  default: True
+  description:
+    Use the `hedgehog` package for tests.
+    .
+    Disabling this flag disables all of the tests that use `hedgehog`.
+
+flag enable-doctest
+  default: True
+  description:
+    Use the `doctest` package to test the code examples in Haddock comments.
+
+library
+  ghc-options: -Wall
+  default-language: Haskell2010
+  build-depends: base >=4 && <4.11
+  hs-source-dirs: src
+
+  exposed-modules: Data.PartialSemigroup
+
+  if flag(generics-in-base)
+    build-depends: base >=4.6
+    exposed-modules: Data.PartialSemigroup.Generics
+
+  if flag(identity-in-base)
+    build-depends: base >=4.8
+    cpp-options: -DIDENTITY
+
+  if flag(semigroup-in-base)
+    build-depends: base >=4.9
+  else
+    build-depends: semigroups >=0.8.4 && <1
+
+test-suite docs
+  type: exitcode-stdio-1.0
+  ghc-options: -Wall -threaded
+  default-language: Haskell2010
+  hs-source-dirs: test
+  main-is: docs.hs
+  build-depends: base >=4 && <4.11
+
+  if flag(enable-doctest)
+    build-depends: doctest >=0.11 && <0.14
+    cpp-options: -DDOCTEST
+
+test-suite examples
+  type: exitcode-stdio-1.0
+  ghc-options: -Wall -threaded
+  default-language: Haskell2010
+  hs-source-dirs: test
+  main-is: examples.hs
+
+  build-depends:
+      base >=4 && <4.11
+    , partial-semigroup
+
+  if flag(enable-hedgehog)
+    build-depends: hedgehog >=0.5 && <0.6
+    cpp-options: -DHEDGEHOG
+
+  if flag(semigroup-in-base)
+    build-depends: base >=4.9
+  else
+    build-depends: semigroups >=0.8.4 && <1
+
+test-suite properties
+  type: exitcode-stdio-1.0
+  ghc-options: -Wall -threaded
+  default-language: Haskell2010
+  hs-source-dirs: test
+  main-is: properties.hs
+  build-depends:
+      base >=4 && <4.11
+    , partial-semigroup
+
+  if flag(enable-hedgehog)
+    cpp-options: -DHEDGEHOG
+    hs-source-dirs: src-hedgehog
+    other-modules: Test.PartialSemigroup.Hedgehog
+    build-depends: hedgehog >=0.5 && <0.6
+
+  if flag(semigroup-in-base)
+    build-depends: base >=4.9
+  else
+    build-depends: semigroups >=0.8.4 && <1
+
+test-suite generics
+  type: exitcode-stdio-1.0
+  ghc-options: -Wall -threaded
+  default-language: Haskell2010
+  hs-source-dirs: test
+  main-is: generics.hs
+  build-depends:
+      base >=4 && <4.11
+    , partial-semigroup
+
+  if flag(generics-in-base)
+    if flag(enable-hedgehog)
+      cpp-options: -DHEDGEHOG
+      hs-source-dirs: src-hedgehog
+      other-modules: Test.PartialSemigroup.Hedgehog
+      build-depends: base >=4.6, hedgehog >=0.5 && <0.6
+
+    if flag(semigroup-in-base)
+      build-depends: base >=4.9
+    else
+      build-depends: semigroups >=0.8.4 && <1
diff --git a/test/golden-test-cases/partial-semigroup.nix.golden b/test/golden-test-cases/partial-semigroup.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/partial-semigroup.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, doctest, fetchurl, hedgehog }:
+mkDerivation {
+  pname = "partial-semigroup";
+  version = "0.3.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [ base doctest hedgehog ];
+  homepage = "https://github.com/chris-martin/partial-semigroup";
+  description = "A partial binary associative operator";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/pathtype.cabal b/test/golden-test-cases/pathtype.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pathtype.cabal
@@ -0,0 +1,150 @@
+Name:                pathtype
+Version:             0.8
+Synopsis:            Type-safe replacement for System.FilePath etc
+Description:
+  This package provides type-safe access to filepath manipulations.
+  .
+  "System.Path" is designed to be used instead of "System.FilePath".
+  (It is intended to provide versions of functions from that
+  module which have equivalent functionality but are more typesafe).
+  "System.Path.Directory" is a companion module
+  providing a type-safe alternative to "System.Directory".
+  .
+  The heart of this package is the @'Path' ar fd@ abstract type
+  which represents file and directory paths.
+  The idea is that there are two type parameters -
+  the first should be 'Abs' or 'Rel', and the second 'File' or 'Dir'.
+  A number of type synonyms are provided for common types:
+  .
+  > type Path.AbsFile = Path Abs File
+  > type Path.RelFile = Path Rel File
+  > type Path.AbsDir  = Path Abs Dir
+  > type Path.RelDir  = Path Rel Dir
+  >
+  > type Path.Abs  fd = Path Abs fd
+  > type Path.Rel  fd = Path Rel fd
+  > type Path.File ar = Path ar File
+  > type Path.Dir  ar = Path ar Dir
+  .
+  The type of the 'combine' (aka '</>') function gives the idea:
+  .
+  > (</>) :: Path.Dir ar -> Path.Rel fd -> Path ar fd
+  .
+  Together this enables us to give more meaningful types
+  to a lot of the functions,
+  and (hopefully) catch a bunch more errors at compile time.
+  .
+  For more details see the README.md file.
+  .
+  Related packages:
+  .
+  * @filepath@: The API of Neil Mitchell's "System.FilePath" module
+    (and properties satisfied) heavily influenced our package.
+  .
+  * @path@: Provides a wrapper type around 'FilePath'
+    and maps to functions from @filepath@ package.
+    This warrants consistency with @filepath@ functions.
+    Requires Template Haskell.
+  .
+  * @data-filepath@:
+    Requires 'Typeable' and Template Haskell.
+Stability:           experimental
+License:             BSD3
+Category:            System
+License-file:        LICENSE
+Author:              Ben Moseley, Ben Millwood, Henning Thielemann
+Maintainer:          haskell@henning-thielemann.de, ben@moseley.name
+HomePage:            http://hub.darcs.net/thielema/pathtype/
+Build-Type:          Simple
+Cabal-Version:       >=1.8
+Extra-Source-Files:
+  CHANGELOG
+  README.md
+  test/TestTemplate.hs
+  posix/System/Path/Host.hs
+  windows/System/Path/Host.hs
+  directory/pre-1.2/System/Path/ModificationTime.hs
+  directory/post-incl-1.2/System/Path/ModificationTime.hs
+
+Source-Repository head
+  Type:     darcs
+  Location: http://hub.darcs.net/thielema/pathtype/
+
+Source-Repository this
+  Tag:      0.8
+  Type:     darcs
+  Location: http://hub.darcs.net/thielema/pathtype/
+
+Flag old-time
+  Description: Build with directory < 1.2 and old-time
+  Default:     True
+
+Flag buildTools
+  Description: Build tool for updating test module
+  Default:     False
+
+Library
+  Build-Depends:
+    utility-ht >=0.0.11 && <0.1,
+    QuickCheck >= 2.1.0.1 && < 3,
+    deepseq >= 1.3 && <1.5,
+    time >= 1.0 && < 2,
+    transformers >=0.3 && <0.6,
+    tagged >=0.7 && <0.9,
+    base >= 4 && < 5
+
+  If flag(old-time)
+    Build-Depends: directory >= 1 && < 1.2, old-time >= 1.0 && < 2
+    Hs-Source-Dirs: directory/pre-1.2
+  Else
+    Build-Depends: directory >= 1.2 && < 2
+    Hs-Source-Dirs: directory/post-incl-1.2
+
+  Hs-Source-Dirs: src
+  If os(windows)
+    Hs-Source-Dirs: windows
+  Else
+    Hs-Source-Dirs: posix
+  Exposed-Modules:
+    System.Path
+    System.Path.Generic
+    System.Path.Directory
+    System.Path.IO
+    System.Path.Posix
+    System.Path.Windows
+    System.Path.Part
+    System.Path.PartClass
+  Other-Modules:
+    System.Path.Host
+    System.Path.Internal
+    System.Path.Internal.Part
+    System.Path.Internal.PartClass
+    System.Path.RegularExpression
+    System.Path.ModificationTime
+
+  GHC-Options: -Wall -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-unused-do-bind
+
+Test-Suite test
+  Type: exitcode-stdio-1.0
+  Main-Is: Test.hs
+  Other-Modules: TestResult
+  Hs-Source-Dirs: test
+
+  Build-Depends:
+    pathtype,
+    random >=1.0 && <1.2,
+    base
+
+  GHC-Options: -Wall -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-unused-do-bind
+
+Executable create-pathtype-test
+  If flag(buildTools)
+    Build-Depends:
+      utility-ht >=0.0.12 && <0.1,
+      base
+  Else
+    Buildable: False
+  Main-Is: CreateTest.hs
+  Hs-Source-Dirs: tool
+
+  GHC-Options: -Wall -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-unused-do-bind
diff --git a/test/golden-test-cases/pathtype.nix.golden b/test/golden-test-cases/pathtype.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pathtype.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, base, deepseq, directory, fetchurl, old-time
+, QuickCheck, random, tagged, time, transformers, utility-ht
+}:
+mkDerivation {
+  pname = "pathtype";
+  version = "0.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base deepseq directory old-time QuickCheck tagged time transformers
+    utility-ht
+  ];
+  testHaskellDepends = [ base random ];
+  homepage = "http://hub.darcs.net/thielema/pathtype/";
+  description = "Type-safe replacement for System.FilePath etc";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/pcap.cabal b/test/golden-test-cases/pcap.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pcap.cabal
@@ -0,0 +1,39 @@
+name:            pcap
+version:         0.4.5.2
+license:         BSD3
+license-file:    LICENSE
+synopsis:        A system-independent interface for user-level packet capture
+description:     A system-independent interface for user-level packet capture
+maintainer:      Bryan O'Sullivan <bos@serpentine.com>
+author:          Bryan O'Sullivan, Nick Burlett, Dominic Steinitz, Gregory Wright (original author)
+homepage:        https://github.com/bos/pcap
+bug-reports:     https://github.com/bos/pcap/issues
+category:        Network
+cabal-version:   >= 1.6
+extra-source-files:
+                 configure.ac configure include/pcapconfig.h.in
+                 pcap.buildinfo.in README.markdown
+extra-tmp-files: config.log config.status
+build-type:      Configure
+
+library
+  build-depends: base < 5, bytestring >= 0.9, network, time
+  if impl(ghc >= 6.10)
+    build-depends: base >= 4
+
+  exposed-modules: Network.Pcap.Base
+                   Network.Pcap
+  extensions:      ForeignFunctionInterface, CPP
+  ghc-options:     -Wall -funbox-strict-fields
+
+  include-dirs:    include
+  includes:        pcapconfig.h pcap.h
+  install-includes: pcapconfig.h
+
+source-repository head
+  type:     git
+  location: git://github.com/bos/pcap.git
+
+source-repository head
+  type:     mercurial
+  location: https://bitbucket.org/bos/pcap
diff --git a/test/golden-test-cases/pcap.nix.golden b/test/golden-test-cases/pcap.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pcap.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, bytestring, fetchurl, network, time }:
+mkDerivation {
+  pname = "pcap";
+  version = "0.4.5.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring network time ];
+  homepage = "https://github.com/bos/pcap";
+  description = "A system-independent interface for user-level packet capture";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/pdfinfo.cabal b/test/golden-test-cases/pdfinfo.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pdfinfo.cabal
@@ -0,0 +1,30 @@
+name:                pdfinfo
+version:             1.5.4
+synopsis:            Wrapper around the pdfinfo command.
+description:         Just a wrapper around the pdfinfo command (for collecting PDF file info). See man pdfinfo.
+license:             BSD3
+license-file:        LICENSE
+author:              Chris Done
+maintainer:          chrisdone@gmail.com
+copyright:           2013 Chris Done
+category:            Text
+build-type:          Simple
+cabal-version:       >=1.8
+homepage:            https://github.com/chrisdone/pdfinfo
+
+source-repository head
+  type:              git
+  location:          git@github.com:chrisdone/pdfinfo.git
+
+library
+  ghc-options:       -O2 -Wall
+  exposed-modules:   Text.PDF.Info
+  hs-source-dirs:    src/
+  build-depends:     base >= 4 && < 5,
+                     old-locale,
+                     time >= 1.1,
+                     time-locale-compat,
+                     process-extras,
+                     text,
+                     -- mtl-2.1 contains a severe bug
+                     mtl >= 1.1 && < 2.1 || >= 2.1.1
diff --git a/test/golden-test-cases/pdfinfo.nix.golden b/test/golden-test-cases/pdfinfo.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pdfinfo.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, mtl, old-locale, process-extras
+, text, time, time-locale-compat
+}:
+mkDerivation {
+  pname = "pdfinfo";
+  version = "1.5.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base mtl old-locale process-extras text time time-locale-compat
+  ];
+  homepage = "https://github.com/chrisdone/pdfinfo";
+  description = "Wrapper around the pdfinfo command";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/pell.cabal b/test/golden-test-cases/pell.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pell.cabal
@@ -0,0 +1,54 @@
+-- Initial pell.cabal generated by cabal init.  For further documentation, 
+-- see http://haskell.org/cabal/users-guide/
+
+name:                pell
+version:             0.1.1.0
+synopsis:            Package to solve the Generalized Pell Equation.
+description:         Finds all solutions of the generalized Pell Equation.   
+homepage:            https://github.com/brunjlar/pell
+license:             MIT
+license-file:        LICENSE
+author:              Lars Bruenjes
+maintainer:          brunjlar@gmail.com
+copyright:           (c) 2016 by Dr. Lars Brünjes 
+category:            Math, Algorithms, Number Theory
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.20.0
+
+library
+  exposed-modules:     Math.NumberTheory.Pell
+                     , Math.NumberTheory.Moduli.SquareRoots
+  other-modules:       Math.NumberTheory.Pell.PQa
+  build-depends:       base >=4.7 && <5
+                     , arithmoi
+                     , containers
+  default-language:    Haskell2010
+  
+Test-Suite test-pell
+  type:                detailed-0.9
+  test-module:         Math.NumberTheory.Pell.Test
+  other-modules:       Math.NumberTheory.Moduli.SquareRoots
+                     , Math.NumberTheory.Moduli.SquareRoots.Test
+                     , Math.NumberTheory.Pell
+                     , Math.NumberTheory.Pell.PQa
+                     , Math.NumberTheory.Pell.Test.Reduced
+                     , Math.NumberTheory.Pell.Test.Solve
+                     , Math.NumberTheory.Pell.Test.Utils
+  build-depends:       base >= 4.7 && <5
+                     , arithmoi
+                     , containers
+                     , QuickCheck >= 2.8
+                     , primes
+                     , Cabal >= 1.20.0
+                     , cabal-test-quickcheck
+  default-language:    Haskell2010
+
+source-repository head
+  type:                git
+  location:            https://github.com/brunjlar/pell
+
+source-repository this
+  type:                git
+  location:            https://github.com/brunjlar/pell
+  tag:                 0.1.1.0
diff --git a/test/golden-test-cases/pell.nix.golden b/test/golden-test-cases/pell.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pell.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, arithmoi, base, Cabal, cabal-test-quickcheck
+, containers, fetchurl, primes, QuickCheck
+}:
+mkDerivation {
+  pname = "pell";
+  version = "0.1.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ arithmoi base containers ];
+  testHaskellDepends = [
+    arithmoi base Cabal cabal-test-quickcheck containers primes
+    QuickCheck
+  ];
+  homepage = "https://github.com/brunjlar/pell";
+  description = "Package to solve the Generalized Pell Equation";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/persistable-types-HDBC-pg.cabal b/test/golden-test-cases/persistable-types-HDBC-pg.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/persistable-types-HDBC-pg.cabal
@@ -0,0 +1,42 @@
+name:                persistable-types-HDBC-pg
+version:             0.0.1.5
+synopsis:            HDBC and Relational-Record instances of PostgreSQL extended types
+description:         This package contains HDBC Convertible instances and
+                     Relational-Record persistable instances of PostgreSQL extended types
+                     Supported extended types: inet, cidr
+homepage:            http://khibino.github.io/haskell-relational-record/
+license:             BSD3
+license-file:        LICENSE
+author:              Kei Hibino
+maintainer:          ex8k.hibino@gmail.com
+copyright:           Copyright (c) 2015-2017 Kei Hibino
+category:            Database
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:           GHC == 8.2.1
+                     , GHC == 8.0.1, GHC == 8.0.2
+                     , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
+                     , GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
+                     , GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3
+                     , GHC == 7.4.1, GHC == 7.4.2
+
+extra-source-files:
+                     example/inet.sh
+                     example/DS.hs
+                     example/InetExample.hs
+
+library
+  exposed-modules:
+                       Database.HDBC.PostgreSQL.Instances
+                       Database.HDBC.PostgreSQL.Persistable
+
+  other-extensions:    MultiParamTypeClasses
+  build-depends:       base <5
+                     , bytestring
+                     , text-postgresql
+                     , convertible
+                     , HDBC
+                     , persistable-record >= 0.4
+                     , relational-query-HDBC
+  hs-source-dirs:      src
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/persistable-types-HDBC-pg.nix.golden b/test/golden-test-cases/persistable-types-HDBC-pg.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/persistable-types-HDBC-pg.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, convertible, fetchurl, HDBC
+, persistable-record, relational-query-HDBC, text-postgresql
+}:
+mkDerivation {
+  pname = "persistable-types-HDBC-pg";
+  version = "0.0.1.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring convertible HDBC persistable-record
+    relational-query-HDBC text-postgresql
+  ];
+  homepage = "http://khibino.github.io/haskell-relational-record/";
+  description = "HDBC and Relational-Record instances of PostgreSQL extended types";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/persistent-mysql-haskell.cabal b/test/golden-test-cases/persistent-mysql-haskell.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/persistent-mysql-haskell.cabal
@@ -0,0 +1,66 @@
+name:            persistent-mysql-haskell
+version:         0.3.6
+license:         MIT
+license-file:    LICENSE
+author:          Naushadh <naushadh@protonmail.com>, Felipe Lessa <felipe.lessa@gmail.com>, Michael Snoyman
+maintainer:      Naushadh <naushadh@protonmail.com>
+synopsis:        A pure haskell backend for the persistent library using MySQL database server.
+category:        Database, Yesod
+cabal-version:   >= 1.8
+build-type:      Simple
+homepage:        http://www.yesodweb.com/book/persistent
+bug-reports:     https://github.com/naushadh/persistent/issues
+description:
+    This package contains a backend for persistent using the
+    MySQL database server.  Internally it uses the @mysql-haskell@
+    package in order to access the database. See README.md for more.
+    .
+    This package supports only MySQL 5.1 and above.  However, it
+    has been tested only on MySQL 5.5.
+    Only the InnoDB storage engine is officially supported.
+    .
+    Known problems:
+    .
+    * This package does not support statements inside other
+      statements.
+extra-source-files: ChangeLog.md, README.md
+
+library
+    build-depends:   base                  >= 4.6      && < 5
+                   , transformers          >= 0.2.1
+                   , persistent            >= 2.6.1    && < 3
+                   , containers            >= 0.2
+                   , bytestring            >= 0.9
+                   , text                  >= 0.11.0.6
+                   , monad-control         >= 0.2
+                   , aeson                 >= 0.6.2
+                   , conduit               >= 0.5.3
+                   , resourcet             >= 0.4.10
+                   , monad-logger
+                   , resource-pool
+                   , mysql-haskell         >= 0.8.0.0 && < 1.0
+                   -- keep the following in sync with @mysql-haskell@ .cabal
+                   , io-streams            >= 1.2     && < 2.0
+                   , time                  >= 1.5.0
+                   , network               >= 2.3     && < 3.0
+                   , tls                   >= 1.3.5   && < 1.5
+    exposed-modules: Database.Persist.MySQL
+    other-modules:   Database.Persist.MySQLConnectInfoShowInstance
+    ghc-options:     -Wall
+
+executable persistent-mysql-haskell-example
+  hs-source-dirs:    example
+  main-is:           Main.hs
+  ghc-options:       -Wall -threaded -rtsopts -with-rtsopts=-N
+  build-depends:     base                  >= 4.6    && < 5
+                   , persistent            >= 2.6.1  && < 3
+                   , monad-logger
+                   , persistent-template
+                   , persistent-mysql-haskell
+                   , transformers          >= 0.2.1
+
+source-repository head
+  type:     git
+  location: git://github.com/naushadh/persistent.git
+  branch:   persistent-mysql-haskell
+  subdir:   persistent-mysql-haskell
diff --git a/test/golden-test-cases/persistent-mysql-haskell.nix.golden b/test/golden-test-cases/persistent-mysql-haskell.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/persistent-mysql-haskell.nix.golden
@@ -0,0 +1,26 @@
+{ mkDerivation, aeson, base, bytestring, conduit, containers
+, fetchurl, io-streams, monad-control, monad-logger, mysql-haskell
+, network, persistent, persistent-template, resource-pool
+, resourcet, text, time, tls, transformers
+}:
+mkDerivation {
+  pname = "persistent-mysql-haskell";
+  version = "0.3.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base bytestring conduit containers io-streams monad-control
+    monad-logger mysql-haskell network persistent resource-pool
+    resourcet text time tls transformers
+  ];
+  executableHaskellDepends = [
+    base monad-logger persistent persistent-template transformers
+  ];
+  homepage = "http://www.yesodweb.com/book/persistent";
+  description = "A pure haskell backend for the persistent library using MySQL database server";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/picosat.cabal b/test/golden-test-cases/picosat.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/picosat.cabal
@@ -0,0 +1,72 @@
+name:                picosat
+version:             0.1.4
+synopsis:            Bindings to the PicoSAT solver
+homepage:            https://github.com/sdiehl/haskell-picosat
+license:             MIT
+license-file:        LICENSE
+author:              Stephen Diehl
+maintainer:          stephen.m.diehl@gmail.com
+copyright:           2014-2017 Stephen Diehl
+Category:            Logic
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:         GHC == 7.6.1
+                   , GHC == 7.6.2
+                   , GHC == 7.6.3
+                   , GHC == 7.8.1
+                   , GHC == 7.8.2
+                   , GHC == 7.8.3
+                   , GHC == 7.8.4
+                   , GHC == 7.10.1
+                   , GHC == 7.10.2
+                   , GHC == 7.10.3
+                   , GHC == 8.0.1
+extra-source-files:  
+  cbits/picosat.h
+Bug-Reports:         https://github.com/sdiehl/haskell-picosat/issues
+
+Description:
+  `picosat` provides bindings for the fast PicoSAT solver library.
+Source-Repository head
+    Type: git
+    Location: git@github.com:sdiehl/haskell-picosat.git
+
+library
+  exposed-modules:     Picosat
+  other-extensions:
+    ForeignFunctionInterface
+  ghc-options:        -Wall -O2 -fwarn-tabs
+  cc-options:         -funroll-loops
+  if os(windows)
+    cc-options:         -DNGETRUSAGE
+  build-depends:      
+    base             >=4.6 && <5.0,
+    transformers     >=0.4 && <0.6,
+    containers       >=0.4 && <0.6
+  default-language:   Haskell2010
+  Hs-source-dirs:     src
+  Include-dirs:       cbits
+
+  C-sources:
+    cbits/picosat.c
+
+Test-Suite Sudoku
+  type: exitcode-stdio-1.0
+  Hs-source-dirs: test
+  main-is: Sudoku.hs
+  default-language:   Haskell2010
+  build-depends: base, picosat
+
+Test-Suite Scoped
+  type: exitcode-stdio-1.0
+  Hs-source-dirs: test
+  main-is: Scoped.hs
+  default-language:   Haskell2010
+  build-depends: base, picosat, transformers, containers
+
+Test-Suite rand-shared-improvement
+  type: exitcode-stdio-1.0
+  Hs-source-dirs: test
+  main-is: Rand.hs
+  default-language:   Haskell2010
+  build-depends: base, picosat, transformers, random, rdtsc
diff --git a/test/golden-test-cases/picosat.nix.golden b/test/golden-test-cases/picosat.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/picosat.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, containers, fetchurl, random, rdtsc
+, transformers
+}:
+mkDerivation {
+  pname = "picosat";
+  version = "0.1.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers transformers ];
+  testHaskellDepends = [ base containers random rdtsc transformers ];
+  homepage = "https://github.com/sdiehl/haskell-picosat";
+  description = "Bindings to the PicoSAT solver";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/pinch.cabal b/test/golden-test-cases/pinch.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pinch.cabal
@@ -0,0 +1,111 @@
+-- This file has been generated from package.yaml by hpack version 0.15.0.
+--
+-- see: https://github.com/sol/hpack
+
+name:           pinch
+version:        0.3.2.0
+cabal-version:  >= 1.10
+build-type:     Simple
+license:        BSD3
+license-file:   LICENSE
+maintainer:     mail@abhinavg.net
+homepage:       https://github.com/abhinav/pinch#readme
+bug-reports:    https://github.com/abhinav/pinch/issues
+synopsis:       An alternative implementation of Thrift for Haskell.
+description:    This library provides machinery for types to specify how they can be
+                serialized and deserialized into/from Thrift payloads. It makes no
+                assumptions on how these payloads are sent or received and performs no code
+                generation. Types may specify how to be serialized and deserialized by
+                defining instances of the @Pinchable@ typeclass by hand, or with
+                automatically derived instances by using generics. Check the documentation
+                in the "Pinch" module for more information.
+                .
+                /What is Thrift?/ Apache Thrift provides an interface description language,
+                a set of communication protocols, and a code generator and libraries for
+                various programming languages to interact with the generated code. Pinch
+                aims to provide an alternative implementation of Thrift for Haskell.
+category:       Development
+author:         Abhinav Gupta
+
+extra-source-files:
+    bench/pinch-bench/Bench.hs
+    bench/pinch-bench/pinch-bench.cabal
+    CHANGES.md
+    examples/keyvalue/Client.hs
+    examples/keyvalue/keyvalue.cabal
+    examples/keyvalue/keyvalue.thrift
+    examples/keyvalue/Server.hs
+    examples/keyvalue/Setup.hs
+    examples/keyvalue/Types.hs
+    README.md
+
+source-repository head
+    type: git
+    location: https://github.com/abhinav/pinch
+
+library
+    hs-source-dirs:
+        src
+    ghc-options: -Wall
+    build-depends:
+        base >= 4.7 && < 5,
+        bytestring >= 0.10 && < 0.11,
+        containers >= 0.5 && < 0.6,
+        text >= 1.2 && < 1.3,
+        unordered-containers >= 0.2 && < 0.3,
+        vector >= 0.10 && < 0.13,
+        array >= 0.5,
+        deepseq >= 1.3 && < 1.5,
+        ghc-prim,
+        hashable >= 1.2 && < 1.3
+    exposed-modules:
+        Pinch
+        Pinch.Internal.Builder
+        Pinch.Internal.FoldList
+        Pinch.Internal.Generic
+        Pinch.Internal.Message
+        Pinch.Internal.Parser
+        Pinch.Internal.Pinchable
+        Pinch.Internal.TType
+        Pinch.Internal.Value
+        Pinch.Protocol
+        Pinch.Protocol.Binary
+        Pinch.Protocol.Compact
+    other-modules:
+        Pinch.Internal.Bits
+        Pinch.Internal.Pinchable.Parser
+        Paths_pinch
+    default-language: Haskell2010
+
+test-suite pinch-spec
+    type: exitcode-stdio-1.0
+    main-is: Spec.hs
+    hs-source-dirs:
+        tests
+    ghc-options: -Wall
+    build-depends:
+        base >= 4.7 && < 5,
+        bytestring >= 0.10 && < 0.11,
+        containers >= 0.5 && < 0.6,
+        text >= 1.2 && < 1.3,
+        unordered-containers >= 0.2 && < 0.3,
+        vector >= 0.10 && < 0.13,
+        hspec >= 2.0,
+        hspec-discover >= 2.1,
+        pinch,
+        QuickCheck >= 2.5
+    other-modules:
+        Pinch.Arbitrary
+        Pinch.Expectations
+        Pinch.Internal.BuilderParserSpec
+        Pinch.Internal.BuilderSpec
+        Pinch.Internal.FoldListSpec
+        Pinch.Internal.GenericSpec
+        Pinch.Internal.ParserSpec
+        Pinch.Internal.PinchableSpec
+        Pinch.Internal.TTypeSpec
+        Pinch.Internal.Util
+        Pinch.Internal.ValueSpec
+        Pinch.Protocol.BinarySpec
+        Pinch.Protocol.CompactSpec
+    default-language: Haskell2010
diff --git a/test/golden-test-cases/pinch.nix.golden b/test/golden-test-cases/pinch.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pinch.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, array, base, bytestring, containers, deepseq
+, fetchurl, ghc-prim, hashable, hspec, hspec-discover, QuickCheck
+, text, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "pinch";
+  version = "0.3.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bytestring containers deepseq ghc-prim hashable text
+    unordered-containers vector
+  ];
+  testHaskellDepends = [
+    base bytestring containers hspec hspec-discover QuickCheck text
+    unordered-containers vector
+  ];
+  homepage = "https://github.com/abhinav/pinch#readme";
+  description = "An alternative implementation of Thrift for Haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/pipes-network.cabal b/test/golden-test-cases/pipes-network.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pipes-network.cabal
@@ -0,0 +1,51 @@
+name:               pipes-network
+version:            0.6.4.1
+license:            BSD3
+license-file:       LICENSE
+copyright:          Copyright (c) Renzo Carbonara 2012-2016, Paolo Capriotti 2012-2012.
+author:             Renzo Carbonara
+maintainer:         renzocarbonaraλgmail.com
+stability:          Experimental
+tested-with:        GHC == 8.0.1
+homepage:           https://github.com/k0001/pipes-network
+bug-reports:        https://github.com/k0001/pipes-network/issues
+category:           Pipes, Network
+build-type:         Simple
+synopsis:           Use network sockets together with the pipes library.
+cabal-version:      >=1.8
+extra-source-files: README.md PEOPLE changelog.md
+description:
+  Use network sockets together with the @pipes@ library.
+  .
+  This package is organized using the following namespaces:
+  .
+  * "Pipes.Network.TCP" exports pipes and utilities for using TCP connections in
+  a streaming fashion.
+  .
+  * "Pipes.Network.TCP.Safe" subsumes "Pipes.Network.TCP", exporting pipes and
+  functions that allow you to safely establish new TCP connections within a
+  pipeline using the @pipes-safe@ facilities. You only need to use this module
+  if you want to safely acquire and release operating system resources within a
+  pipeline.
+  .
+  See the @changelog@ file in the source distribution to learn about any
+  important changes between version.
+
+source-repository head
+    type: git
+    location: git://github.com/k0001/pipes-network.git
+
+library
+    hs-source-dirs: src
+    build-depends:
+        base           (==4.*),
+        bytestring     (>=0.9.2.1),
+        network,
+        network-simple (>=0.4.0.1 && <0.5),
+        pipes          (>=4.0 && <4.3),
+        pipes-safe     (>=2.1 && <2.3),
+        transformers   (>=0.2 && <0.6)
+    exposed-modules:
+        Pipes.Network.TCP
+        Pipes.Network.TCP.Safe
+    ghc-options: -Wall -O2
diff --git a/test/golden-test-cases/pipes-network.nix.golden b/test/golden-test-cases/pipes-network.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pipes-network.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, fetchurl, network, network-simple
+, pipes, pipes-safe, transformers
+}:
+mkDerivation {
+  pname = "pipes-network";
+  version = "0.6.4.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring network network-simple pipes pipes-safe
+    transformers
+  ];
+  homepage = "https://github.com/k0001/pipes-network";
+  description = "Use network sockets together with the pipes library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/pipes-safe.cabal b/test/golden-test-cases/pipes-safe.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pipes-safe.cabal
@@ -0,0 +1,52 @@
+Name: pipes-safe
+Version: 2.2.6
+Cabal-Version: >=1.8.0.2
+Build-Type: Simple
+License: BSD3
+License-File: LICENSE
+Extra-Source-Files: README.md changelog.md
+Copyright: 2013, 2014 Gabriel Gonzalez
+Author: Gabriel Gonzalez
+Maintainer: Gabriel439@gmail.com
+Tested-With: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1
+Bug-Reports: https://github.com/Gabriel439/Haskell-Pipes-Safe-Library/issues
+Synopsis: Safety for the pipes ecosystem
+Description:
+    This package adds resource management and exception handling to the @pipes@
+    ecosystem.
+    .
+    Notable features include:
+    .
+    * /Resource Safety/: Guarantee finalization using @finally@, @bracket@ and
+      more
+    .
+    * /Exception Safety/: Even against asynchronous exceptions!
+    .
+    * /Laziness/: Only acquire resources when you need them
+    .
+    * /Promptness/: Finalize resources early when you are done with them
+    .
+    * /Native Exception Handling/: Catch and resume from exceptions inside pipes
+    .
+    * /No Buy-in/: Mix resource-safe pipes with unmanaged pipes using @hoist@
+Category: Control, Pipes, Error Handling
+Source-Repository head
+    Type: git
+    Location: https://github.com/Gabriel439/Haskell-Pipes-Safe-Library
+
+Library
+    Build-Depends:
+        base              >= 4       && < 5  ,
+        containers        >= 0.3.0.0 && < 0.6,
+        exceptions        >= 0.6     && < 0.9,
+        mtl               >= 2.1     && < 2.3,
+        transformers      >= 0.2.0.0 && < 0.6,
+        transformers-base >= 0.4.4   && < 0.5,
+        monad-control     >= 1.0.0.4 && < 1.1,
+        primitive         >= 0.6.2.0 && < 0.7,
+        pipes             >= 4.3.0   && < 4.4
+    Exposed-Modules:
+        Pipes.Safe,
+        Pipes.Safe.Prelude
+    HS-Source-Dirs: src
+    GHC-Options: -O2 -Wall
diff --git a/test/golden-test-cases/pipes-safe.nix.golden b/test/golden-test-cases/pipes-safe.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pipes-safe.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, containers, exceptions, fetchurl
+, monad-control, mtl, pipes, primitive, transformers
+, transformers-base
+}:
+mkDerivation {
+  pname = "pipes-safe";
+  version = "2.2.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers exceptions monad-control mtl pipes primitive
+    transformers transformers-base
+  ];
+  description = "Safety for the pipes ecosystem";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/pointed.cabal b/test/golden-test-cases/pointed.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pointed.cabal
@@ -0,0 +1,98 @@
+name:          pointed
+category:      Data
+version:       5
+license:       BSD3
+cabal-version: >= 1.6
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     provisional
+homepage:      http://github.com/ekmett/pointed/
+bug-reports:   http://github.com/ekmett/pointed/issues
+copyright:     Copyright (C) 2008-2016 Edward A. Kmett
+synopsis:      Pointed and copointed data
+description:   Pointed and copointed data
+build-type:    Simple
+extra-source-files:
+  .travis.yml
+  README.markdown
+  CHANGELOG.markdown
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/pointed.git
+
+flag comonad
+  description: You can disable the use of the `comonad` package using `-f-transformers`.
+  default: True
+  manual: True
+flag containers
+  description: You can disable the use of the `containers` package using `-f-containers`.
+  default: True
+  manual: True
+flag kan-extensions
+  description: You can disable the use of the `kan-extensions` package using `-f-kan-extensions`.
+  default: True
+  manual: True
+flag semigroupoids
+  description: You can disable the use of the `semigroupoids` package using `-f-semigroupoids`.
+  default: True
+  manual: True
+flag semigroups
+  description: You can disable the use of the `semigroups` package using `-f-semigroups`.
+  default: True
+  manual: True
+flag stm
+  description: You can disable the use of the `stm` package using `-f-stm`.
+  default: True
+  manual: True
+flag tagged
+  description: You can disable the use of the `tagged` package using `-f-tagged`.
+  default: True
+  manual: True
+flag transformers
+  description: You can disable the use of the `transformers` package using `-f-transformers`.
+  default: True
+  manual: True
+flag unordered-containers
+  description: You can disable the use of the `unordered-containers` package using `-f-unordered-containers`.
+  default: True
+  manual: True
+
+library
+  build-depends: base >= 4 && < 5,
+                 data-default-class >= 0.0.1 && < 0.1
+
+  if flag(comonad)
+    build-depends: comonad >= 5 && < 6
+
+  if flag(containers)
+    build-depends: containers >= 0.4 && < 0.6
+
+  if flag(kan-extensions)
+    build-depends: kan-extensions >= 5 && < 6
+
+  if flag(semigroupoids)
+    build-depends: semigroupoids >= 4 && < 6
+
+  if flag(semigroups)
+    build-depends: semigroups >= 0.8.3.1 && < 1
+
+  if flag(stm)
+    build-depends: stm >= 2.1.2.1 && < 2.5
+
+  if flag(tagged)
+    build-depends: tagged >= 0.5 && < 1
+
+  if flag(transformers)
+    build-depends: transformers >= 0.2 && < 0.6, transformers-compat >= 0.3 && < 1
+
+  if flag(unordered-containers)
+    build-depends: hashable >= 1.1 && < 1.3, unordered-containers >= 0.2 && < 0.3
+
+  exposed-modules:
+    Data.Pointed
+    Data.Copointed
+
+  ghc-options: -Wall
+  hs-source-dirs: src
diff --git a/test/golden-test-cases/pointed.nix.golden b/test/golden-test-cases/pointed.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pointed.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, base, comonad, containers, data-default-class
+, fetchurl, hashable, kan-extensions, semigroupoids, semigroups
+, stm, tagged, transformers, transformers-compat
+, unordered-containers
+}:
+mkDerivation {
+  pname = "pointed";
+  version = "5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base comonad containers data-default-class hashable kan-extensions
+    semigroupoids semigroups stm tagged transformers
+    transformers-compat unordered-containers
+  ];
+  homepage = "http://github.com/ekmett/pointed/";
+  description = "Pointed and copointed data";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/poly-arity.cabal b/test/golden-test-cases/poly-arity.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/poly-arity.cabal
@@ -0,0 +1,23 @@
+Name:                   poly-arity
+Version:                0.1.0
+Author:                 Athan Clark <athan.clark@gmail.com>
+Maintainer:             Athan Clark <athan.clark@gmail.com>
+License:                BSD3
+License-File:           LICENSE
+Synopsis:               Tools for working with functions of undetermined arity
+-- Description:
+Cabal-Version:          >= 1.10
+Build-Type:             Simple
+Category:               Data, Functions
+
+Library
+  Default-Language:     Haskell2010
+  HS-Source-Dirs:       src
+  GHC-Options:          -Wall
+  Exposed-Modules:      Data.Function.Poly
+  Build-Depends:        base >= 4.6 && < 5
+                      , constraints
+
+Source-Repository head
+  Type:                 git
+  Location:             https://github.com/athanclark/poly-arity.git
diff --git a/test/golden-test-cases/poly-arity.nix.golden b/test/golden-test-cases/poly-arity.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/poly-arity.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, constraints, fetchurl }:
+mkDerivation {
+  pname = "poly-arity";
+  version = "0.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base constraints ];
+  description = "Tools for working with functions of undetermined arity";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/polynomials-bernstein.cabal b/test/golden-test-cases/polynomials-bernstein.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/polynomials-bernstein.cabal
@@ -0,0 +1,22 @@
+Name:		polynomials-bernstein
+Version: 	1.1.2
+Synopsis:	A solver for systems of polynomial equations in bernstein form
+Description: 	This library defines an optimized type for representing polynomials
+		in Bernstein form, as well as instances of numeric classes and other
+		manipulation functions, and a solver of systems of polynomial
+		equations in this form.
+Category:	Math
+Author:         Pierre-Etienne Meunier <pierreetienne.meunier@gmail.com>
+Maintainer:	Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>
+License:	GPL
+License-file:	LICENSE
+Build-Type:	Simple
+Cabal-Version:	>=1.6
+source-repository head
+        type: git
+        location: https://github.com/jyp/polynomials-bernstein
+Library
+        Build-Depends:	base<5,	vector>=0.11
+        Exposed-modules: Algebra.Polynomials.Bernstein, Algebra.Polynomials.Numerical
+        ghc-options: -O2 -Wall
+        c-sources: Algebra/Polynomials/cnumerical.c
diff --git a/test/golden-test-cases/polynomials-bernstein.nix.golden b/test/golden-test-cases/polynomials-bernstein.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/polynomials-bernstein.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchurl, vector }:
+mkDerivation {
+  pname = "polynomials-bernstein";
+  version = "1.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base vector ];
+  description = "A solver for systems of polynomial equations in bernstein form";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/postgresql-simple-url.cabal b/test/golden-test-cases/postgresql-simple-url.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/postgresql-simple-url.cabal
@@ -0,0 +1,43 @@
+name:                postgresql-simple-url
+version:             0.2.0.0
+synopsis:            Parse postgres:// url into ConnectInfo
+description:
+  The 'Database.PostgreSQL.Simple.URL' module in this package exports
+  two helper functions 'parseDatabaseUrl' and 'urlToConnectInfo'.
+homepage:            https://github.com/futurice/postgresql-simple-url
+license:             MIT
+license-file:        LICENSE
+author:              Oleg Grenrus
+maintainer:          Oleg Grenrus <oleg.grenrus@iki.fi>
+copyright:           Copyright © 2014 Futurice OY, Oleg Grenrus
+stability:           experimental
+category:            Game
+build-type:          Simple
+extra-source-files:  README.md, CHANGELOG.md
+cabal-version:       >=1.10
+
+source-repository head
+  type: git
+  location: https://github.com/futurice/postgresql-simple-url
+
+library
+  exposed-modules:     Database.PostgreSQL.Simple.URL
+  build-depends:       base               >=4.6 && <4.10,
+                       split              >=0.2 && <0.3,
+                       network-uri        >=2.6 && <2.7,
+                       postgresql-simple  >=0.4 && <0.6
+  hs-source-dirs:      src
+  ghc-options:         -Wall
+  default-language:    Haskell2010
+
+test-suite test
+  default-language:    Haskell2010
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      tests
+  main-is:             Tests.hs
+  ghc-options:         -Wall
+  build-depends:       base               >=4.6  && <4.10,
+                       tasty              >=0.10 && <0.12,
+                       tasty-quickcheck   >=0.8  && <0.9,
+                       postgresql-simple  >=0.4 && <0.6,
+                       postgresql-simple-url
diff --git a/test/golden-test-cases/postgresql-simple-url.nix.golden b/test/golden-test-cases/postgresql-simple-url.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/postgresql-simple-url.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, fetchurl, network-uri, postgresql-simple
+, split, tasty, tasty-quickcheck
+}:
+mkDerivation {
+  pname = "postgresql-simple-url";
+  version = "0.2.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base network-uri postgresql-simple split
+  ];
+  testHaskellDepends = [
+    base postgresql-simple tasty tasty-quickcheck
+  ];
+  homepage = "https://github.com/futurice/postgresql-simple-url";
+  description = "Parse postgres:// url into ConnectInfo";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/prelude-safeenum.cabal b/test/golden-test-cases/prelude-safeenum.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prelude-safeenum.cabal
@@ -0,0 +1,59 @@
+----------------------------------------------------------------
+-- wren gayle romano <wren@community.haskell.org>   ~ 2015.05.30
+----------------------------------------------------------------
+
+-- By and large Cabal >=1.2 is fine; but >= 1.6 gives tested-with:
+-- and source-repository:.
+Cabal-Version:  >= 1.6
+Build-Type:     Simple
+
+Name:           prelude-safeenum
+Version:        0.1.1.2
+Stability:      provisional
+Homepage:       http://code.haskell.org/~wren/
+Author:         wren gayle romano
+Maintainer:     wren@community.haskell.org
+Copyright:      Copyright (c) 2012--2015 wren gayle romano
+License:        BSD3
+License-File:   LICENSE
+
+Category:       Prelude
+Synopsis:
+    A redefinition of the Prelude's Enum class in order to render it safe.
+Description:
+    A redefinition of the Prelude's Enum class in order to render
+    it safe. That is, the Haskell Language Report defines pred,
+    succ, fromEnum, and toEnum to be partial functions when the
+    type is Bounded, but this is unacceptable. We define a new
+    type-class hierarchy for enumeration which is safe and also
+    generalizes to cover types which can only be enumerated in one
+    direction.
+
+Tested-With:
+    GHC ==6.12.1, GHC ==7.6.1, GHC ==7.8.0
+Extra-source-files:
+    AUTHORS, README, CHANGELOG
+Source-Repository head
+    Type:     darcs
+    Location: http://community.haskell.org/~wren/prelude-safeenum
+
+----------------------------------------------------------------
+Flag base4
+    Default:     True
+    Description: base-4.0 emits "Prelude deprecated" messages in
+                 order to get people to be explicit about which
+                 version of base they use.
+----------------------------------------------------------------
+Library
+    Hs-Source-Dirs:    src
+    Exposed-Modules:   Prelude.SafeEnum
+                     , Data.Number.CalkinWilf
+    
+    -- I think this is all that needs doing to get rid of the warnings?
+    if flag(base4)
+        Build-Depends: base >= 4 && < 5
+    else
+        Build-Depends: base < 4
+
+----------------------------------------------------------------
+----------------------------------------------------------- fin.
diff --git a/test/golden-test-cases/prelude-safeenum.nix.golden b/test/golden-test-cases/prelude-safeenum.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prelude-safeenum.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "prelude-safeenum";
+  version = "0.1.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "http://code.haskell.org/~wren/";
+  description = "A redefinition of the Prelude's Enum class in order to render it safe";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/presburger.cabal b/test/golden-test-cases/presburger.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/presburger.cabal
@@ -0,0 +1,32 @@
+Name:           presburger
+Version:        1.3.1
+License:        BSD3
+License-file:   LICENSE
+Author:         Iavor S. Diatchki
+Homepage:       http://github.com/yav/presburger
+Maintainer:     diatchki@galois.com
+Category:       Algorithms
+Synopsis:       A decision procedure for quantifier-free linear arithmetic.
+Description:    The decision procedure is based on the algorithm used in
+                CVC4, which is itself based on the Omega test.
+Build-type:     Simple
+Cabal-version:  >= 1.8
+
+library
+  Build-Depends:  base < 10, containers, pretty
+  hs-source-dirs: src
+  Exposed-modules:
+    Data.Integer.SAT
+
+  GHC-options:    -O2 -Wall
+
+source-repository head
+  type: git
+  location: git://github.com/yav/presburger.git
+
+Test-Suite pressburger-qc-tests
+  type: exitcode-stdio-1.0
+  hs-source-dirs: tests
+  main-is: qc.hs
+  build-depends: base, presburger == 1.3.1, QuickCheck
+
diff --git a/test/golden-test-cases/presburger.nix.golden b/test/golden-test-cases/presburger.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/presburger.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, containers, fetchurl, pretty, QuickCheck }:
+mkDerivation {
+  pname = "presburger";
+  version = "1.3.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers pretty ];
+  testHaskellDepends = [ base QuickCheck ];
+  homepage = "http://github.com/yav/presburger";
+  description = "A decision procedure for quantifier-free linear arithmetic";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/prettyclass.cabal b/test/golden-test-cases/prettyclass.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prettyclass.cabal
@@ -0,0 +1,15 @@
+Name:		prettyclass
+Version:	1.0.0.0
+License:	BSD3
+Author:		Lennart Augustsson
+Maintainer:	Lennart Augustsson
+Category:	Text
+Synopsis:	Pretty printing class similar to Show.
+Stability:      experimental
+Build-type:	Simple
+Description:	Pretty printing class similar to Show, based on the HughesPJ
+                pretty printing library.  Provides the pretty printing class
+                and instances for the Prelude types.
+Hs-Source-Dirs: src
+Build-Depends:	base, pretty
+Exposed-modules:	Text.PrettyPrint.HughesPJClass
diff --git a/test/golden-test-cases/prettyclass.nix.golden b/test/golden-test-cases/prettyclass.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prettyclass.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchurl, pretty }:
+mkDerivation {
+  pname = "prettyclass";
+  version = "1.0.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base pretty ];
+  description = "Pretty printing class similar to Show";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.cabal b/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.cabal
@@ -0,0 +1,36 @@
+name:                prettyprinter-compat-ansi-wl-pprint
+version:             1.0.1
+cabal-version:       >= 1.10
+category:            User Interfaces, Text
+synopsis:            Drop-in compatibility package to migrate from »ansi-wl-pprint« to »prettyprinter«.
+description:         See README.md
+license:             BSD2
+license-file:        LICENSE.md
+extra-source-files:  README.md
+                   , CONTRIBUTORS.md
+author:              David Luposchainsky
+maintainer:          David Luposchainsky <dluposchainsky at google>
+bug-reports:         http://github.com/quchen/prettyprinter/issues
+homepage:            http://github.com/quchen/prettyprinter
+build-type:          Simple
+tested-with:         GHC==7.8.4, GHC==7.10.2, GHC==7.10.3, GHC==8.0.1, GHC==8.0.2
+
+source-repository head
+  type: git
+  location: git://github.com/quchen/prettyprinter.git
+
+library
+    exposed-modules:  Text.PrettyPrint.ANSI.Leijen
+    ghc-options:      -Wall
+    hs-source-dirs:   src
+    default-language: Haskell2010
+    other-extensions:
+          CPP
+        , LambdaCase
+        , OverloadedStrings
+
+    build-depends:
+          base >= 4.7 && < 5
+        , text == 1.2.*
+        , prettyprinter < 1.2
+        , prettyprinter-ansi-terminal >= 1.1 && < 1.2
diff --git a/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.nix.golden b/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prettyprinter-compat-ansi-wl-pprint.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, prettyprinter
+, prettyprinter-ansi-terminal, text
+}:
+mkDerivation {
+  pname = "prettyprinter-compat-ansi-wl-pprint";
+  version = "1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base prettyprinter prettyprinter-ansi-terminal text
+  ];
+  homepage = "http://github.com/quchen/prettyprinter";
+  description = "Drop-in compatibility package to migrate from »ansi-wl-pprint« to »prettyprinter«";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/prettyprinter-compat-wl-pprint.cabal b/test/golden-test-cases/prettyprinter-compat-wl-pprint.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prettyprinter-compat-wl-pprint.cabal
@@ -0,0 +1,35 @@
+name:                prettyprinter-compat-wl-pprint
+version:             1.0.0.1
+cabal-version:       >= 1.10
+category:            User Interfaces, Text
+synopsis:            Prettyprinter compatibility module for previous users of the wl-pprint package.
+description:         See README.md
+license:             BSD2
+license-file:        LICENSE.md
+extra-source-files:  README.md
+                   , CONTRIBUTORS.md
+author:              Daan Leijen, Noam Lewis, David Luposchainsky
+maintainer:          David Luposchainsky <dluposchainsky at google>
+bug-reports:         http://github.com/quchen/prettyprinter/issues
+homepage:            http://github.com/quchen/prettyprinter
+build-type:          Simple
+tested-with:         GHC==7.8.4, GHC==7.10.2, GHC==7.10.3, GHC==8.0.1, GHC==8.0.2
+
+source-repository head
+  type: git
+  location: git://github.com/quchen/prettyprinter.git
+
+library
+    exposed-modules:  Text.PrettyPrint.Leijen
+    ghc-options:      -Wall
+    hs-source-dirs:   src
+    default-language: Haskell2010
+    other-extensions:
+          CPP
+        , LambdaCase
+        , OverloadedStrings
+
+    build-depends:
+          base < 127
+        , text
+        , prettyprinter < 1.1
diff --git a/test/golden-test-cases/prettyprinter-compat-wl-pprint.nix.golden b/test/golden-test-cases/prettyprinter-compat-wl-pprint.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/prettyprinter-compat-wl-pprint.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, prettyprinter, text }:
+mkDerivation {
+  pname = "prettyprinter-compat-wl-pprint";
+  version = "1.0.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base prettyprinter text ];
+  homepage = "http://github.com/quchen/prettyprinter";
+  description = "Prettyprinter compatibility module for previous users of the wl-pprint package";
+  license = stdenv.lib.licenses.bsd2;
+}
diff --git a/test/golden-test-cases/primitive.cabal b/test/golden-test-cases/primitive.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/primitive.cabal
@@ -0,0 +1,76 @@
+Name:           primitive
+Version:        0.6.2.0
+License:        BSD3
+License-File:   LICENSE
+
+Author:         Roman Leshchinskiy <rl@cse.unsw.edu.au>
+Maintainer:     libraries@haskell.org
+Copyright:      (c) Roman Leshchinskiy 2009-2012
+Homepage:       https://github.com/haskell/primitive
+Bug-Reports:    https://github.com/haskell/primitive/issues
+Category:       Data
+Synopsis:       Primitive memory-related operations
+Cabal-Version:  >= 1.10
+Build-Type:     Simple
+Description:    This package provides various primitive memory-related operations.
+
+Extra-Source-Files: changelog.md
+
+Tested-With:
+  GHC == 7.4.2,
+  GHC == 7.6.3,
+  GHC == 7.8.4,
+  GHC == 7.10.3,
+  GHC == 8.0.1
+
+Library
+  Default-Language: Haskell2010
+  Other-Extensions:
+        BangPatterns, CPP, DeriveDataTypeable,
+        MagicHash, TypeFamilies, UnboxedTuples, UnliftedFFITypes
+
+  Exposed-Modules:
+        Control.Monad.Primitive
+        Data.Primitive
+        Data.Primitive.MachDeps
+        Data.Primitive.Types
+        Data.Primitive.Array
+        Data.Primitive.ByteArray
+        Data.Primitive.SmallArray
+        Data.Primitive.UnliftedArray
+        Data.Primitive.Addr
+        Data.Primitive.MutVar
+
+  Other-Modules:
+        Data.Primitive.Internal.Compat
+        Data.Primitive.Internal.Operations
+
+  Build-Depends: base >= 4.5 && < 4.10
+               , ghc-prim >= 0.2 && < 0.6
+               , transformers >= 0.2 && < 0.6
+
+  Ghc-Options: -O2 -Wall
+
+  Include-Dirs: cbits
+  Install-Includes: primitive-memops.h
+  includes: primitive-memops.h
+  c-sources: cbits/primitive-memops.c
+  cc-options: -O3 -fomit-frame-pointer -Wall
+  if !os(solaris)
+      cc-options: -ftree-vectorize
+  if arch(i386) || arch(x86_64)
+      cc-options: -msse2
+
+test-suite test
+  Default-Language: Haskell2010
+  hs-source-dirs: test
+  main-is: main.hs
+  type: exitcode-stdio-1.0
+  build-depends: base
+               , ghc-prim
+               , primitive
+  ghc-options: -O2
+
+source-repository head
+  type:     git
+  location: https://github.com/haskell/primitive
diff --git a/test/golden-test-cases/primitive.nix.golden b/test/golden-test-cases/primitive.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/primitive.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, ghc-prim, transformers }:
+mkDerivation {
+  pname = "primitive";
+  version = "0.6.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ghc-prim transformers ];
+  testHaskellDepends = [ base ghc-prim ];
+  homepage = "https://github.com/haskell/primitive";
+  description = "Primitive memory-related operations";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/product-profunctors.cabal b/test/golden-test-cases/product-profunctors.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/product-profunctors.cabal
@@ -0,0 +1,53 @@
+name:          product-profunctors
+copyright:     Copyright (c) 2013, Karamaan Group LLC; 2014-2017 Purely Agile Limited
+version:       0.8.0.3
+synopsis:      product-profunctors
+description:   Product profunctors
+homepage:      https://github.com/tomjaguarpaw/product-profunctors
+license:       BSD3
+license-file:  LICENSE
+author:        Purely Agile
+maintainer:    Purely Agile
+category:      Control, Category
+build-type:    Simple
+cabal-version: >= 1.18
+tested-with:   GHC==8.0.1, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
+
+source-repository head
+  type:     git
+  location: https://github.com/tomjaguarpaw/product-profunctors
+
+library
+  default-language: Haskell2010
+  build-depends:   base >= 4.5 && < 5
+                 , profunctors >= 4.0 && < 5.3
+                 , contravariant >= 0.4 && < 1.5
+                 , tagged >= 0.0 && < 1
+                 , template-haskell
+  exposed-modules: Data.Profunctor.Product,
+                   Data.Profunctor.Product.Default,
+                   Data.Profunctor.Product.Flatten,
+                   Data.Profunctor.Product.Internal.TH,
+                   Data.Profunctor.Product.Newtype,
+                   Data.Profunctor.Product.TH,
+                   Data.Profunctor.Product.Tuples
+                   Data.Profunctor.Product.Tuples.TH
+  other-modules:   Data.Profunctor.Product.Class,
+                   Data.Profunctor.Product.Default.Class
+  ghc-options:     -Wall
+
+  if impl(ghc < 7.10)
+    build-depends: transformers >= 0.2 && < 0.6
+
+test-suite test
+  default-language: Haskell2010
+  type: exitcode-stdio-1.0
+  main-is: Main.hs
+  other-modules: CheckTypes,
+                 Definitions
+  hs-source-dirs: Test
+  build-depends:
+    base >= 4 && < 5,
+    profunctors,
+    product-profunctors
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/product-profunctors.nix.golden b/test/golden-test-cases/product-profunctors.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/product-profunctors.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, contravariant, fetchurl, profunctors, tagged
+, template-haskell
+}:
+mkDerivation {
+  pname = "product-profunctors";
+  version = "0.8.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base contravariant profunctors tagged template-haskell
+  ];
+  testHaskellDepends = [ base profunctors ];
+  homepage = "https://github.com/tomjaguarpaw/product-profunctors";
+  description = "product-profunctors";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/profiterole.cabal b/test/golden-test-cases/profiterole.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/profiterole.cabal
@@ -0,0 +1,44 @@
+cabal-version:      >= 1.18
+build-type:         Simple
+name:               profiterole
+version:            0.1
+license:            BSD3
+license-file:       LICENSE
+category:           Development
+author:             Neil Mitchell <ndmitchell@gmail.com>
+maintainer:         Neil Mitchell <ndmitchell@gmail.com>
+copyright:          Neil Mitchell 2017
+synopsis:           Restructure GHC profile reports
+description:
+    Given a GHC profile output, this tool generates alternative views on the data,
+    which are typically more concise and may reveal new insights.
+homepage:           https://github.com/ndmitchell/profiterole#readme
+bug-reports:        https://github.com/ndmitchell/profiterole/issues
+extra-doc-files:
+    README.md
+    CHANGES.txt
+tested-with:        GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
+
+source-repository head
+    type:     git
+    location: https://github.com/ndmitchell/profiterole.git
+
+executable profiterole
+    default-language:   Haskell2010
+    main-is:            Main.hs
+    hs-source-dirs:     src
+    build-depends:
+        base >= 4.6 && < 5,
+        containers,
+        directory,
+        extra,
+        filepath,
+        ghc-prof,
+        hashable,
+        scientific,
+        text
+    other-modules:
+        Config
+        Report
+        Type
+        Util
diff --git a/test/golden-test-cases/profiterole.nix.golden b/test/golden-test-cases/profiterole.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/profiterole.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, containers, directory, extra, fetchurl
+, filepath, ghc-prof, hashable, scientific, text
+}:
+mkDerivation {
+  pname = "profiterole";
+  version = "0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  executableHaskellDepends = [
+    base containers directory extra filepath ghc-prof hashable
+    scientific text
+  ];
+  homepage = "https://github.com/ndmitchell/profiterole#readme";
+  description = "Restructure GHC profile reports";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/projectroot.cabal b/test/golden-test-cases/projectroot.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/projectroot.cabal
@@ -0,0 +1,43 @@
+name:                projectroot
+version:             0.2.0.1
+synopsis:            Bindings to the projectroot C logic
+description: Simple way of finding the root of a project given an
+             entry-point. This module provides bindings to the
+             <https://github.com/yamadapc/projectroot projectroot> C library
+homepage:            https://github.com/yamadapc/haskell-projectroot
+license:             MIT
+license-file:        LICENSE
+author:              Pedro Tacla Yamada
+maintainer:          tacla.yamada@gmail.com
+copyright:           Copyright (c) 2015 Pedro Tacla Yamada
+category:            System
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with: GHC >= 7.6
+
+source-repository head
+  type:     git
+  location: git://github.com/yamadapc/haskell-projectroot
+
+library
+  exposed-modules:     System.Directory.ProjectRoot
+  build-depends:       base >=4 && <5
+                     , directory
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  c-sources:           ./projectroot/libprojectroot.c
+                     , ./projectroot/deps/commander/commander.c
+  install-includes:    ./projectroot/libprojectroot.h
+                     , ./projectroot/deps/commander/commander.h
+  cc-options:          -std=c99
+  include-dirs:        .
+
+test-suite hspec
+  main-is: Spec.hs
+  type: exitcode-stdio-1.0
+  build-depends: base
+               , hspec
+               , QuickCheck
+               , projectroot
+  hs-source-dirs: test
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/projectroot.nix.golden b/test/golden-test-cases/projectroot.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/projectroot.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, directory, fetchurl, hspec, QuickCheck }:
+mkDerivation {
+  pname = "projectroot";
+  version = "0.2.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base directory ];
+  testHaskellDepends = [ base hspec QuickCheck ];
+  homepage = "https://github.com/yamadapc/haskell-projectroot";
+  description = "Bindings to the projectroot C logic";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/proto-lens-optparse.cabal b/test/golden-test-cases/proto-lens-optparse.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/proto-lens-optparse.cabal
@@ -0,0 +1,26 @@
+name:                proto-lens-optparse
+version:             0.1.0.4
+synopsis:            Adapting proto-lens to optparse-applicative ReadMs.
+description:
+   A package adapting proto-lens to optparse-applicative ReadMs.
+   This gives an easy way to define options and arguments for
+   text-format protobuf types.
+
+homepage:            https://github.com/google/proto-lens
+license:             BSD3
+license-file:        LICENSE
+author:              Andrew Pritchard
+maintainer:          awpr+protolens@google.com
+copyright:           Google Inc.
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.8
+extra-source-files:  Changelog.md
+
+library
+  hs-source-dirs: src
+  exposed-modules:     Data.ProtoLens.Optparse
+  build-depends:  proto-lens >= 0.1 && < 0.3
+                , base >= 4.8 && < 4.11
+                , optparse-applicative >= 0.12 && < 0.15
+                , text == 1.2.*
diff --git a/test/golden-test-cases/proto-lens-optparse.nix.golden b/test/golden-test-cases/proto-lens-optparse.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/proto-lens-optparse.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, optparse-applicative, proto-lens
+, text
+}:
+mkDerivation {
+  pname = "proto-lens-optparse";
+  version = "0.1.0.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base optparse-applicative proto-lens text
+  ];
+  homepage = "https://github.com/google/proto-lens";
+  description = "Adapting proto-lens to optparse-applicative ReadMs";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/proto-lens.cabal b/test/golden-test-cases/proto-lens.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/proto-lens.cabal
@@ -0,0 +1,45 @@
+name:                proto-lens
+version:             0.2.2.0
+synopsis:            A lens-based implementation of protocol buffers in Haskell.
+description:
+  The proto-lens library provides to protocol buffers using modern
+  Haskell language and library patterns.  Specifically, it provides:
+  .
+  * Composable field accessors via lenses
+  .
+  * Simple field name resolution/overloading via type-level literals
+  .
+  * Type-safe reflection and encoding/decoding of messages via GADTs
+
+homepage:            https://github.com/google/proto-lens
+license:             BSD3
+license-file:        LICENSE
+author:              Judah Jacobson
+maintainer:          proto-lens@googlegroups.com
+copyright:           Google Inc.
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.8
+extra-source-files:  Changelog.md
+
+library
+  hs-source-dirs: src
+  exposed-modules:     Data.ProtoLens
+                       Data.ProtoLens.Encoding
+                       Data.ProtoLens.Message
+                       Data.ProtoLens.Message.Enum
+                       Data.ProtoLens.TextFormat
+  other-modules:       Data.ProtoLens.Encoding.Bytes
+                       Data.ProtoLens.Encoding.Wire
+                       Data.ProtoLens.TextFormat.Parser
+  build-depends:  attoparsec == 0.13.*
+                , base >= 4.8 && < 4.11
+                , bytestring == 0.10.*
+                , containers == 0.5.*
+                , data-default-class >= 0.0 && < 0.2
+                , lens-family == 1.2.*
+                , parsec == 3.1.*
+                , pretty == 1.1.*
+                , text == 1.2.*
+                , transformers >= 0.4 && < 0.6
+                , void == 0.7.*
diff --git a/test/golden-test-cases/proto-lens.nix.golden b/test/golden-test-cases/proto-lens.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/proto-lens.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, attoparsec, base, bytestring, containers
+, data-default-class, fetchurl, lens-family, parsec, pretty, text
+, transformers, void
+}:
+mkDerivation {
+  pname = "proto-lens";
+  version = "0.2.2.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base bytestring containers data-default-class
+    lens-family parsec pretty text transformers void
+  ];
+  homepage = "https://github.com/google/proto-lens";
+  description = "A lens-based implementation of protocol buffers in Haskell";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/psqueues.cabal b/test/golden-test-cases/psqueues.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/psqueues.cabal
@@ -0,0 +1,156 @@
+Name:          psqueues
+Version:       0.2.4.0
+License:       BSD3
+License-file:  LICENSE
+Maintainer:    Jasper Van der Jeugt <jaspervdj@gmail.com>
+Bug-reports:   https://github.com/jaspervdj/psqueues/issues
+Synopsis:      Pure priority search queues
+Category:      Data Structures
+Build-type:    Simple
+Cabal-version: >=1.8
+
+Description:
+    The psqueues package provides
+    <http://en.wikipedia.org/wiki/Priority_queue Priority Search Queues> in
+    three different flavors.
+    .
+    * @OrdPSQ k p v@, which uses the @Ord k@ instance to provide fast insertion,
+    deletion and lookup. This implementation is based on Ralf Hinze's
+    <http://citeseer.ist.psu.edu/hinze01simple.html A Simple Implementation Technique for Priority Search Queues>.
+    Hence, it is similar to the
+    <http://hackage.haskell.org/package/PSQueue PSQueue> library, although it is
+    considerably faster and provides a slightly different API.
+    .
+    * @IntPSQ p v@ is a far more efficient implementation. It fixes the key type
+    to @Int@ and uses a <http://en.wikipedia.org/wiki/Radix_tree radix tree>
+    (like @IntMap@) with an additional min-heap property.
+    .
+    * @HashPSQ k p v@ is a fairly straightforward extension of @IntPSQ@: it
+    simply uses the keys' hashes as indices in the @IntPSQ@. If there are any
+    hash collisions, it uses an @OrdPSQ@ to resolve those. The performance of
+    this implementation is comparable to that of @IntPSQ@, but it is more widely
+    applicable since the keys are not restricted to @Int@, but rather to any
+    @Hashable@ datatype.
+    .
+    Each of the three implementations provides the same API, so they can be used
+    interchangeably. The benchmarks show how they perform relative to one
+    another, and also compared to the other Priority Search Queue
+    implementations on Hackage:
+    <http://hackage.haskell.org/package/PSQueue PSQueue>
+    and
+    <http://hackage.haskell.org/package/fingertree-psqueue fingertree-psqueue>.
+    .
+    <<http://i.imgur.com/KmbDKR6.png>>
+    .
+    <<http://i.imgur.com/ClT181D.png>>
+    .
+    Typical applications of Priority Search Queues include:
+    .
+    * Caches, and more specifically LRU Caches;
+    .
+    * Schedulers;
+    .
+    * Pathfinding algorithms, such as Dijkstra's and A*.
+
+Extra-source-files:
+    CHANGELOG
+
+Source-repository head
+    type:     git
+    location: http://github.com/jaspervdj/psqueues.git
+
+Library
+    Ghc-options:    -O2 -Wall
+    Hs-source-dirs: src
+
+    Build-depends:
+          base     >= 4.2     && < 5
+        , deepseq  >= 1.2     && < 1.5
+        , hashable >= 1.1.2.3 && < 1.3
+
+    if impl(ghc>=6.10)
+        Build-depends: ghc-prim
+
+    Exposed-modules:
+        Data.HashPSQ
+        Data.IntPSQ
+        Data.OrdPSQ
+    Other-modules:
+        Data.BitUtil
+        Data.HashPSQ.Internal
+        Data.IntPSQ.Internal
+        Data.OrdPSQ.Internal
+
+Benchmark psqueues-benchmarks
+    Type:           exitcode-stdio-1.0
+    Hs-source-dirs: src benchmarks
+    Main-is:        Main.hs
+    Ghc-options:    -Wall
+
+    Other-modules:
+        BenchmarkTypes
+        Data.BitUtil
+        Data.FingerTree.PSQueue.Benchmark
+        Data.HashPSQ
+        Data.HashPSQ.Benchmark
+        Data.HashPSQ.Internal
+        Data.IntPSQ
+        Data.IntPSQ.Benchmark
+        Data.IntPSQ.Internal
+        Data.OrdPSQ
+        Data.OrdPSQ.Benchmark
+        Data.OrdPSQ.Internal
+        Data.PSQueue.Benchmark
+
+    Build-depends:
+          containers           >= 0.5
+        , unordered-containers >= 0.2.4
+        , criterion            >= 0.8
+        , mtl                  >= 2.1
+        , fingertree-psqueue   >= 0.3
+        , PSQueue              >= 1.1
+        , random               >= 1.0
+
+        , base
+        , deepseq
+        , ghc-prim
+        , hashable
+        , psqueues
+
+Test-suite psqueues-tests
+    Cpp-options:    -DTESTING -DSTRICT
+    Ghc-options:    -Wall
+    Hs-source-dirs: src tests
+    Main-is:        Main.hs
+    Type:           exitcode-stdio-1.0
+
+    Other-modules:
+        Data.BitUtil
+        Data.HashPSQ
+        Data.HashPSQ.Internal
+        Data.HashPSQ.Tests
+        Data.IntPSQ
+        Data.IntPSQ.Internal
+        Data.IntPSQ.Tests
+        Data.OrdPSQ
+        Data.OrdPSQ.Internal
+        Data.OrdPSQ.Tests
+        Data.PSQ.Class
+        Data.PSQ.Class.Gen
+        Data.PSQ.Class.Tests
+        Data.PSQ.Class.Util
+
+    Build-depends:
+          HUnit                      >= 1.2 && < 1.7
+        , QuickCheck                 >= 2.7 && < 2.11
+        , test-framework             >= 0.8 && < 0.9
+        , test-framework-hunit       >= 0.3 && < 0.4
+        , test-framework-quickcheck2 >= 0.3 && < 0.4
+
+        , base
+        , array
+        , deepseq
+        , ghc-prim
+        , hashable
+        , psqueues
+        , tagged
diff --git a/test/golden-test-cases/psqueues.nix.golden b/test/golden-test-cases/psqueues.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/psqueues.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, array, base, containers, criterion, deepseq
+, fetchurl, fingertree-psqueue, ghc-prim, hashable, HUnit, mtl
+, PSQueue, QuickCheck, random, tagged, test-framework
+, test-framework-hunit, test-framework-quickcheck2
+, unordered-containers
+}:
+mkDerivation {
+  pname = "psqueues";
+  version = "0.2.4.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base deepseq ghc-prim hashable ];
+  testHaskellDepends = [
+    array base deepseq ghc-prim hashable HUnit QuickCheck tagged
+    test-framework test-framework-hunit test-framework-quickcheck2
+  ];
+  benchmarkHaskellDepends = [
+    base containers criterion deepseq fingertree-psqueue ghc-prim
+    hashable mtl PSQueue random unordered-containers
+  ];
+  description = "Pure priority search queues";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/pusher-http-haskell.cabal b/test/golden-test-cases/pusher-http-haskell.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pusher-http-haskell.cabal
@@ -0,0 +1,92 @@
+name: pusher-http-haskell
+version: 1.5.1.0
+cabal-version: >=1.18
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: (c) Will Sewell, 2016
+maintainer: me@willsewell.com
+stability: experimental
+homepage: https://github.com/pusher-community/pusher-http-haskell
+bug-reports: https://github.com/pusher-community/pusher-http-haskell/issues
+synopsis: Haskell client library for the Pusher HTTP API
+description:
+    Functions that correspond to endpoints of the Pusher HTTP
+    API. Messages can be triggered, and information about the
+    channel can be queried. Additionally there are functions
+    for authenticating users of private and presence channels.
+category: Network
+author: Will Sewell
+tested-with: GHC >=7.10.2
+
+library
+
+    if impl(ghc >=8.0.0)
+        ghc-options: -Wcompat -Whi-shadowing -Wmissing-signatures
+    else
+        ghc-options: -fwarn-hi-shadowing -fwarn-missing-signatures -fwarn-tabs
+    exposed-modules:
+        Network.Pusher
+        Network.Pusher.Internal
+        Network.Pusher.Internal.Auth
+        Network.Pusher.Internal.HTTP
+        Network.Pusher.Protocol
+    build-depends:
+        aeson >=0.8 && <1.3,
+        base >=4.7 && <4.11,
+        bytestring ==0.10.*,
+        base16-bytestring ==0.1.*,
+        cryptonite >= 0.6 && <0.25,
+        hashable ==1.2.*,
+        http-client >=0.4 && <0.6,
+        http-types >=0.8 && <0.12,
+        memory >= 0.7 && <0.15,
+        text ==1.2.*,
+        time >=1.5 && <1.9,
+        transformers >=0.4 && <0.6,
+        unordered-containers ==0.2.*,
+        vector >=0.10.0.0 && <0.13
+    default-language: Haskell2010
+    default-extensions: OverloadedStrings
+    hs-source-dirs: src
+    other-modules:
+        Network.Pusher.Data
+        Network.Pusher.Error
+        Network.Pusher.Internal.Util
+        Network.Pusher.Webhook
+    ghc-options: -Wall
+
+test-suite tests
+
+    if impl(ghc >=8.0.0)
+        ghc-options: -Wcompat -Whi-shadowing -Wmissing-signatures
+    else
+        ghc-options: -fwarn-hi-shadowing -fwarn-missing-signatures -fwarn-tabs
+    type: exitcode-stdio-1.0
+    main-is: Main.hs
+    build-depends:
+        aeson -any,
+        base -any,
+        bytestring -any,
+        base16-bytestring -any,
+        cryptonite -any,
+        hspec -any,
+        http-client -any,
+        http-types -any,
+        pusher-http-haskell -any,
+        QuickCheck -any,
+        time -any,
+        text -any,
+        transformers -any,
+        unordered-containers -any,
+        vector -any,
+        scientific -any
+    default-language: Haskell2010
+    default-extensions: OverloadedStrings
+    hs-source-dirs: test
+    other-modules:
+        Auth
+        Protocol
+        Webhook
+        Push
+    ghc-options: -Wall
diff --git a/test/golden-test-cases/pusher-http-haskell.nix.golden b/test/golden-test-cases/pusher-http-haskell.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/pusher-http-haskell.nix.golden
@@ -0,0 +1,26 @@
+{ mkDerivation, aeson, base, base16-bytestring, bytestring
+, cryptonite, fetchurl, hashable, hspec, http-client, http-types
+, memory, QuickCheck, scientific, text, time, transformers
+, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "pusher-http-haskell";
+  version = "1.5.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base base16-bytestring bytestring cryptonite hashable
+    http-client http-types memory text time transformers
+    unordered-containers vector
+  ];
+  testHaskellDepends = [
+    aeson base base16-bytestring bytestring cryptonite hspec
+    http-client http-types QuickCheck scientific text time transformers
+    unordered-containers vector
+  ];
+  homepage = "https://github.com/pusher-community/pusher-http-haskell";
+  description = "Haskell client library for the Pusher HTTP API";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/quickcheck-arbitrary-adt.cabal b/test/golden-test-cases/quickcheck-arbitrary-adt.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/quickcheck-arbitrary-adt.cabal
@@ -0,0 +1,40 @@
+name:                quickcheck-arbitrary-adt
+version:             0.2.0.0
+synopsis:            Generic typeclasses for generating arbitrary ADTs
+description:         Improve arbitrary value generation for ADTs
+homepage:            https://github.com/plow-technologies/quickcheck-arbitrary-adt#readme
+license:             BSD3
+license-file:        LICENSE
+author:              James M.C. Haver II
+maintainer:          mchaver@gmail.com
+copyright:           2016 James M.C. Haver II
+category:            Testing
+build-type:          Simple
+cabal-version:       >=1.10
+stability:           Beta
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Test.QuickCheck.Arbitrary.ADT
+  build-depends:       base >= 4.7 && < 5
+                     , QuickCheck
+  default-language:    Haskell2010
+
+test-suite test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      tests
+  main-is:             Spec.hs
+  build-depends:       base
+                     , hspec
+                     , lens
+                     , template-haskell
+                     , QuickCheck
+                     , quickcheck-arbitrary-adt
+                     , transformers
+
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/plow-technologies/quickcheck-arbitrary-adt
diff --git a/test/golden-test-cases/quickcheck-arbitrary-adt.nix.golden b/test/golden-test-cases/quickcheck-arbitrary-adt.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/quickcheck-arbitrary-adt.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, fetchurl, hspec, lens, QuickCheck
+, template-haskell, transformers
+}:
+mkDerivation {
+  pname = "quickcheck-arbitrary-adt";
+  version = "0.2.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base QuickCheck ];
+  testHaskellDepends = [
+    base hspec lens QuickCheck template-haskell transformers
+  ];
+  homepage = "https://github.com/plow-technologies/quickcheck-arbitrary-adt#readme";
+  description = "Generic typeclasses for generating arbitrary ADTs";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/quickcheck-combinators.cabal b/test/golden-test-cases/quickcheck-combinators.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/quickcheck-combinators.cabal
@@ -0,0 +1,43 @@
+Name:                   quickcheck-combinators
+Version:                0.0.2
+Author:                 Athan Clark <athan.clark@gmail.com>
+Maintainer:             Athan Clark <athan.clark@gmail.com>
+License:                BSD3
+License-File:           LICENSE
+Synopsis:               Simple type-level combinators for augmenting
+                        QuickCheck instances.
+Category:               Testing
+Description:
+  Simply wrap the type you want to generate (assuming it satisfies
+  all the necessary constraints) to refine the terms generated:
+  .
+  @
+    &#123;-&#35; LANGUAGE DataKinds &#35;-&#125;
+    &#13; 
+    import Data.Set (Set)
+    import Test.QuickCheck
+    import Test.QuickCheck.Instances
+    import GHC.TypeLits
+    &#13;
+    instance Arbitrary LinearEquation where
+    &#32;&#32;arbitrary = do
+    &#32;&#32;&#32;&#32;vars <- arbitrary :: Gen (AtLeast 3 Set String)
+    &#32;&#32;&#32;&#32;&#45;&#45; ...
+  @
+  .
+Cabal-Version:          >= 1.10
+Build-Type:             Simple
+Extra-Source-Files:     ChangeLog.md
+                        
+Library
+  Default-Language:     Haskell2010
+  HS-Source-Dirs:       src
+  GHC-Options:          -Wall
+  Exposed-Modules:      Test.QuickCheck.Combinators
+  Build-Depends:        base >= 4.8 && < 5
+                      , QuickCheck
+                      , unfoldable-restricted >= 0.0.1
+
+Source-Repository head
+  Type:                 git
+  Location:             git@github.com:athanclark/quickcheck-combinators.git
diff --git a/test/golden-test-cases/quickcheck-combinators.nix.golden b/test/golden-test-cases/quickcheck-combinators.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/quickcheck-combinators.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, QuickCheck, unfoldable-restricted
+}:
+mkDerivation {
+  pname = "quickcheck-combinators";
+  version = "0.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base QuickCheck unfoldable-restricted ];
+  description = "Simple type-level combinators for augmenting QuickCheck instances";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/rank1dynamic.cabal b/test/golden-test-cases/rank1dynamic.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rank1dynamic.cabal
@@ -0,0 +1,43 @@
+Name:                rank1dynamic
+Version:             0.4.0
+Synopsis:            Like Data.Dynamic/Data.Typeable but with support for rank-1 polymorphic types
+Description:         "Data.Typeable" and "Data.Dynamic" only support monomorphic types.
+                     In this package we provide similar functionality but with
+                     support for rank-1 polymorphic types.
+Homepage:            http://haskell-distributed.github.com
+License:             BSD3
+License-File:        LICENSE
+Author:              Edsko de Vries
+Maintainer:          Facundo Domínguez <facundo.dominguez@tweag.io>
+Bug-Reports:         https://github.com/haskell-distributed/rank1dynamic/issues
+Copyright:           Well-Typed LLP, Tweag I/O Limited
+Category:            Data
+Build-Type:          Simple
+Cabal-Version:       >=1.8
+extra-source-files: ChangeLog
+
+Source-Repository head
+  Type:     git
+  Location: https://github.com/haskell-distributed/rank1dynamic
+
+Library
+  Exposed-Modules:     Data.Rank1Dynamic,
+                       Data.Rank1Typeable
+  Build-Depends:       base >= 4.6 && < 5,
+                       binary >= 0.5 && < 0.9
+  HS-Source-Dirs:      src
+  GHC-Options:         -Wall
+  Extensions:          EmptyDataDecls,
+                       DeriveDataTypeable,
+                       ViewPatterns
+
+Test-Suite TestRank1Dynamic
+  Type:              exitcode-stdio-1.0
+  Main-Is:           test.hs
+  Build-Depends:     base >= 4.6 && < 5,
+                     HUnit >= 1.2 && < 1.7,
+                     rank1dynamic,
+                     test-framework >= 0.6 && < 0.9,
+                     test-framework-hunit >= 0.2.0 && < 0.4
+  ghc-options:       -Wall
+  HS-Source-Dirs:    tests
diff --git a/test/golden-test-cases/rank1dynamic.nix.golden b/test/golden-test-cases/rank1dynamic.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rank1dynamic.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, binary, fetchurl, HUnit, test-framework
+, test-framework-hunit
+}:
+mkDerivation {
+  pname = "rank1dynamic";
+  version = "0.4.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base binary ];
+  testHaskellDepends = [
+    base HUnit test-framework test-framework-hunit
+  ];
+  homepage = "http://haskell-distributed.github.com";
+  description = "Like Data.Dynamic/Data.Typeable but with support for rank-1 polymorphic types";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/rasterific-svg.cabal b/test/golden-test-cases/rasterific-svg.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rasterific-svg.cabal
@@ -0,0 +1,74 @@
+-- Initial svg.cabal generated by cabal init.  For further documentation, 
+-- see http://haskell.org/cabal/users-guide/
+name:                rasterific-svg
+version:             0.3.3
+synopsis:            SVG renderer based on Rasterific.
+description:         SVG renderer that will let you render svg-tree parsed
+                     SVG file to a JuicyPixel image or Rasterific Drawing.
+license:             BSD3
+license-file:        LICENSE
+author:              Vincent Berthoux
+maintainer:          Vincent Berthoux
+-- copyright:           
+extra-source-files:  changelog.md, README.md
+category:            Graphics, Svg
+build-type:          Simple
+cabal-version:       >=1.10
+
+Source-Repository head
+    Type:      git
+    Location:  git://github.com/Twinside/rasterific-svg.git
+
+Source-Repository this
+    Type:      git
+    Location:  git://github.com/Twinside/rasterific-svg.git
+    Tag:       v0.3.3
+
+library
+  hs-source-dirs: src
+  default-language: Haskell2010
+  Ghc-options: -O3 -Wall
+  -- -auto-all
+  exposed-modules: Graphics.Rasterific.Svg
+  other-modules: Graphics.Rasterific.Svg.RenderContext
+               , Graphics.Rasterific.Svg.PathConverter
+               , Graphics.Rasterific.Svg.MeshConverter
+               , Graphics.Rasterific.Svg.RasterificRender
+               , Graphics.Rasterific.Svg.RasterificTextRendering
+               , Graphics.Rasterific.Svg.ArcConversion
+
+  build-depends: base >= 4.5 && < 5
+               , directory
+               , bytestring >= 0.10
+               , filepath
+               , binary >= 0.7
+               , scientific >= 0.3
+               , JuicyPixels >= 3.2 && < 3.3
+               , containers >= 0.5
+               , Rasterific >= 0.7 && < 0.8
+               , FontyFruity >= 0.5.2.1 && < 0.6
+               , svg-tree   >= 0.6.2 && < 0.7
+               , lens >= 4.5 && < 5
+               , linear >= 1.20
+               , vector >= 0.10
+               , text >= 1.2
+               , transformers >= 0.3 && < 0.6
+               , mtl >= 2.1 && < 2.3
+               , primitive
+
+Executable svgrender
+  default-language: Haskell2010
+  hs-source-dirs: exec-src
+  Main-Is: svgrender.hs
+  Ghc-options: -O3 -Wall
+  Build-Depends: base >= 4.6
+               , optparse-applicative >= 0.11 && < 0.15
+               , directory >= 1.0
+               , bytestring
+               , rasterific-svg
+               , Rasterific
+               , JuicyPixels
+               , filepath
+               , FontyFruity
+               , svg-tree
+
diff --git a/test/golden-test-cases/rasterific-svg.nix.golden b/test/golden-test-cases/rasterific-svg.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rasterific-svg.nix.golden
@@ -0,0 +1,26 @@
+{ mkDerivation, base, binary, bytestring, containers, directory
+, fetchurl, filepath, FontyFruity, JuicyPixels, lens, linear, mtl
+, optparse-applicative, primitive, Rasterific, scientific, svg-tree
+, text, transformers, vector
+}:
+mkDerivation {
+  pname = "rasterific-svg";
+  version = "0.3.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base binary bytestring containers directory filepath FontyFruity
+    JuicyPixels lens linear mtl primitive Rasterific scientific
+    svg-tree text transformers vector
+  ];
+  executableHaskellDepends = [
+    base bytestring directory filepath FontyFruity JuicyPixels
+    optparse-applicative Rasterific svg-tree
+  ];
+  description = "SVG renderer based on Rasterific";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/ratio-int.cabal b/test/golden-test-cases/ratio-int.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ratio-int.cabal
@@ -0,0 +1,25 @@
+name:              ratio-int
+version:           0.1.2
+license:           BSD3
+author:            Raphael Javaux <raphaeljavaux[at]gmail.com>
+maintainer:        Raphael Javaux <raphaeljavaux[at]gmail.com>
+synopsis:          Fast specialisation of Data.Ratio for Int.
+description:       Fast specialisation of Data.Ratio for Int.
+                   .
+                   Runs about ten times faster than Data.Int while being half
+                   as fast as floating-point types.
+category:          Math
+cabal-version:     >= 1.9.2
+build-type:        Simple
+homepage:          https://github.com/RaphaelJ/ratio-int
+
+library
+    exposed-modules:    Data.RatioInt
+
+    ghc-options:        -Wall -O2
+
+    build-depends: base                          >= 4           && < 5
+
+source-repository head
+  type:     git
+  location: https://github.com/RaphaelJ/ratio-int
diff --git a/test/golden-test-cases/ratio-int.nix.golden b/test/golden-test-cases/ratio-int.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ratio-int.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "ratio-int";
+  version = "0.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/RaphaelJ/ratio-int";
+  description = "Fast specialisation of Data.Ratio for Int.";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/rawstring-qm.cabal b/test/golden-test-cases/rawstring-qm.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rawstring-qm.cabal
@@ -0,0 +1,34 @@
+name:                rawstring-qm
+version:             0.2.3.0
+cabal-version:       >=1.10
+synopsis:            Simple raw string quotation and dictionary interpolation
+description:         Supply a couple of usefull QuasiQuotes so we can use functions to lookup values
+                     It has quasiquotes for Strings, Text and Builders
+homepage:            https://github.com/tolysz/rawstring-qm
+license:             BSD3
+license-file:        LICENSE
+author:              Marcin Tolysz
+maintainer:          tolysz@gmail.com
+copyright:           (c)2014-16 Marcin Tolysz
+category:            Text
+build-type:          Simple
+extra-source-files:  CHANGES
+
+Source-Repository head
+  type: git
+  location: https://github.com/tolysz/rawstring-qm.git
+
+library
+      exposed-modules: Data.String.QM
+                     , Data.Text.ToText
+                     , Data.Text.ToTextBuilder
+      
+  -- other-modules:       
+  -- other-extensions:    
+  build-depends:       base >4.6 && <5
+               ,       text
+               ,       template-haskell
+               ,       bytestring
+
+  hs-source-dirs:      src
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/rawstring-qm.nix.golden b/test/golden-test-cases/rawstring-qm.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rawstring-qm.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, bytestring, fetchurl, template-haskell, text
+}:
+mkDerivation {
+  pname = "rawstring-qm";
+  version = "0.2.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring template-haskell text ];
+  homepage = "https://github.com/tolysz/rawstring-qm";
+  description = "Simple raw string quotation and dictionary interpolation";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/reactive-banana.cabal b/test/golden-test-cases/reactive-banana.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/reactive-banana.cabal
@@ -0,0 +1,88 @@
+Name:                reactive-banana
+Version:             1.1.0.1
+Synopsis:            Library for functional reactive programming (FRP).
+Description:
+    Reactive-banana is a library for Functional Reactive Programming (FRP).
+    .
+    FRP offers an elegant and concise way to express interactive programs such as graphical user interfaces, animations, computer music or robot controllers. It promises to avoid the spaghetti code that is all too common in traditional approaches to GUI programming.
+    .
+    See the project homepage <http://wiki.haskell.org/Reactive-banana>
+    for more detailed documentation and examples.
+    .
+    /Stability forecast./
+    This is a stable library, though minor API changes are still likely.
+    It features an efficient, push-driven implementation
+    and has seen some optimization work.
+    .
+    /API guide./
+    Start with the "Reactive.Banana" module.
+
+Homepage:            http://wiki.haskell.org/Reactive-banana
+License:             BSD3
+License-file:        LICENSE
+Author:              Heinrich Apfelmus
+Maintainer:          Heinrich Apfelmus <apfelmus quantentunnel de>
+Category:            FRP
+Cabal-version:       >= 1.16
+Build-type:          Simple
+
+extra-source-files:     CHANGELOG.md,
+                        doc/examples/*.hs,
+                        src/Reactive/Banana/Test.hs,
+                        src/Reactive/Banana/Test/Plumbing.hs
+extra-doc-files:        doc/*.png
+
+Source-repository head
+    type:               git
+    location:           git://github.com/HeinrichApfelmus/reactive-banana.git
+    subdir:             reactive-banana/
+
+Library
+    default-language:   Haskell98
+    hs-source-dirs:     src
+
+    build-depends:      base >= 4.2 && < 5,
+                        containers >= 0.5 && < 0.6,
+                        transformers >= 0.2 && < 0.6,
+                        vault == 0.3.*,
+                        unordered-containers >= 0.2.1.0 && < 0.3,
+                        hashable >= 1.1 && < 1.3,
+                        pqueue >= 1.0 && < 1.4
+
+    exposed-modules:
+                        Control.Event.Handler,
+                        Reactive.Banana,
+                        Reactive.Banana.Combinators,
+                        Reactive.Banana.Frameworks,
+                        Reactive.Banana.Model,
+                        Reactive.Banana.Prim,
+                        Reactive.Banana.Prim.Cached
+    
+    other-modules:
+                        Control.Monad.Trans.ReaderWriterIO,
+                        Control.Monad.Trans.RWSIO,
+                        Reactive.Banana.Internal.Combinators,
+                        Reactive.Banana.Prim.Combinators,
+                        Reactive.Banana.Prim.Compile,
+                        Reactive.Banana.Prim.Dependencies,
+                        Reactive.Banana.Prim.Evaluation,
+                        Reactive.Banana.Prim.Graph,
+                        Reactive.Banana.Prim.IO,
+                        Reactive.Banana.Prim.OrderedBag,
+                        Reactive.Banana.Prim.Plumbing,
+                        Reactive.Banana.Prim.Test,
+                        Reactive.Banana.Prim.Types,
+                        Reactive.Banana.Prim.Util,
+                        Reactive.Banana.Types
+
+Test-Suite tests
+    default-language:   Haskell98
+    type:               exitcode-stdio-1.0
+    hs-source-dirs:     src
+    main-is:            Reactive/Banana/Test.hs
+    build-depends:      base >= 4.2 && < 5,
+                        HUnit >= 1.2 && < 2,
+                        test-framework >= 0.6 && < 0.9,
+                        test-framework-hunit >= 0.2 && < 0.4,
+                        reactive-banana, vault, containers, transformers,
+                        unordered-containers, hashable, psqueues, pqueue
diff --git a/test/golden-test-cases/reactive-banana.nix.golden b/test/golden-test-cases/reactive-banana.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/reactive-banana.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, containers, fetchurl, hashable, HUnit, pqueue
+, psqueues, test-framework, test-framework-hunit, transformers
+, unordered-containers, vault
+}:
+mkDerivation {
+  pname = "reactive-banana";
+  version = "1.1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers hashable pqueue transformers unordered-containers
+    vault
+  ];
+  testHaskellDepends = [
+    base containers hashable HUnit pqueue psqueues test-framework
+    test-framework-hunit transformers unordered-containers vault
+  ];
+  homepage = "http://wiki.haskell.org/Reactive-banana";
+  description = "Library for functional reactive programming (FRP)";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/readline.cabal b/test/golden-test-cases/readline.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/readline.cabal
@@ -0,0 +1,33 @@
+name:		readline
+version:	1.0.3.0
+license:	GPL
+license-file:	LICENSE
+maintainer:	libraries@haskell.org
+category:       Console
+synopsis:	An interface to the GNU readline library
+description:
+		More information on readline can be found at
+		http:\/\/www.gnu.org\/directory\/readline.html.
+extra-source-files:
+		aclocal.m4 configure.ac configure config.mk.in
+		readline.buildinfo.in include/HsReadlineConfig.h.in
+extra-tmp-files:
+		config.log config.status autom4te.cache config.mk
+		readline.buildinfo
+build-type: Configure
+cabal-version: >=1.2
+
+flag split-base
+
+library
+  exposed-modules:
+                System.Console.Readline
+                System.Console.SimpleLineEditor
+  if flag(split-base)
+    build-depends:	base >= 3 && < 5, process
+  else
+    build-depends:	base < 3
+  include-dirs: 	include
+  includes:	HsReadline.h
+  install-includes:	HsReadline.h HsReadlineConfig.h
+  c-sources:	HsReadline_cbits.c
diff --git a/test/golden-test-cases/readline.nix.golden b/test/golden-test-cases/readline.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/readline.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, ncurses, process, readline }:
+mkDerivation {
+  pname = "readline";
+  version = "1.0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base process ];
+  librarySystemDepends = [ ncurses readline ];
+  description = "An interface to the GNU readline library";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/rebase.cabal b/test/golden-test-cases/rebase.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rebase.cabal
@@ -0,0 +1,372 @@
+name:
+  rebase
+version:
+  1.1.1
+synopsis:
+  A more progressive alternative to the "base" package
+description:
+  This package is intended for those who are tired of keeping
+  long lists of dependencies to the same essential libraries in each package
+  as well as the endless imports of the same APIs all over again.
+  It also supports the modern tendencies in the language.
+  .
+  To solve those problems this package does the following:
+  .
+  * Reexport the original APIs under the \"Rebase\" namespace.
+  .
+  * Export all the possible non-conflicting symbols from the \"Rebase.Prelude\" module.
+  .
+  * Give priority to the modern practices in the conflicting cases.
+  .
+  The policy behind the package is only to reexport the non-ambiguous
+  and non-controversial APIs, which the community has obviously settled on.
+  The package is intended to rapidly evolve with the contribution from the community,
+  with the missing features being added with pull-requests.
+homepage:
+  https://github.com/nikita-volkov/rebase
+bug-reports:
+  https://github.com/nikita-volkov/rebase/issues
+author:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+maintainer:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+copyright:
+  (c) 2016, Nikita Volkov
+license:
+  MIT
+license-file:
+  LICENSE
+build-type:
+  Simple
+cabal-version:
+  >=1.10
+
+source-repository head
+  type:
+    git
+  location:
+    git://github.com/nikita-volkov/rebase.git
+
+library
+  hs-source-dirs:
+    library
+  default-extensions:
+    NoImplicitPrelude, NoMonomorphismRestriction
+  default-language:
+    Haskell2010
+  exposed-modules:
+    Rebase.Data.List1
+    Rebase.Control.Applicative
+    Rebase.Control.Arrow
+    Rebase.Control.Category
+    Rebase.Control.Concurrent
+    Rebase.Control.Concurrent.Chan
+    Rebase.Control.Concurrent.MVar
+    Rebase.Control.Concurrent.QSem
+    Rebase.Control.Concurrent.QSemN
+    Rebase.Control.Exception
+    Rebase.Control.Exception.Base
+    Rebase.Control.Monad
+    Rebase.Control.Monad.Fix
+    Rebase.Control.Monad.ST
+    Rebase.Control.Monad.ST.Lazy
+    Rebase.Control.Monad.ST.Lazy.Unsafe
+    Rebase.Control.Monad.ST.Strict
+    Rebase.Control.Monad.ST.Unsafe
+    Rebase.Control.Monad.Zip
+    Rebase.Data.Bits
+    Rebase.Data.Bool
+    Rebase.Data.Char
+    Rebase.Data.Coerce
+    Rebase.Data.Complex
+    Rebase.Data.Data
+    Rebase.Data.Dynamic
+    Rebase.Data.Either
+    Rebase.Data.Eq
+    Rebase.Data.Fixed
+    Rebase.Data.Foldable
+    Rebase.Data.Function
+    Rebase.Data.Functor
+    Rebase.Data.IORef
+    Rebase.Data.Int
+    Rebase.Data.Ix
+    Rebase.Data.List
+    Rebase.Data.Maybe
+    Rebase.Data.Monoid
+    Rebase.Data.Ord
+    Rebase.Data.Proxy
+    Rebase.Data.Ratio
+    Rebase.Data.STRef
+    Rebase.Data.STRef.Lazy
+    Rebase.Data.STRef.Strict
+    Rebase.Data.String
+    Rebase.Data.Traversable
+    Rebase.Data.Tuple
+    Rebase.Data.Type.Bool
+    Rebase.Data.Type.Coercion
+    Rebase.Data.Type.Equality
+    Rebase.Data.Typeable
+    Rebase.Data.Unique
+    Rebase.Data.Version
+    Rebase.Data.Word
+    Rebase.Debug.Trace
+    Rebase.Foreign
+    Rebase.Foreign.C
+    Rebase.Foreign.C.Error
+    Rebase.Foreign.C.String
+    Rebase.Foreign.C.Types
+    Rebase.Foreign.Concurrent
+    Rebase.Foreign.ForeignPtr
+    Rebase.Foreign.ForeignPtr.Unsafe
+    Rebase.Foreign.Marshal
+    Rebase.Foreign.Marshal.Alloc
+    Rebase.Foreign.Marshal.Array
+    Rebase.Foreign.Marshal.Error
+    Rebase.Foreign.Marshal.Pool
+    Rebase.Foreign.Marshal.Unsafe
+    Rebase.Foreign.Marshal.Utils
+    Rebase.Foreign.Ptr
+    Rebase.Foreign.StablePtr
+    Rebase.Foreign.Storable
+    Rebase.Numeric
+    Rebase.Prelude
+    Rebase.System.CPUTime
+    Rebase.System.Console.GetOpt
+    Rebase.System.Environment
+    Rebase.System.Exit
+    Rebase.System.IO
+    Rebase.System.IO.Error
+    Rebase.System.IO.Unsafe
+    Rebase.System.Info
+    Rebase.System.Mem
+    Rebase.System.Mem.StableName
+    Rebase.System.Mem.Weak
+    Rebase.System.Posix.Internals
+    Rebase.System.Posix.Types
+    Rebase.System.Timeout
+    Rebase.Text.ParserCombinators.ReadP
+    Rebase.Text.ParserCombinators.ReadPrec
+    Rebase.Text.Printf
+    Rebase.Text.Read
+    Rebase.Text.Read.Lex
+    Rebase.Text.Show
+    Rebase.Text.Show.Functions
+    Rebase.Unsafe.Coerce
+    Rebase.Data.Hashable
+    Rebase.Data.Vector
+    Rebase.Data.Vector.Fusion.Stream.Monadic
+    Rebase.Data.Vector.Fusion.Util
+    Rebase.Data.Vector.Generic
+    Rebase.Data.Vector.Generic.Base
+    Rebase.Data.Vector.Generic.Mutable
+    Rebase.Data.Vector.Generic.New
+    Rebase.Data.Vector.Internal.Check
+    Rebase.Data.Vector.Mutable
+    Rebase.Data.Vector.Primitive
+    Rebase.Data.Vector.Primitive.Mutable
+    Rebase.Data.Vector.Storable
+    Rebase.Data.Vector.Storable.Internal
+    Rebase.Data.Vector.Storable.Mutable
+    Rebase.Data.Vector.Unboxed
+    Rebase.Data.Vector.Unboxed.Base
+    Rebase.Data.Vector.Unboxed.Mutable
+    Rebase.Data.HashMap.Lazy
+    Rebase.Data.HashMap.Strict
+    Rebase.Data.HashSet
+    Rebase.Data.Graph
+    Rebase.Data.IntMap
+    Rebase.Data.IntMap.Lazy
+    Rebase.Data.IntMap.Strict
+    Rebase.Data.IntSet
+    Rebase.Data.Map
+    Rebase.Data.Map.Lazy
+    Rebase.Data.Map.Strict
+    Rebase.Data.Sequence
+    Rebase.Data.Set
+    Rebase.Data.Tree
+    Rebase.Data.ByteString
+    Rebase.Data.ByteString.Builder
+    Rebase.Data.ByteString.Builder.Extra
+    Rebase.Data.ByteString.Builder.Internal
+    Rebase.Data.ByteString.Builder.Prim
+    Rebase.Data.ByteString.Builder.Prim.Internal
+    Rebase.Data.ByteString.Char8
+    Rebase.Data.ByteString.Internal
+    Rebase.Data.ByteString.Lazy
+    Rebase.Data.ByteString.Lazy.Builder
+    Rebase.Data.ByteString.Lazy.Builder.ASCII
+    Rebase.Data.ByteString.Lazy.Builder.Extras
+    Rebase.Data.ByteString.Lazy.Char8
+    Rebase.Data.ByteString.Lazy.Internal
+    Rebase.Data.ByteString.Short
+    Rebase.Data.ByteString.Short.Internal
+    Rebase.Data.ByteString.Unsafe
+    Rebase.Data.Text
+    Rebase.Data.Text.Array
+    Rebase.Data.Text.Encoding
+    Rebase.Data.Text.Encoding.Error
+    Rebase.Data.Text.Foreign
+    Rebase.Data.Text.IO
+    Rebase.Data.Text.Internal
+    Rebase.Data.Text.Lazy
+    Rebase.Data.Text.Lazy.Builder
+    Rebase.Data.Text.Lazy.Builder.Int
+    Rebase.Data.Text.Lazy.Builder.RealFloat
+    Rebase.Data.Text.Lazy.Encoding
+    Rebase.Data.Text.Lazy.IO
+    Rebase.Data.Text.Lazy.Read
+    Rebase.Data.Text.Read
+    Rebase.Data.Text.Unsafe
+    Rebase.Data.Time
+    Rebase.Data.Time.Calendar
+    Rebase.Data.Time.Calendar.Easter
+    Rebase.Data.Time.Calendar.Julian
+    Rebase.Data.Time.Calendar.MonthDay
+    Rebase.Data.Time.Calendar.OrdinalDate
+    Rebase.Data.Time.Calendar.WeekDate
+    Rebase.Data.Time.Clock
+    Rebase.Data.Time.Clock.POSIX
+    Rebase.Data.Time.Clock.TAI
+    Rebase.Data.Time.Format
+    Rebase.Data.Time.LocalTime
+    Rebase.Data.Biapplicative
+    Rebase.Data.Bifoldable
+    Rebase.Data.Bifunctor
+    Rebase.Data.Bifunctor.Biff
+    Rebase.Data.Bifunctor.Clown
+    Rebase.Data.Bifunctor.Flip
+    Rebase.Data.Bifunctor.Join
+    Rebase.Data.Bifunctor.Joker
+    Rebase.Data.Bifunctor.Product
+    Rebase.Data.Bifunctor.Tannen
+    Rebase.Data.Bifunctor.Wrapped
+    Rebase.Data.Bitraversable
+    Rebase.Data.Functor.Contravariant
+    Rebase.Data.Functor.Contravariant.Compose
+    Rebase.Data.Functor.Contravariant.Divisible
+    Rebase.Data.Profunctor
+    Rebase.Data.Profunctor.Unsafe
+    Rebase.Data.Profunctor.Strong
+    Rebase.Data.Profunctor.Choice
+    Rebase.Data.Semigroup
+    Rebase.Data.List.NonEmpty
+    Rebase.Data.Bifunctor.Apply
+    Rebase.Data.Functor.Alt
+    Rebase.Data.Functor.Apply
+    Rebase.Data.Functor.Bind
+    Rebase.Data.Functor.Bind.Class
+    Rebase.Data.Functor.Bind.Trans
+    Rebase.Data.Functor.Extend
+    Rebase.Data.Functor.Plus
+    Rebase.Data.Groupoid
+    Rebase.Data.Isomorphism
+    Rebase.Data.Semigroup.Bifoldable
+    Rebase.Data.Semigroup.Bitraversable
+    Rebase.Data.Semigroup.Foldable
+    Rebase.Data.Semigroup.Foldable.Class
+    Rebase.Data.Semigroup.Traversable
+    Rebase.Data.Semigroup.Traversable.Class
+    Rebase.Data.Semigroupoid
+    Rebase.Data.Semigroupoid.Dual
+    Rebase.Data.Semigroupoid.Ob
+    Rebase.Data.Semigroupoid.Static
+    Rebase.Data.Traversable.Instances
+    Rebase.Control.Applicative.Backwards
+    Rebase.Control.Applicative.Lift
+    Rebase.Control.Monad.IO.Class
+    Rebase.Control.Monad.Signatures
+    Rebase.Control.Monad.Trans.Class
+    Rebase.Control.Monad.Trans.Cont
+    Rebase.Control.Monad.Trans.Except
+    Rebase.Control.Monad.Trans.Identity
+    Rebase.Control.Monad.Trans.List
+    Rebase.Control.Monad.Trans.Maybe
+    Rebase.Control.Monad.Trans.RWS
+    Rebase.Control.Monad.Trans.RWS.Lazy
+    Rebase.Control.Monad.Trans.RWS.Strict
+    Rebase.Control.Monad.Trans.Reader
+    Rebase.Control.Monad.Trans.State
+    Rebase.Control.Monad.Trans.State.Lazy
+    Rebase.Control.Monad.Trans.State.Strict
+    Rebase.Control.Monad.Trans.Writer
+    Rebase.Control.Monad.Trans.Writer.Lazy
+    Rebase.Control.Monad.Trans.Writer.Strict
+    Rebase.Data.Functor.Classes
+    Rebase.Data.Functor.Compose
+    Rebase.Data.Functor.Constant
+    Rebase.Data.Functor.Identity
+    Rebase.Data.Functor.Product
+    Rebase.Data.Functor.Reverse
+    Rebase.Data.Functor.Sum
+    Rebase.Control.Monad.Cont
+    Rebase.Control.Monad.Cont.Class
+    Rebase.Control.Monad.Error.Class
+    Rebase.Control.Monad.Identity
+    Rebase.Control.Monad.List
+    Rebase.Control.Monad.RWS
+    Rebase.Control.Monad.RWS.Class
+    Rebase.Control.Monad.RWS.Lazy
+    Rebase.Control.Monad.RWS.Strict
+    Rebase.Control.Monad.Reader
+    Rebase.Control.Monad.Reader.Class
+    Rebase.Control.Monad.State
+    Rebase.Control.Monad.State.Class
+    Rebase.Control.Monad.State.Lazy
+    Rebase.Control.Monad.State.Strict
+    Rebase.Control.Monad.Trans
+    Rebase.Control.Monad.Writer
+    Rebase.Control.Monad.Writer.Class
+    Rebase.Control.Monad.Writer.Lazy
+    Rebase.Control.Monad.Writer.Strict
+    Rebase.Control.Monad.Trans.Either
+    Rebase.Data.Either.Combinators
+    Rebase.Data.Either.Validation
+    Rebase.Control.Concurrent.STM
+    Rebase.Control.Concurrent.STM.TArray
+    Rebase.Control.Concurrent.STM.TBQueue
+    Rebase.Control.Concurrent.STM.TChan
+    Rebase.Control.Concurrent.STM.TMVar
+    Rebase.Control.Concurrent.STM.TQueue
+    Rebase.Control.Concurrent.STM.TSem
+    Rebase.Control.Concurrent.STM.TVar
+    Rebase.Control.Monad.STM
+    Rebase.Data.Scientific
+    Rebase.Data.ByteString.Builder.Scientific
+    Rebase.Data.Text.Lazy.Builder.Scientific
+    Rebase.Data.UUID
+    Rebase.Data.DList
+    Rebase.Data.Void
+    Rebase.Data.Void.Unsafe
+    Rebase.Contravariant.Extras
+    Rebase.Control.DeepSeq
+    Rebase.Control.Monad.Fail
+  build-depends:
+    -- concurrency:
+    stm >= 2 && < 3,
+    -- data:
+    hashable >= 1 && < 2,
+    vector >= 0.10 && < 0.13,
+    containers >= 0.5 && < 0.6,
+    unordered-containers >= 0.2 && < 0.3,
+    bytestring >= 0.10 && < 0.11,
+    text >= 1 && < 2,
+    scientific >= 0.3 && < 0.4,
+    uuid == 1.*,
+    dlist >= 0.7 && < 0.9,
+    void >= 0.7 && < 0.8,
+    time >= 1.5 && < 2,
+    -- control:
+    bifunctors >= 5 && < 6,
+    profunctors >= 5 && < 6,
+    contravariant >= 1 && < 2,
+    contravariant-extras >= 0.3.2 && < 0.4,
+    semigroups >= 0.16 && < 0.19,
+    semigroupoids >= 5 && < 6,
+    deepseq >= 1.4 && < 2,
+    transformers >= 0.4 && < 0.6,
+    mtl >= 2.2 && < 3.0,
+    either >= 4.4 && < 5,
+    fail >= 4.9 && < 5,
+    -- general:
+    base-prelude >= 0.1 && < 2,
+    base >= 4.7 && < 5
diff --git a/test/golden-test-cases/rebase.nix.golden b/test/golden-test-cases/rebase.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rebase.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, base, base-prelude, bifunctors, bytestring
+, containers, contravariant, contravariant-extras, deepseq, dlist
+, either, fail, fetchurl, hashable, mtl, profunctors, scientific
+, semigroupoids, semigroups, stm, text, time, transformers
+, unordered-containers, uuid, vector, void
+}:
+mkDerivation {
+  pname = "rebase";
+  version = "1.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base base-prelude bifunctors bytestring containers contravariant
+    contravariant-extras deepseq dlist either fail hashable mtl
+    profunctors scientific semigroupoids semigroups stm text time
+    transformers unordered-containers uuid vector void
+  ];
+  homepage = "https://github.com/nikita-volkov/rebase";
+  description = "A more progressive alternative to the \"base\" package";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/reform-blaze.cabal b/test/golden-test-cases/reform-blaze.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/reform-blaze.cabal
@@ -0,0 +1,29 @@
+Name:                reform-blaze
+Version:             0.2.4.3
+Synopsis:            Add support for using blaze-html with Reform
+Description:         Reform is a library for building and validating forms using applicative functors. This package add support for using reform with blaze-html.
+Homepage:            http://www.happstack.com/
+License:             BSD3
+License-file:        LICENSE
+Author:              Jeremy Shaw
+Maintainer:          jeremy@n-heptane.com
+Copyright:           2012 Jeremy Shaw, SeeReason Partners LLC
+Category:            Web
+Build-type:          Simple
+Cabal-version:       >=1.6
+tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3
+
+source-repository head
+    type:     git
+    location: https://github.com/Happstack/reform-blaze.git
+
+Library
+  Exposed-modules:   Text.Reform.Blaze.Common
+                     Text.Reform.Blaze.String
+                     Text.Reform.Blaze.Text
+
+  Build-depends:     base         >4.5 && <5,
+                     blaze-markup >= 0.5 && < 0.9,
+                     blaze-html   >= 0.5 && < 0.10,
+                     reform       == 0.2.*,
+                     text         >= 0.11 && < 1.3
diff --git a/test/golden-test-cases/reform-blaze.nix.golden b/test/golden-test-cases/reform-blaze.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/reform-blaze.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, blaze-html, blaze-markup, fetchurl, reform
+, text
+}:
+mkDerivation {
+  pname = "reform-blaze";
+  version = "0.2.4.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base blaze-html blaze-markup reform text
+  ];
+  homepage = "http://www.happstack.com/";
+  description = "Add support for using blaze-html with Reform";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/reform-hsp.cabal b/test/golden-test-cases/reform-hsp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/reform-hsp.cabal
@@ -0,0 +1,28 @@
+Name:                reform-hsp
+Version:             0.2.7.1
+Synopsis:            Add support for using HSP with Reform
+Description:         Reform is a library for building and validating forms using applicative functors. This package add support for using reform with HSP.
+Homepage:            http://www.happstack.com/
+License:             BSD3
+License-file:        LICENSE
+Author:              Jeremy Shaw
+Maintainer:          jeremy@n-heptane.com
+Copyright:           2012 Jeremy Shaw, Jasper Van der Jeugt, SeeReason Partners LLC
+Category:            Web
+Build-type:          Simple
+Cabal-version:       >=1.6
+tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
+
+source-repository head
+    type:     git
+    location: https://github.com/Happstack/reform-hsp.git
+
+Library
+  Exposed-modules:     Text.Reform.HSP.Common
+                       Text.Reform.HSP.String
+                       Text.Reform.HSP.Text
+  Build-depends:       base   > 4      && <5,
+                       hsp    >= 0.9   && < 0.11,
+                       hsx2hs >= 0.13  && < 0.15,
+                       reform >= 0.2.1 && < 0.3,
+                       text   >= 0.11  && < 1.3
diff --git a/test/golden-test-cases/reform-hsp.nix.golden b/test/golden-test-cases/reform-hsp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/reform-hsp.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, hsp, hsx2hs, reform, text }:
+mkDerivation {
+  pname = "reform-hsp";
+  version = "0.2.7.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base hsp hsx2hs reform text ];
+  homepage = "http://www.happstack.com/";
+  description = "Add support for using HSP with Reform";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/regex-compat.cabal b/test/golden-test-cases/regex-compat.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/regex-compat.cabal
@@ -0,0 +1,36 @@
+Name:                   regex-compat
+Version:                0.95.1
+Cabal-Version:          >=1.2
+License:                BSD3
+License-File:           LICENSE
+Copyright:              Copyright (c) 2006, Christopher Kuklewicz
+Author:                 Christopher Kuklewicz
+Maintainer:             TextRegexLazy@personal.mightyreason.com
+Stability:              Seems to work, passes a few tests
+Homepage:               http://sourceforge.net/projects/lazy-regex
+Package-URL:            http://darcs.haskell.org/packages/regex-unstable/regex-compat/
+Synopsis:               Replaces/Enhances Text.Regex
+Description:            One module layer over regex-posix to replace Text.Regex
+Category:               Text
+Tested-With:            GHC
+Build-Type:		Simple
+flag newBase
+  description: Choose base >= 4
+  default: True
+flag splitBase
+  description: Choose the new smaller, split-up base package.
+  default: True
+library
+  if flag(newBase)
+      Build-Depends:      base >= 4 && < 5, regex-base >= 0.93, regex-posix >= 0.95.1, array
+  else
+    if flag(splitBase)
+      Build-Depends:      base >= 3.0, regex-base >= 0.93, regex-posix >= 0.95.1, array
+    else
+      Build-Depends:      base < 3.0,  regex-base >= 0.93, regex-posix >= 0.95.1
+  Exposed-Modules:        Text.Regex
+  Buildable:              True
+  Extensions:             MultiParamTypeClasses, FunctionalDependencies
+  GHC-Options:            -Wall -O2
+  -- GHC-Options:            -Wall -Werror -O2
+  -- GHC-Options:            -Wall -ddump-minimal-imports
diff --git a/test/golden-test-cases/regex-compat.nix.golden b/test/golden-test-cases/regex-compat.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/regex-compat.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, array, base, fetchurl, regex-base, regex-posix }:
+mkDerivation {
+  pname = "regex-compat";
+  version = "0.95.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ array base regex-base regex-posix ];
+  homepage = "http://sourceforge.net/projects/lazy-regex";
+  description = "Replaces/Enhances Text.Regex";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/regex-pcre.cabal b/test/golden-test-cases/regex-pcre.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/regex-pcre.cabal
@@ -0,0 +1,68 @@
+Name:                   regex-pcre
+-- Keep the Version below in sync with ./Text/Regex/PCRE.hs value getVersion_Text_Regex_PCRE :: Version
+Version:                0.94.4
+Cabal-Version:          >=1.2.3
+License:                BSD3
+License-File:           LICENSE
+Copyright:              Copyright (c) 2006, Christopher Kuklewicz
+Author:                 Christopher Kuklewicz
+Maintainer:             TextRegexLazy@personal.mightyreason.com
+Stability:              Seems to work, passes a few tests
+Homepage:               http://hackage.haskell.org/package/regex-pcre
+Package-URL:            http://code.haskell.org/regex-pcre/
+Synopsis:               Replaces/Enhances Text.Regex
+Description:            The PCRE backend to accompany regex-base, see www.pcre.org
+Category:               Text
+Tested-With:            GHC
+Build-Type:             Simple
+flag newBase
+  description: Choose base >= 4
+  default: True
+flag splitBase
+  description: Choose the new smaller, split-up base package.
+  default: True
+library
+  if flag(newBase)
+    Build-Depends: base >= 4 && < 5, regex-base >= 0.93, array, containers, bytestring
+    -- Need the next symbol for using CPP to get Data.ByteString.Base|Unsafe in
+    --  ./Text/Regex/Posix/ByteString.hs and  ./Text/Regex/Posix/ByteString/Lazy.hs
+    CPP-Options: "-DSPLIT_BASE=1"
+    Extensions:    MultiParamTypeClasses, FunctionalDependencies, CPP, ForeignFunctionInterface, ScopedTypeVariables, GeneralizedNewtypeDeriving, FlexibleContexts, TypeSynonymInstances, FlexibleInstances
+  else
+    if flag(splitBase)
+      Build-Depends: base >= 3.0, regex-base >= 0.93, array, containers, bytestring
+      -- Need the next symbol for using CPP to get Data.ByteString.Base|Unsafe in
+      --  ./Text/Regex/Posix/ByteString.hs and  ./Text/Regex/Posix/ByteString/Lazy.hs
+      CPP-Options: "-DSPLIT_BASE=1"
+      Extensions:    MultiParamTypeClasses, FunctionalDependencies, CPP, ForeignFunctionInterface, ScopedTypeVariables, GeneralizedNewtypeDeriving, FlexibleContexts, TypeSynonymInstances, FlexibleInstances
+    else
+      Build-Depends: base < 3.0, regex-base >= 0.93
+      Extensions:    MultiParamTypeClasses, FunctionalDependencies, CPP
+  Exposed-Modules:        Text.Regex.PCRE
+                          Text.Regex.PCRE.Wrap
+                          Text.Regex.PCRE.String
+                          Text.Regex.PCRE.Sequence
+                          Text.Regex.PCRE.ByteString
+                          Text.Regex.PCRE.ByteString.Lazy
+  Buildable:              True
+  -- Other-Modules:
+  -- HS-Source-Dirs:         "."
+  -- The CPP is for using -DSPLIT_BASE=1 to get Data.ByteString.Base|Unsafe
+  -- And the CPP is for using -DHAVE_PCRE_H to get the local posix library
+  -- GHC-Options:            -Wall -Werror -O2
+  GHC-Options:            -Wall -O2
+  -- GHC-Options:            -Wall -ddump-minimal-imports
+  -- GHC-Prof-Options:
+  -- Hugs-Options:
+  -- NHC-Options:
+  -- C-Sources:
+  -- Includes:
+  -- LD-Options:
+  -- Frameworks:
+  -- The only reason to NOT define -DHAVE_PCRE_H is if you are on
+  -- a plotform without a regex library but want to compile this package
+  -- anyway.  The resulting regex-posix will exist, but throw errors.
+  CC-Options:             -DHAVE_PCRE_H
+  Extra-Libraries:        pcre
+  --Include-Dirs:           /opt/local/include
+  --Extra-Lib-Dirs:         /opt/local/lib
diff --git a/test/golden-test-cases/regex-pcre.nix.golden b/test/golden-test-cases/regex-pcre.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/regex-pcre.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, array, base, bytestring, containers, fetchurl, pcre
+, regex-base
+}:
+mkDerivation {
+  pname = "regex-pcre";
+  version = "0.94.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bytestring containers regex-base
+  ];
+  librarySystemDepends = [ pcre ];
+  homepage = "http://hackage.haskell.org/package/regex-pcre";
+  description = "Replaces/Enhances Text.Regex";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/relational-query.cabal b/test/golden-test-cases/relational-query.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/relational-query.cabal
@@ -0,0 +1,171 @@
+name:                relational-query
+version:             0.11.0.0
+synopsis:            Typeful, Modular, Relational, algebraic query engine
+description:         This package contiains typeful relation structure and
+                     relational-algebraic query building DSL which can
+                     translate into SQL query.
+                     Supported query features are below:
+                     - Type safe query building
+                     - Restriction, Join, Aggregation
+                     - Modularized relations
+                     - Typed placeholders
+homepage:            http://khibino.github.io/haskell-relational-record/
+license:             BSD3
+license-file:        LICENSE
+author:              Kei Hibino
+maintainer:          ex8k.hibino@gmail.com
+copyright:           Copyright (c) 2013-2017 Kei Hibino
+category:            Database
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:           GHC == 8.2.1
+                     , GHC == 8.0.1, GHC == 8.0.2
+                     , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
+                     , GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
+                     , GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3
+                     , GHC == 7.4.1, GHC == 7.4.2
+extra-source-files:  ChangeLog.md
+
+library
+  exposed-modules:
+                       Database.Relational.Arrow
+
+                       Database.Relational
+                       Database.Relational.Table
+                       Database.Relational.SimpleSql
+                       Database.Relational.Pure
+                       Database.Relational.Pi
+                       Database.Relational.Pi.Unsafe
+                       Database.Relational.Constraint
+                       Database.Relational.Context
+                       Database.Relational.Config
+                       Database.Relational.SqlSyntax
+                       Database.Relational.Record
+                       Database.Relational.ProjectableClass
+                       Database.Relational.Projectable
+                       Database.Relational.Projectable.Unsafe
+                       Database.Relational.Projectable.Instances
+                       Database.Relational.TupleInstances
+                       Database.Relational.Monad.BaseType
+                       Database.Relational.Monad.Class
+                       Database.Relational.Monad.Trans.Ordering
+                       Database.Relational.Monad.Trans.Aggregating
+                       Database.Relational.Monad.Trans.Restricting
+                       Database.Relational.Monad.Trans.Join
+                       Database.Relational.Monad.Trans.Config
+                       Database.Relational.Monad.Trans.Assigning
+                       Database.Relational.Monad.Type
+                       Database.Relational.Monad.Simple
+                       Database.Relational.Monad.Aggregate
+                       Database.Relational.Monad.Unique
+                       Database.Relational.Monad.Restrict
+                       Database.Relational.Monad.Assign
+                       Database.Relational.Monad.Register
+                       Database.Relational.Relation
+                       Database.Relational.Set
+                       Database.Relational.Sequence
+                       Database.Relational.Effect
+                       Database.Relational.Scalar
+                       Database.Relational.Type
+                       Database.Relational.Derives
+                       Database.Relational.TH
+
+                       Database.Relational.Compat
+                       Database.Relational.Query
+                       Database.Relational.Query.Arrow
+
+                       -- for GHC version equal or more than 8.0
+                       Database.Relational.OverloadedProjection
+                       Database.Relational.OverloadedInstances
+
+  other-modules:
+                       Database.Relational.Internal.ContextType
+                       Database.Relational.Internal.Config
+                       Database.Relational.Internal.String
+                       Database.Relational.Internal.UntypedTable
+                       Database.Relational.SqlSyntax.Types
+                       Database.Relational.SqlSyntax.Join
+                       Database.Relational.SqlSyntax.Aggregate
+                       Database.Relational.SqlSyntax.Query
+                       Database.Relational.SqlSyntax.Fold
+                       Database.Relational.SqlSyntax.Updates
+                       Database.Relational.Monad.Trans.JoinState
+                       Database.Relational.Monad.Trans.Qualify
+                       Database.Relational.InternalTH.Base
+
+                       -- for GHC version equal or more than 8.0
+                       Database.Relational.InternalTH.Overloaded
+
+  build-depends:         base <5
+                       , array
+                       , containers
+                       , transformers
+                       , time
+                       , time-locale-compat
+                       , bytestring
+                       , text
+                       , dlist
+                       , template-haskell
+                       , th-reify-compat
+                       , product-isomorphic >= 0.0.3
+                       , sql-words >=0.1.5
+                       , names-th
+                       , persistable-record >= 0.6
+  if impl(ghc == 7.4.*)
+    build-depends:        ghc-prim == 0.2.*
+
+  hs-source-dirs:      src
+  ghc-options:         -Wall -fsimpl-tick-factor=200
+
+  default-language:     Haskell2010
+
+test-suite sqls
+  build-depends:         base <5
+                       , quickcheck-simple
+                       , product-isomorphic
+                       , relational-query
+                       , containers
+                       , transformers
+  if impl(ghc == 7.4.*)
+    build-depends:        ghc-prim == 0.2.*
+
+  type:                exitcode-stdio-1.0
+  main-is:             sqlsEq.hs
+  other-modules:
+                       Lex
+                       Model
+
+  hs-source-dirs:      test
+  ghc-options:         -Wall -fsimpl-tick-factor=200
+
+  default-language:     Haskell2010
+
+test-suite sqlsArrow
+  build-depends:         base <5
+                       , quickcheck-simple
+                       , product-isomorphic
+                       , relational-query
+                       , containers
+                       , transformers
+  if impl(ghc == 7.4.*)
+    build-depends:        ghc-prim == 0.2.*
+
+  type:                exitcode-stdio-1.0
+  main-is:             sqlsEqArrow.hs
+  other-modules:
+                       Lex
+                       Model
+
+  hs-source-dirs:      test
+  ghc-options:         -Wall
+
+  default-language:     Haskell2010
+
+
+source-repository head
+  type:       git
+  location:   https://github.com/khibino/haskell-relational-record
+
+source-repository head
+  type:       mercurial
+  location:   https://bitbucket.org/khibino/haskell-relational-record
diff --git a/test/golden-test-cases/relational-query.nix.golden b/test/golden-test-cases/relational-query.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/relational-query.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, array, base, bytestring, containers, dlist
+, fetchurl, names-th, persistable-record, product-isomorphic
+, quickcheck-simple, sql-words, template-haskell, text
+, th-reify-compat, time, time-locale-compat, transformers
+}:
+mkDerivation {
+  pname = "relational-query";
+  version = "0.11.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bytestring containers dlist names-th persistable-record
+    product-isomorphic sql-words template-haskell text th-reify-compat
+    time time-locale-compat transformers
+  ];
+  testHaskellDepends = [
+    base containers product-isomorphic quickcheck-simple transformers
+  ];
+  homepage = "http://khibino.github.io/haskell-relational-record/";
+  description = "Typeful, Modular, Relational, algebraic query engine";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/relational-schemas.cabal b/test/golden-test-cases/relational-schemas.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/relational-schemas.cabal
@@ -0,0 +1,100 @@
+name:                relational-schemas
+version:             0.1.6.1
+synopsis:            RDBMSs' schema templates for relational-query
+description:         This package contains some RDBMSs' schema structure definitions.
+                     Supported RDBMS schemas are below:
+                     - IBM DB2
+                     - PostgreSQL
+                     - Microsoft SQLServer
+                     - SQLite3
+                     - Oracle
+                     - MySQL
+homepage:            http://khibino.github.io/haskell-relational-record/
+license:             BSD3
+license-file:        LICENSE
+author:              Kei Hibino, Shohei Murayama, Shohei Yasutake, Sho KURODA
+maintainer:          ex8k.hibino@gmail.com, shohei.murayama@gmail.com, amutake.s@gmail.com, krdlab@gmail.com
+copyright:           Copyright (c) 2013-2017 Kei Hibino, Shohei Murayama, Shohei Yasutake, Sho KURODA
+category:            Database
+build-type:          Simple
+cabal-version:       >=1.10
+tested-with:           GHC == 8.2.1
+                     , GHC == 8.0.1, GHC == 8.0.2
+                     , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
+                     , GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
+                     , GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3
+                     , GHC == 7.4.1, GHC == 7.4.2
+extra-source-files:  ChangeLog.md
+
+library
+  exposed-modules:
+                       Database.Relational.Schema.DB2Syscat.Columns
+                       Database.Relational.Schema.IBMDB2
+
+                       Database.Relational.Schema.PgCatalog.PgAttribute
+                       Database.Relational.Schema.PgCatalog.PgType
+                       Database.Relational.Schema.PostgreSQL
+
+                       Database.Relational.Schema.SQLServerSyscat.Columns
+                       Database.Relational.Schema.SQLServerSyscat.Types
+                       Database.Relational.Schema.SQLServer
+
+                       Database.Relational.Schema.SQLite3Syscat.IndexInfo
+                       Database.Relational.Schema.SQLite3Syscat.IndexList
+                       Database.Relational.Schema.SQLite3Syscat.TableInfo
+                       Database.Relational.Schema.SQLite3
+
+                       Database.Relational.Schema.OracleDataDictionary.TabColumns
+                       Database.Relational.Schema.Oracle
+
+                       Database.Relational.Schema.MySQLInfo.Columns
+                       Database.Relational.Schema.MySQL
+
+                       Database.Relational.Schema.DB2Syscat.Config
+                       Database.Relational.Schema.PgCatalog.Config
+                       Database.Relational.Schema.SQLServerSyscat.Config
+                       Database.Relational.Schema.SQLite3Syscat.Config
+                       Database.Relational.Schema.OracleDataDictionary.Config
+                       Database.Relational.Schema.MySQLInfo.Config
+
+  other-modules:
+                       Database.Relational.Schema.DB2Syscat.Tabconst
+                       Database.Relational.Schema.DB2Syscat.Keycoluse
+
+                       Database.Relational.Schema.PgCatalog.PgConstraint
+                       Database.Relational.Schema.PgCatalog.PgNamespace
+                       Database.Relational.Schema.PgCatalog.PgClass
+
+                       Database.Relational.Schema.SQLServerSyscat.IndexColumns
+                       Database.Relational.Schema.SQLServerSyscat.Indexes
+
+                       Database.Relational.Schema.OracleDataDictionary.ConsColumns
+                       Database.Relational.Schema.OracleDataDictionary.Constraints
+
+                       Database.Relational.Schema.MySQLInfo.KeyColumnUsage
+                       Database.Relational.Schema.MySQLInfo.TableConstraints
+
+  build-depends:         base <5
+                       , template-haskell
+                       , containers
+                       , time
+                       , bytestring
+
+                       , relational-query >= 0.11
+
+  if impl(ghc == 7.4.*)
+    build-depends:        ghc-prim == 0.2.*
+
+  hs-source-dirs:      src
+  ghc-options:         -Wall
+
+  default-language:     Haskell2010
+
+
+source-repository head
+  type:       git
+  location:   https://github.com/khibino/haskell-relational-record
+
+source-repository head
+  type:       mercurial
+  location:   https://bitbucket.org/khibino/haskell-relational-record
diff --git a/test/golden-test-cases/relational-schemas.nix.golden b/test/golden-test-cases/relational-schemas.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/relational-schemas.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, bytestring, containers, fetchurl
+, relational-query, template-haskell, time
+}:
+mkDerivation {
+  pname = "relational-schemas";
+  version = "0.1.6.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring containers relational-query template-haskell time
+  ];
+  homepage = "http://khibino.github.io/haskell-relational-record/";
+  description = "RDBMSs' schema templates for relational-query";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/repa-io.cabal b/test/golden-test-cases/repa-io.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/repa-io.cabal
@@ -0,0 +1,40 @@
+Name:                repa-io
+Version:             3.4.1.1
+License:             BSD3
+License-file:        LICENSE
+Author:              The DPH Team
+Maintainer:          Ben Lippmeier <benl@ouroborus.net>
+Build-Type:          Simple
+Cabal-Version:       >=1.6
+Stability:           experimental
+Category:            Data Structures
+Homepage:            http://repa.ouroborus.net
+Bug-reports:         http://groups.google.com/d/forum/haskell-repa
+Description:
+        Read and write Repa arrays in various formats.
+
+Synopsis:
+        Read and write Repa arrays in various formats.
+
+Library
+  Build-Depends:
+        base                 >= 4.8 && < 4.10
+      , binary               >= 0.7 && < 0.9
+      , bmp                  == 1.2.*
+      , bytestring           == 0.10.*
+      , old-time             == 1.1.*
+      , repa                 == 3.4.*
+      , vector               == 0.11.*
+
+  ghc-options:
+        -O2 -Wall -fno-warn-missing-signatures
+
+  Exposed-modules:
+        Data.Array.Repa.IO.Binary
+        Data.Array.Repa.IO.BMP
+        Data.Array.Repa.IO.Matrix
+        Data.Array.Repa.IO.Timing
+        Data.Array.Repa.IO.Vector
+
+  Other-modules:
+        Data.Array.Repa.IO.Internals.Text
diff --git a/test/golden-test-cases/repa-io.nix.golden b/test/golden-test-cases/repa-io.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/repa-io.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, binary, bmp, bytestring, fetchurl, old-time
+, repa, vector
+}:
+mkDerivation {
+  pname = "repa-io";
+  version = "3.4.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base binary bmp bytestring old-time repa vector
+  ];
+  homepage = "http://repa.ouroborus.net";
+  description = "Read and write Repa arrays in various formats";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/repa.cabal b/test/golden-test-cases/repa.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/repa.cabal
@@ -0,0 +1,98 @@
+Name:                repa
+Version:             3.4.1.3
+License:             BSD3
+License-file:        LICENSE
+Author:              The DPH Team
+Maintainer:          Ben Lippmeier <benl@ouroborus.net>
+Build-Type:          Simple
+Cabal-Version:       >=1.6
+Stability:           experimental
+Category:            Data Structures
+Homepage:            http://repa.ouroborus.net
+Bug-reports:         http://groups.google.com/d/forum/haskell-repa
+Description:
+        Repa provides high performance, regular, multi-dimensional, shape polymorphic
+        parallel arrays. All numeric data is stored unboxed. Functions written with
+        the Repa combinators are automatically parallel provided you supply
+        +RTS -Nwhatever on the command line when running the program.
+
+Synopsis:
+        High performance, regular, shape polymorphic parallel arrays.
+
+Library
+  Build-Depends:
+        base                 >= 4.8 && < 4.11
+      , template-haskell
+      , ghc-prim
+      , vector               >= 0.11 && < 0.13
+      , bytestring           == 0.10.*
+      , QuickCheck           >= 2.8 && < 2.11
+
+  ghc-options:
+        -Wall -fno-warn-missing-signatures
+        -Odph
+        -funbox-strict-fields
+
+  if impl(ghc >= 8.0)
+    ghc-options: -fno-cpr-anal
+  else
+    ghc-options: -fcpr-off
+
+  extensions:
+        NoMonomorphismRestriction
+        ExplicitForAll
+        EmptyDataDecls
+        BangPatterns
+        TypeFamilies
+        MultiParamTypeClasses
+        FlexibleInstances
+        FlexibleContexts
+        StandaloneDeriving
+        ScopedTypeVariables
+        PatternGuards
+        ExistentialQuantification
+
+  Exposed-modules:
+        Data.Array.Repa.Eval.Gang
+        Data.Array.Repa.Operators.IndexSpace
+        Data.Array.Repa.Operators.Interleave
+        Data.Array.Repa.Operators.Mapping
+        Data.Array.Repa.Operators.Reduction
+        Data.Array.Repa.Operators.Selection
+        Data.Array.Repa.Operators.Traversal
+        Data.Array.Repa.Repr.ByteString
+        Data.Array.Repa.Repr.Cursored
+        Data.Array.Repa.Repr.Delayed
+        Data.Array.Repa.Repr.ForeignPtr
+        Data.Array.Repa.Repr.HintSmall
+        Data.Array.Repa.Repr.HintInterleave
+        Data.Array.Repa.Repr.Partitioned
+        Data.Array.Repa.Repr.Unboxed
+        Data.Array.Repa.Repr.Undefined
+        Data.Array.Repa.Repr.Vector
+        Data.Array.Repa.Specialised.Dim2
+        Data.Array.Repa.Stencil.Dim2
+        Data.Array.Repa.Arbitrary
+        Data.Array.Repa.Eval
+        Data.Array.Repa.Index
+        Data.Array.Repa.Shape
+        Data.Array.Repa.Slice
+        Data.Array.Repa.Stencil
+        Data.Array.Repa.Unsafe
+        Data.Array.Repa
+
+  Other-modules:
+        Data.Array.Repa.Eval.Chunked
+        Data.Array.Repa.Eval.Cursored
+        Data.Array.Repa.Eval.Interleaved
+        Data.Array.Repa.Eval.Elt
+        Data.Array.Repa.Eval.Target
+        Data.Array.Repa.Eval.Load
+        Data.Array.Repa.Eval.Reduction
+        Data.Array.Repa.Eval.Selection
+        Data.Array.Repa.Stencil.Base
+        Data.Array.Repa.Stencil.Template
+        Data.Array.Repa.Stencil.Partition
+        Data.Array.Repa.Base
+
+-- vim: nospell
diff --git a/test/golden-test-cases/repa.nix.golden b/test/golden-test-cases/repa.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/repa.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, bytestring, fetchurl, ghc-prim, QuickCheck
+, template-haskell, vector
+}:
+mkDerivation {
+  pname = "repa";
+  version = "3.4.1.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring ghc-prim QuickCheck template-haskell vector
+  ];
+  homepage = "http://repa.ouroborus.net";
+  description = "High performance, regular, shape polymorphic parallel arrays";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/rosezipper.cabal b/test/golden-test-cases/rosezipper.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rosezipper.cabal
@@ -0,0 +1,16 @@
+Name:           rosezipper
+Version:        0.2
+License:        BSD3
+License-file:   LICENSE
+Author:         Krasimir Angelov, Iavor S. Diatchki
+Maintainer:     Iavor S. Diatchki <iavor.diatchki@gmail.com>
+Category:       Data Structures
+Synopsis:       Generic zipper implementation for Data.Tree
+Description:    A Haskell datastructure for working with locations in
+                trees or forests.
+Build-Depends:  base < 5, containers
+Build-type:     Simple
+Extra-source-files: LICENSE
+Exposed-modules: Data.Tree.Zipper
+GHC-options:    -O2 -Wall
+
diff --git a/test/golden-test-cases/rosezipper.nix.golden b/test/golden-test-cases/rosezipper.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rosezipper.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, containers, fetchurl }:
+mkDerivation {
+  pname = "rosezipper";
+  version = "0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers ];
+  description = "Generic zipper implementation for Data.Tree";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/rvar.cabal b/test/golden-test-cases/rvar.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rvar.cabal
@@ -0,0 +1,59 @@
+name:                   rvar
+version:                0.2.0.3
+stability:              stable
+
+cabal-version:          >= 1.6
+build-type:             Simple
+
+author:                 James Cook <mokus@deepbondi.net>
+maintainer:             James Cook <mokus@deepbondi.net>
+license:                PublicDomain
+homepage:               https://github.com/mokus0/random-fu
+
+category:               Math
+synopsis:               Random Variables
+description:            Random number generation based on modeling random 
+                        variables by an abstract type ('RVar') which can be
+                        composed and manipulated monadically and sampled in
+                        either monadic or \"pure\" styles.
+                        .
+                        The primary purpose of this library is to support 
+                        defining and sampling a wide variety of high quality
+                        random variables.  Quality is prioritized over speed,
+                        but performance is an important goal too.
+                        .
+                        In my testing, I have found it capable of speed 
+                        comparable to other Haskell libraries, but still
+                        a fair bit slower than straight C implementations of 
+                        the same algorithms.
+                        .
+                        Changes in 0.2.0.1:  Version bump for transformers
+                        dependency.
+
+tested-with:            GHC == 6.8.3, GHC == 6.10.4, GHC == 6.12.3,
+                        GHC == 7.0.4, GHC == 7.2.1, GHC == 7.2.2, 
+                        GHC == 7.4.1-rc1
+
+source-repository head
+  type:                 git
+  location:             https://github.com/mokus0/random-fu.git
+  subdir:               rvar
+
+Flag mtl2
+    Description:        mtl-2 has State, etc., as "type" rather than "newtype"
+
+Library
+  ghc-options:          -Wall
+  hs-source-dirs:       src
+  exposed-modules:      Data.RVar
+
+  if flag(mtl2)
+    build-depends:      mtl == 2.*
+    cpp-options:        -DMTL2
+  else
+    build-depends:      mtl == 1.1.*
+  
+  build-depends:        base            >= 3 && <5,
+                        MonadPrompt     == 1.0.*,
+                        random-source   == 0.3.*,
+                        transformers    >= 0.2 && < 0.6
diff --git a/test/golden-test-cases/rvar.nix.golden b/test/golden-test-cases/rvar.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/rvar.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, fetchurl, MonadPrompt, mtl, random-source
+, transformers
+}:
+mkDerivation {
+  pname = "rvar";
+  version = "0.2.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base MonadPrompt mtl random-source transformers
+  ];
+  homepage = "https://github.com/mokus0/random-fu";
+  description = "Random Variables";
+  license = stdenv.lib.licenses.publicDomain;
+}
diff --git a/test/golden-test-cases/scalpel-core.cabal b/test/golden-test-cases/scalpel-core.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/scalpel-core.cabal
@@ -0,0 +1,87 @@
+name:                scalpel-core
+version:             0.5.1
+synopsis:            A high level web scraping library for Haskell.
+description:
+    Scalpel core provides a subset of the scalpel web scraping library that is
+    intended to have lightweight dependencies and to be free of all non-Haskell
+    dependencies.
+homepage:            https://github.com/fimad/scalpel
+license:             Apache-2.0
+license-file:        LICENSE
+author:              Will Coster
+maintainer:          willcoster@gmail.com
+category:            Web
+build-type:          Simple
+cabal-version:       >=1.10
+
+extra-source-files:
+  README.md CHANGELOG.md
+
+source-repository head
+  type:     git
+  location: https://github.com/fimad/scalpel.git
+
+source-repository this
+  type:     git
+  location: https://github.com/fimad/scalpel.git
+  tag:      v0.5.1
+
+library
+  other-extensions:
+          FlexibleInstances
+      ,   FunctionalDependencies
+  other-modules:
+          Text.HTML.Scalpel.Internal.Scrape
+      ,   Text.HTML.Scalpel.Internal.Scrape.StringLike
+      ,   Text.HTML.Scalpel.Internal.Select
+      ,   Text.HTML.Scalpel.Internal.Select.Combinators
+      ,   Text.HTML.Scalpel.Internal.Select.Types
+  exposed-modules:
+      Text.HTML.Scalpel.Core
+  hs-source-dirs:   src/
+  default-language: Haskell2010
+  build-depends:
+          base          >= 4.6 && < 5
+      ,   bytestring
+      ,   containers
+      ,   data-default
+      ,   fail
+      ,   regex-base
+      ,   regex-tdfa
+      ,   tagsoup       >= 0.12.2
+      ,   text
+      ,   vector
+  default-extensions:
+          ParallelListComp
+      ,   PatternGuards
+  ghc-options: -W
+
+test-suite lib-tests
+  type:             exitcode-stdio-1.0
+  main-is:          TestMain.hs
+  hs-source-dirs:   tests/
+  default-language: Haskell2010
+  build-depends:
+          HUnit
+      ,   base          >= 4.6 && < 5
+      ,   regex-base
+      ,   regex-tdfa
+      ,   scalpel-core
+      ,   tagsoup
+  default-extensions:
+          ParallelListComp
+      ,   PatternGuards
+  ghc-options: -W
+
+benchmark bench
+  type:             exitcode-stdio-1.0
+  default-language: Haskell2010
+  hs-source-dirs:   benchmarks
+  main-is:          Main.hs
+  build-depends:
+         base           >=4.7 && <5
+      ,  criterion      >=1.1
+      ,  scalpel-core
+      ,  tagsoup
+      ,  text
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/scalpel-core.nix.golden b/test/golden-test-cases/scalpel-core.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/scalpel-core.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, base, bytestring, containers, criterion
+, data-default, fail, fetchurl, HUnit, regex-base, regex-tdfa
+, tagsoup, text, vector
+}:
+mkDerivation {
+  pname = "scalpel-core";
+  version = "0.5.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring containers data-default fail regex-base regex-tdfa
+    tagsoup text vector
+  ];
+  testHaskellDepends = [ base HUnit regex-base regex-tdfa tagsoup ];
+  benchmarkHaskellDepends = [ base criterion tagsoup text ];
+  homepage = "https://github.com/fimad/scalpel";
+  description = "A high level web scraping library for Haskell";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/sdl2.cabal b/test/golden-test-cases/sdl2.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/sdl2.cabal
@@ -0,0 +1,452 @@
+name:                sdl2
+version:             2.3.0
+synopsis:            Both high- and low-level bindings to the SDL library (version 2.0.4+).
+description:
+  This package contains bindings to the SDL 2 library, in both high- and
+  low-level forms:
+  .
+  The 'SDL' namespace contains high-level bindings, where enumerations are split
+  into sum types, and we perform automatic error-checking.
+  .
+  The 'SDL.Raw' namespace contains an almost 1-1 translation of the C API into
+  Haskell FFI calls. As such, this does not contain sum types nor error
+  checking. Thus this namespace is suitable for building your own abstraction
+  over SDL, but is not recommended for day-to-day programming.
+
+license:             BSD3
+license-file:        LICENSE
+author:              Gabríel Arthúr Pétursson, Oliver Charles
+maintainer:          gabriel@system.is, ollie@ocharles.org.uk
+copyright:           Copyright © 2013-2017  Gabríel Arthúr Pétursson
+category:            Graphics
+build-type:          Simple
+cabal-version:       >= 1.10
+
+extra-source-files:
+  ChangeLog.md,
+  cbits/sdlhelper.c,
+  include/sdlhelper.h
+
+data-files:
+  examples/lazyfoo/*.bmp
+  examples/twinklebear/*.bmp
+
+source-repository head
+  type:     git
+  location: https://github.com/haskell-game/sdl2.git
+
+-- source-repository this
+--   type:     git
+--   location: https://github.com/haskell-game/sdl2.git
+--  tag:      2.0.0
+
+flag examples
+  description:       Build examples (except opengl-example)
+  default:           False
+
+flag opengl-example
+  description:       Build opengl-example
+  default:           False
+
+flag no-linear
+  description:       Do not depend on 'linear' library
+  default:           False
+  manual:            True
+
+library
+  -- ghc-options: -Wall
+
+  exposed-modules:
+    SDL
+    SDL.Audio
+    SDL.Event
+    SDL.Exception
+    SDL.Filesystem
+    SDL.Hint
+    SDL.Init
+    SDL.Input
+    SDL.Input.GameController
+    SDL.Input.Joystick
+    SDL.Input.Keyboard
+    SDL.Input.Keyboard.Codes
+    SDL.Input.Mouse
+    SDL.Power
+    SDL.Time
+    SDL.Vect
+    SDL.Video
+    SDL.Video.OpenGL
+    SDL.Video.Renderer
+
+    SDL.Internal.Exception
+    SDL.Internal.Numbered
+    SDL.Internal.Types
+    SDL.Internal.Vect
+
+    SDL.Raw
+    SDL.Raw.Audio
+    SDL.Raw.Basic
+    SDL.Raw.Enum
+    SDL.Raw.Error
+    SDL.Raw.Event
+    SDL.Raw.Filesystem
+    SDL.Raw.Haptic
+    SDL.Raw.Platform
+    SDL.Raw.Power
+    SDL.Raw.Thread
+    SDL.Raw.Timer
+    SDL.Raw.Types
+    SDL.Raw.Video
+
+  other-modules:
+    Data.Bitmask
+
+  hs-source-dirs:
+    src/
+
+  c-sources:
+    cbits/sdlhelper.c
+
+  include-dirs:
+    include
+
+  includes:
+    SDL.h
+    sdlhelper.h
+
+  extra-libraries:
+    SDL2
+
+  pkgconfig-depends:
+    sdl2 >= 2.0.4
+
+  build-depends:
+    base >= 4.7 && < 5,
+    bytestring >= 0.10.4.0 && < 0.11,
+    exceptions >= 0.4 && < 0.9,
+    StateVar >= 1.1.0.0 && < 1.2,
+    text >= 1.1.0.0 && < 1.3,
+    transformers >= 0.2 && < 0.6,
+    vector >= 0.10.9.0 && < 0.13
+
+  if flag(no-linear)
+    cpp-options: -Dnolinear
+  else
+    build-depends:
+      linear >= 1.10.1.2 && < 1.21
+
+  default-language:
+    Haskell2010
+
+  if os(windows)
+    cpp-options: -D_SDL_main_h
+
+executable lazyfoo-lesson-01
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson01.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson01
+
+executable lazyfoo-lesson-02
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson02.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson02
+
+executable lazyfoo-lesson-03
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson03.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson03
+
+executable lazyfoo-lesson-04
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson04.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson04
+
+executable lazyfoo-lesson-05
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson05.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson05
+
+executable lazyfoo-lesson-07
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson07.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson07
+
+executable lazyfoo-lesson-08
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson08.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson08
+
+executable lazyfoo-lesson-09
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson09.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson09
+
+executable lazyfoo-lesson-10
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson10.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson10
+
+executable lazyfoo-lesson-11
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson11.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson11
+
+executable lazyfoo-lesson-12
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson12.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson12
+
+executable lazyfoo-lesson-13
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson13.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson13
+
+executable lazyfoo-lesson-14
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson14.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson14
+
+executable lazyfoo-lesson-15
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson15.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson15
+
+executable lazyfoo-lesson-17
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson17.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson17
+
+executable lazyfoo-lesson-18
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson18.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson18
+
+executable lazyfoo-lesson-19
+  if flag(examples)
+    build-depends: base, vector, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson19.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson19
+
+executable lazyfoo-lesson-20
+  if flag(examples)
+    build-depends: base, vector, sdl2
+  else
+    buildable: False
+
+  -- Not buildable until someone with a haptic device can help out!
+  buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson20.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson20
+
+executable lazyfoo-lesson-43
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/lazyfoo
+  main-is: Lesson43.hs
+  default-language: Haskell2010
+  ghc-options: -main-is Lazyfoo.Lesson43
+
+executable twinklebear-lesson-01
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/twinklebear
+  main-is: Lesson01.hs
+  default-language: Haskell2010
+  ghc-options: -main-is TwinkleBear.Lesson01
+
+executable twinklebear-lesson-02
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/twinklebear
+  main-is: Lesson02.hs
+  default-language: Haskell2010
+  ghc-options: -main-is TwinkleBear.Lesson02
+
+executable twinklebear-lesson-04
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/twinklebear
+  main-is: Lesson04.hs
+  default-language: Haskell2010
+  ghc-options: -main-is TwinkleBear.Lesson04
+
+executable twinklebear-lesson-04a
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/twinklebear
+  main-is: Lesson04a.hs
+  default-language: Haskell2010
+  ghc-options: -main-is TwinkleBear.Lesson04a
+
+executable twinklebear-lesson-05
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples/twinklebear
+  main-is: Lesson05.hs
+  default-language: Haskell2010
+  ghc-options: -main-is TwinkleBear.Lesson05
+
+executable audio-example
+  if flag(examples)
+    build-depends: base, vector, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples
+  main-is: AudioExample.hs
+  default-language: Haskell2010
+  ghc-options: -main-is AudioExample -threaded
+
+executable eventwatch-example
+  if flag(examples)
+    build-depends: base, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples
+  main-is: EventWatch.hs
+  default-language: Haskell2010
+  ghc-options: -main-is EventWatch
+
+executable userevent-example
+  if flag(examples)
+    build-depends: base, text, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples
+  main-is: UserEvents.hs
+  default-language: Haskell2010
+  ghc-options: -main-is UserEvents
+
+executable opengl-example
+  if flag(opengl-example)
+    build-depends: base, OpenGL, bytestring, vector, sdl2
+  else
+    buildable: False
+
+  hs-source-dirs: examples
+  main-is: OpenGLExample.hs
+  default-language: Haskell2010
+  ghc-options: -main-is OpenGLExample
diff --git a/test/golden-test-cases/sdl2.nix.golden b/test/golden-test-cases/sdl2.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/sdl2.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, base, bytestring, exceptions, fetchurl, linear
+, SDL2, StateVar, text, transformers, vector
+}:
+mkDerivation {
+  pname = "sdl2";
+  version = "2.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    base bytestring exceptions linear StateVar text transformers vector
+  ];
+  librarySystemDepends = [ SDL2 ];
+  libraryPkgconfigDepends = [ SDL2 ];
+  description = "Both high- and low-level bindings to the SDL library (version 2.0.4+).";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/selda-sqlite.cabal b/test/golden-test-cases/selda-sqlite.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/selda-sqlite.cabal
@@ -0,0 +1,38 @@
+name:                selda-sqlite
+version:             0.1.6.0
+synopsis:            SQLite backend for the Selda database EDSL.
+description:         SQLite backend for the Selda database EDSL.
+homepage:            https://github.com/valderman/selda
+license:             MIT
+license-file:        LICENSE
+author:              Anton Ekblad
+maintainer:          anton@ekblad.cc
+category:            Database
+build-type:          Simple
+cabal-version:       >=1.10
+
+flag haste
+  default: False
+  description: Package is being installed for Haste.
+
+library
+  exposed-modules:
+    Database.Selda.SQLite
+  other-extensions:
+    GADTs
+    CPP
+  build-depends:
+      base          >=4.8      && <5
+    , exceptions    >=0.8      && <0.9
+    , selda         >=0.1.10.0 && <0.2
+    , text          >=1.0      && <1.3
+  if !flag(haste)
+    build-depends:
+        direct-sqlite >=2.2   && <2.4
+      , directory     >=1.2.2 && <1.4
+  hs-source-dirs:
+    src
+  default-language:
+    Haskell2010
+  ghc-options:
+    -Wall
diff --git a/test/golden-test-cases/selda-sqlite.nix.golden b/test/golden-test-cases/selda-sqlite.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/selda-sqlite.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, direct-sqlite, directory, exceptions
+, fetchurl, selda, text
+}:
+mkDerivation {
+  pname = "selda-sqlite";
+  version = "0.1.6.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base direct-sqlite directory exceptions selda text
+  ];
+  homepage = "https://github.com/valderman/selda";
+  description = "SQLite backend for the Selda database EDSL";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/selda.cabal b/test/golden-test-cases/selda.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/selda.cabal
@@ -0,0 +1,110 @@
+name:                selda
+version:             0.1.11.2
+synopsis:            Type-safe, high-level EDSL for interacting with relational databases.
+description:         This package provides an EDSL for writing portable, type-safe, high-level
+                     database code. Its feature set includes querying and modifying databases,
+                     automatic, in-process caching with consistency guarantees, and transaction
+                     support.
+
+                     See the package readme for a brief usage tutorial.
+                     
+                     To use this package you need at least one backend package, in addition to
+                     this package. There are currently two different backend packages:
+                     selda-sqlite and selda-postgresql.
+homepage:            https://selda.link
+license:             MIT
+license-file:        LICENSE
+author:              Anton Ekblad
+maintainer:          anton@ekblad.cc
+category:            Database
+build-type:          Simple
+extra-source-files:  ChangeLog.md
+cabal-version:       >=1.10
+tested-with:         GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
+
+extra-source-files:
+  README.md
+
+flag localcache
+  default: True
+  description:
+    Enable process-local cache support. Even when supported, caching is turned
+    off by default until enabled by the application.
+    When unsupported, the relevant APIs are still available, but the cache will
+    act as if every update is a no-op and every lookup a cache miss.
+
+flag haste
+  default: False
+  description:
+    Automatically set when installing for the Haste compiler.
+
+source-repository head
+  type:     git
+  location: https://github.com/valderman/selda.git
+
+library
+  exposed-modules:
+    Database.Selda
+    Database.Selda.Backend
+    Database.Selda.Generic
+    Database.Selda.Unsafe
+  other-modules:
+    Database.Selda.Backend.Internal
+    Database.Selda.Caching
+    Database.Selda.Column
+    Database.Selda.Compile
+    Database.Selda.Exp
+    Database.Selda.Frontend
+    Database.Selda.Inner
+    Database.Selda.Prepared
+    Database.Selda.Query
+    Database.Selda.Query.Type
+    Database.Selda.Selectors
+    Database.Selda.SQL
+    Database.Selda.SQL.Print
+    Database.Selda.SQL.Print.Config
+    Database.Selda.SqlType
+    Database.Selda.Table
+    Database.Selda.Table.Compile
+    Database.Selda.Table.Foreign
+    Database.Selda.Transform
+    Database.Selda.Types
+  other-extensions:
+    OverloadedStrings
+    GADTs
+    CPP
+    MultiParamTypeClasses
+    UndecidableInstances
+    ScopedTypeVariables
+    RankNTypes
+    TypeFamilies
+    FlexibleInstances
+    GeneralizedNewtypeDeriving
+    FlexibleContexts
+  build-depends:
+      base                 >=4.8   && <5
+    , bytestring           >=0.10  && <0.11
+    , exceptions           >=0.8   && <0.9
+    , hashable             >=1.1   && <1.3
+    , mtl                  >=2.0   && <2.3
+    , text                 >=1.0   && <1.3
+    , time                 >=1.5   && <1.9
+    , unordered-containers >=0.2.6 && <0.3
+  if impl(ghc < 7.11)
+    build-depends:
+      transformers  >=0.4 && <0.6
+  if impl(ghc >= 8.2)
+    build-depends:
+      hashable >= 1.2.6.1
+  if !flag(haste) && flag(localcache)
+    build-depends:
+      psqueues >=0.2 && <0.3
+  else
+    cpp-options:
+      -DNO_LOCALCACHE
+  hs-source-dirs:
+    src
+  default-language:
+    Haskell2010
+  ghc-options:
+    -Wall
diff --git a/test/golden-test-cases/selda.nix.golden b/test/golden-test-cases/selda.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/selda.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, exceptions, fetchurl, hashable
+, mtl, psqueues, text, time, unordered-containers
+}:
+mkDerivation {
+  pname = "selda";
+  version = "0.1.11.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring exceptions hashable mtl psqueues text time
+    unordered-containers
+  ];
+  homepage = "https://selda.link";
+  description = "Type-safe, high-level EDSL for interacting with relational databases";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/servant-checked-exceptions.cabal b/test/golden-test-cases/servant-checked-exceptions.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/servant-checked-exceptions.cabal
@@ -0,0 +1,145 @@
+name:                servant-checked-exceptions
+version:             0.4.1.0
+synopsis:            Checked exceptions for Servant APIs.
+description:         Please see <https://github.com/cdepillabout/servant-checked-exceptions#readme README.md>.
+homepage:            https://github.com/cdepillabout/servant-checked-exceptions
+license:             BSD3
+license-file:        LICENSE
+author:              Dennis Gosnell
+maintainer:          cdep.illabout@gmail.com
+copyright:           2017 Dennis Gosnell
+category:            Text
+build-type:          Simple
+extra-source-files:  CHANGELOG.md
+                   , README.md
+                   , stack.yaml
+cabal-version:       >=1.10
+
+flag buildexample
+  description: Build a small example program
+  default: False
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Servant.Checked.Exceptions
+                     , Servant.Checked.Exceptions.Internal
+                     , Servant.Checked.Exceptions.Internal.Envelope
+                     , Servant.Checked.Exceptions.Internal.Prism
+                     , Servant.Checked.Exceptions.Internal.Product
+                     , Servant.Checked.Exceptions.Internal.Servant
+                     , Servant.Checked.Exceptions.Internal.Servant.API
+                     , Servant.Checked.Exceptions.Internal.Servant.Client
+                     , Servant.Checked.Exceptions.Internal.Servant.Docs
+                     , Servant.Checked.Exceptions.Internal.Servant.Server
+                     , Servant.Checked.Exceptions.Internal.Union
+                     , Servant.Checked.Exceptions.Internal.Util
+  build-depends:       base >= 4.8 && < 5
+                     , aeson
+                     , bytestring
+                     , deepseq
+                     , http-media
+                     , profunctors
+                     , tagged
+                     , servant >= 0.9
+                     , servant-client >= 0.9
+                     , servant-docs >= 0.9
+                     , servant-server >= 0.9
+                     , text
+  default-language:    Haskell2010
+  ghc-options:         -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-monomorphism-restriction
+  other-extensions:    QuasiQuotes
+                     , TemplateHaskell
+
+executable servant-checked-exceptions-example-client
+  main-is:             Client.hs
+  other-modules:       Api
+  hs-source-dirs:      example
+  build-depends:       base
+                     , aeson
+                     , http-api-data
+                     , http-client
+                     , optparse-applicative
+                     , servant
+                     , servant-checked-exceptions
+                     , servant-client
+                     , text
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+  if flag(buildexample)
+    buildable:         True
+  else
+    buildable:         False
+
+executable servant-checked-exceptions-example-docs
+  main-is:             Docs.hs
+  other-modules:       Api
+  hs-source-dirs:      example
+  build-depends:       base
+                     , aeson
+                     , http-api-data
+                     , servant
+                     , servant-checked-exceptions
+                     , servant-docs
+                     , text
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+  if flag(buildexample)
+    buildable:         True
+  else
+    buildable:         False
+
+executable servant-checked-exceptions-example-server
+  main-is:             Server.hs
+  other-modules:       Api
+  hs-source-dirs:      example
+  build-depends:       base
+                     , aeson
+                     , http-api-data
+                     , natural-transformation
+                     , servant
+                     , servant-checked-exceptions
+                     , servant-server
+                     , text
+                     , wai
+                     , warp
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+  if flag(buildexample)
+    buildable:         True
+  else
+    buildable:         False
+
+test-suite servant-checked-exceptions-doctest
+  type:                exitcode-stdio-1.0
+  main-is:             DocTest.hs
+  hs-source-dirs:      test
+  build-depends:       base
+                     , doctest
+                     , Glob
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+test-suite servant-checked-exceptions-test
+  type:                exitcode-stdio-1.0
+  main-is:             Spec.hs
+  other-modules:
+  hs-source-dirs:      test
+  build-depends:       base
+                     , bytestring
+                     , hspec-wai
+                     , tasty
+                     , tasty-hspec
+                     , tasty-hunit
+                     , servant
+                     , servant-checked-exceptions
+                     , servant-server
+                     , wai
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-monomorphism-restriction
+
+source-repository head
+  type:     git
+  location: git@github.com:cdepillabout/servant-checked-exceptions.git
diff --git a/test/golden-test-cases/servant-checked-exceptions.nix.golden b/test/golden-test-cases/servant-checked-exceptions.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/servant-checked-exceptions.nix.golden
@@ -0,0 +1,32 @@
+{ mkDerivation, aeson, base, bytestring, deepseq, doctest, fetchurl
+, Glob, hspec-wai, http-api-data, http-client, http-media
+, natural-transformation, optparse-applicative, profunctors
+, servant, servant-client, servant-docs, servant-server, tagged
+, tasty, tasty-hspec, tasty-hunit, text, wai, warp
+}:
+mkDerivation {
+  pname = "servant-checked-exceptions";
+  version = "0.4.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base bytestring deepseq http-media profunctors servant
+    servant-client servant-docs servant-server tagged text
+  ];
+  executableHaskellDepends = [
+    aeson base http-api-data http-client natural-transformation
+    optparse-applicative servant servant-client servant-docs
+    servant-server text wai warp
+  ];
+  testHaskellDepends = [
+    base bytestring doctest Glob hspec-wai servant servant-server tasty
+    tasty-hspec tasty-hunit wai
+  ];
+  homepage = "https://github.com/cdepillabout/servant-checked-exceptions";
+  description = "Checked exceptions for Servant APIs";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/set-cover.cabal b/test/golden-test-cases/set-cover.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/set-cover.cabal
@@ -0,0 +1,253 @@
+Name:             set-cover
+Version:          0.0.8
+License:          BSD3
+License-File:     LICENSE
+Author:           Henning Thielemann, Helmut Podhaisky
+Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
+Homepage:         http://hub.darcs.net/thielema/set-cover/
+Category:         Math, Algorithms
+Synopsis:         Solve exact set cover problems like Sudoku, 8 Queens, Soma Cube, Tetris Cube
+Description:
+  Solver for exact set cover problems.
+  Included examples:
+  Sudoku, Nonogram, 8 Queens, Domino tiling, Mastermind,
+  Soma Cube, Tetris Cube, Cube of L's, Logika's Baumeister puzzle.
+  The generic algorithm allows to choose between
+  slow but flexible @Set@ from @containers@ package
+  and fast but cumbersome bitvectors.
+  .
+  For getting familiar with the package
+  I propose to study the Queen8 example along with "Math.SetCover.Exact".
+  .
+  Build examples with @cabal install -fbuildExamples@.
+  .
+  The package needs only Haskell 98.
+Tested-With:      GHC==7.4.2, GHC==7.6.3, GHC==7.8.2
+Cabal-Version:    >=1.8
+Build-Type:       Simple
+Extra-Source-Files: Changes.md
+
+Flag buildExamples
+  description: Build example executables
+  default:     False
+
+Source-Repository this
+  Tag:         0.0.8
+  Type:        darcs
+  Location:    http://hub.darcs.net/thielema/set-cover/
+
+Source-Repository head
+  Type:        darcs
+  Location:    http://hub.darcs.net/thielema/set-cover/
+
+Library
+  Build-Depends:
+    psqueues >=0.2 && <0.3,
+    enummapset >=0.1 && <0.6,
+    containers >=0.4 && <0.6,
+    utility-ht >=0.0.12 && <0.1,
+    base >=4 && <5
+
+  GHC-Options:      -Wall
+  Hs-Source-Dirs:   src
+  Exposed-Modules:
+    Math.SetCover.Bit
+    Math.SetCover.BitMap
+    Math.SetCover.BitSet
+    Math.SetCover.BitPosition
+    Math.SetCover.Queue
+    Math.SetCover.Exact
+    Math.SetCover.Exact.Priority
+    Math.SetCover.Cuboid
+  Other-Modules:
+    Math.SetCover.IntSet
+    Math.SetCover.BitPriorityQueue
+    Math.SetCover.EnumMap
+    Math.SetCover.Queue.Set
+    Math.SetCover.Queue.Map
+    Math.SetCover.Queue.Bit
+    Math.SetCover.Queue.BitPriorityQueue
+
+Executable tetris-cube
+  If flag(buildExamples)
+    Build-Depends:
+      haha >=0.3.1 && <0.4,
+      pooled-io >=0.0 && <0.1,
+      set-cover,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: TetrisCube.hs
+  Other-Modules:
+    Utility
+
+Executable soma-cube
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: Soma.hs
+
+Executable queen8
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      containers,
+      array >=0.1 && <0.6,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: Queen8.hs
+
+Executable sudoku-setcover
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      containers,
+      array >=0.1 && <0.6,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: Sudoku.hs
+
+Executable lcube
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      pooled-io >=0.0 && <0.1,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: LCube.hs
+  Other-Modules:
+    Utility
+
+Executable baumeister
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: Baumeister.hs
+  Other-Modules:
+    Utility
+
+Executable lonpos-pyramid
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: LonposPyramid.hs
+  Other-Modules:
+    Utility
+
+Executable alphametics
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      non-empty >=0.2 && <0.4,
+      transformers >=0.2 && <0.6,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: Alphametics.hs
+
+Executable domino
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      unicode >=0.0 && <0.1,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall -rtsopts -threaded
+  Hs-Source-Dirs: example
+  Main-Is: Domino.hs
+
+Executable nonogram
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      non-empty >=0.2 && <0.4,
+      psqueues,
+      enummapset,
+      containers,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall
+  Hs-Source-Dirs: example
+  Main-Is: Nonogram.hs
+  Other-Modules:
+    Nonogram.Example
+    Nonogram.Encoding.Combinatoric
+    Nonogram.Encoding.BlackWhite
+    Nonogram.Encoding.Plug
+    Nonogram.Encoding.Naive
+    Nonogram.Base
+
+Executable mastermind
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      random >=1.0 && <1.2,
+      transformers >=0.2 && <0.6,
+      containers,
+      array >=0.1 && <0.6,
+      utility-ht,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall
+  Hs-Source-Dirs: example
+  Main-Is: Mastermind.hs
+
+Executable pangram
+  If flag(buildExamples)
+    Build-Depends:
+      set-cover,
+      containers,
+      base
+  Else
+    Buildable: False
+  GHC-Options:    -Wall
+  Hs-Source-Dirs: example
+  Main-Is: Pangram.hs
diff --git a/test/golden-test-cases/set-cover.nix.golden b/test/golden-test-cases/set-cover.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/set-cover.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, containers, enummapset, fetchurl, psqueues
+, utility-ht
+}:
+mkDerivation {
+  pname = "set-cover";
+  version = "0.0.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base containers enummapset psqueues utility-ht
+  ];
+  homepage = "http://hub.darcs.net/thielema/set-cover/";
+  description = "Solve exact set cover problems like Sudoku, 8 Queens, Soma Cube, Tetris Cube";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/sets.cabal b/test/golden-test-cases/sets.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/sets.cabal
@@ -0,0 +1,85 @@
+Name:                   sets
+Version:                0.0.5.2
+Author:                 Athan Clark <athan.clark@gmail.com>
+Maintainer:             Athan Clark <athan.clark@gmail.com>
+License:                MIT
+License-File:           LICENSE
+Synopsis:               Ducktyped set interface for Haskell containers.
+Description:            Includes overloaded functions for common set operations. See @Data.Set.Class@.
+Cabal-Version:          >= 1.10
+Build-Type:             Simple
+Category:               Data, Math
+
+Library
+  Default-Language:     Haskell2010
+  HS-Source-Dirs:       src
+  GHC-Options:          -Wall
+  Exposed-Modules:      Data.Set.Class
+                        Data.Set.Unordered.Unique
+                        Data.Set.Unordered.Many
+                        Data.Set.Ordered.Unique
+                        Data.Set.Ordered.Unique.With
+                        Data.Set.Ordered.Unique.Finite
+                        Data.Set.Ordered.Many
+                        Data.Set.Ordered.Many.With
+  Build-Depends:        base >= 4.6 && < 5
+                      , containers
+                      , unordered-containers
+                      , hashable
+                      , commutative >= 0.0.1.4
+                      , composition
+                      , contravariant
+--                      , invariant
+                      , witherable
+                      , keys
+                      , semigroups
+                      , semigroupoids
+                      , mtl
+                      , transformers
+                      , transformers-base
+                      , QuickCheck
+
+Test-Suite spec
+  Type:                 exitcode-stdio-1.0
+  Default-Language:     Haskell2010
+  Hs-Source-Dirs:       test
+  Ghc-Options:          -Wall -threaded
+  Main-Is:              Main.hs
+  Other-Modules:        Data.SetSpec
+  Build-Depends:        base
+                      , sets
+                      , tasty
+                      , tasty-quickcheck
+                      , tasty-hunit
+                      , QuickCheck
+                      , quickcheck-instances
+                      , containers
+                      , unordered-containers
+                      , contravariant
+                      , commutative
+
+
+Benchmark bench
+  Type:                 exitcode-stdio-1.0
+  Default-Language:     Haskell2010
+  Hs-Source-Dirs:       bench
+  Ghc-Options:          -Wall -threaded
+  Main-Is:              Profile.hs
+  Other-Modules:        Data.Set.Data
+                        Data.Map.Data
+                        Data.IntSet.Data
+                        Data.IntMap.Data
+                        Data.Set.Ordered.Many.Data
+                        Data.Set.Unordered.Many.Data
+                        Data.Set.Unordered.Unique.Data
+  Build-Depends:        base
+                      , sets
+                      , containers
+                      , unordered-containers
+                      , commutative
+                      , contravariant
+                      , criterion
+
+Source-Repository head
+  Type:                 git
+  Location:             https://github.com/athanclark/sets.git
diff --git a/test/golden-test-cases/sets.nix.golden b/test/golden-test-cases/sets.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/sets.nix.golden
@@ -0,0 +1,30 @@
+{ mkDerivation, base, commutative, composition, containers
+, contravariant, criterion, fetchurl, hashable, keys, mtl
+, QuickCheck, quickcheck-instances, semigroupoids, semigroups
+, tasty, tasty-hunit, tasty-quickcheck, transformers
+, transformers-base, unordered-containers, witherable
+}:
+mkDerivation {
+  pname = "sets";
+  version = "0.0.5.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base commutative composition containers contravariant hashable keys
+    mtl QuickCheck semigroupoids semigroups transformers
+    transformers-base unordered-containers witherable
+  ];
+  testHaskellDepends = [
+    base commutative containers contravariant QuickCheck
+    quickcheck-instances tasty tasty-hunit tasty-quickcheck
+    unordered-containers
+  ];
+  benchmarkHaskellDepends = [
+    base commutative containers contravariant criterion
+    unordered-containers
+  ];
+  description = "Ducktyped set interface for Haskell containers";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/simple-smt.cabal b/test/golden-test-cases/simple-smt.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/simple-smt.cabal
@@ -0,0 +1,24 @@
+name:                simple-smt
+version:             0.7.1
+synopsis:            A simple way to interact with an SMT solver process.
+description:         A simple way to interact with an SMT solver process.
+license:             BSD3
+license-file:        LICENSE
+author:              Iavor S. Diatchki
+maintainer:          iavor.diatchki@gmail.com
+category:            Math
+build-type:          Simple
+cabal-version:       >=1.10
+
+extra-source-files:  CHANGES
+
+library
+  exposed-modules:     SimpleSMT
+  other-extensions:    Safe, RecordWildCards
+  build-depends:       base >=4.7 && <10,
+                       process
+  default-language:    Haskell2010
+
+source-repository head
+  type: git
+  location: https://github.com/yav/simple-smt
diff --git a/test/golden-test-cases/simple-smt.nix.golden b/test/golden-test-cases/simple-smt.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/simple-smt.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchurl, process }:
+mkDerivation {
+  pname = "simple-smt";
+  version = "0.7.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base process ];
+  description = "A simple way to interact with an SMT solver process";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/slack-web.cabal b/test/golden-test-cases/slack-web.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/slack-web.cabal
@@ -0,0 +1,97 @@
+name: slack-web
+version: 0.2.0.1
+
+build-type: Simple
+cabal-version: >= 1.21
+
+license: MIT
+license-file: LICENSE.md
+
+copyright: 2017 Juan Pedro Villa Isaza
+author: Juan Pedro Villa Isaza <jpvillaisaza@gmail.com>
+maintainer: Juan Pedro Villa Isaza <jpvillaisaza@gmail.com>
+
+homepage: https://github.com/jpvillaisaza/slack-web
+bug-reports: https://github.com/jpvillaisaza/slack-web/issues
+
+synopsis: Bindings for the Slack web API
+description: Haskell bindings for the Slack web API.
+
+category: Web
+
+tested-with: GHC == 8.0.2
+
+extra-source-files:
+  CHANGELOG.md
+  README.md
+
+
+library
+  hs-source-dirs:
+      src
+  exposed-modules:
+      Web.Slack
+      Web.Slack.Api
+      Web.Slack.Auth
+      Web.Slack.Channel
+      Web.Slack.Chat
+      Web.Slack.Common
+      Web.Slack.Group
+      Web.Slack.Im
+      Web.Slack.MessageParser
+      Web.Slack.User
+  other-modules:
+      Web.Slack.Types
+      Web.Slack.Util
+  build-depends:
+      aeson >= 1.0 && < 1.3
+    , base >= 4.9 && < 4.11
+    , containers
+    , http-api-data >= 0.3 && < 0.4
+    , http-client >= 0.5 && < 0.6
+    , http-client-tls >= 0.3 && < 0.4
+    , servant >= 0.9 && < 0.12
+    , servant-client >= 0.9 && < 0.12
+    , text >= 1.2 && < 1.3
+    , transformers
+    , mtl
+    , time
+    , errors
+    , megaparsec
+  default-language:
+      Haskell2010
+  ghc-options:
+      -Wall
+
+-- the test suite doesn't depend on slack-web
+-- but rather has the src as an extra source directory.
+-- that allows us to refer to non exported modules from tests.
+test-suite tests
+  main-is:
+      Spec.hs
+  hs-source-dirs:
+      src, tests
+  type:
+      exitcode-stdio-1.0
+  other-modules:
+      Web.Slack.MessageParser
+      Web.Slack.MessageParserSpec
+      Web.Slack.Types
+  build-depends:
+      base >= 4.9 && < 4.11
+    , containers
+    , aeson
+    , errors
+    , hspec
+    , http-api-data
+    , text
+    , time
+    , megaparsec
+  default-language:
+    Haskell2010
+  ghc-options:
+       -Wall
+
+source-repository head
+  type: git
+  location: https://github.com/jpvillaisaza/slack-web
diff --git a/test/golden-test-cases/slack-web.nix.golden b/test/golden-test-cases/slack-web.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/slack-web.nix.golden
@@ -0,0 +1,24 @@
+{ mkDerivation, aeson, base, containers, errors, fetchurl, hspec
+, http-api-data, http-client, http-client-tls, megaparsec, mtl
+, servant, servant-client, text, time, transformers
+}:
+mkDerivation {
+  pname = "slack-web";
+  version = "0.2.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base containers errors http-api-data http-client
+    http-client-tls megaparsec mtl servant servant-client text time
+    transformers
+  ];
+  testHaskellDepends = [
+    aeson base containers errors hspec http-api-data megaparsec text
+    time
+  ];
+  homepage = "https://github.com/jpvillaisaza/slack-web";
+  description = "Bindings for the Slack web API";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/slug.cabal b/test/golden-test-cases/slug.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/slug.cabal
@@ -0,0 +1,65 @@
+name:                 slug
+version:              0.1.7
+cabal-version:        >= 1.18
+tested-with:          GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
+license:              BSD3
+license-file:         LICENSE.md
+author:               Mark Karpov <markkarpov92@gmail.com>
+maintainer:           Mark Karpov <markkarpov92@gmail.com>
+homepage:             https://github.com/mrkkrp/slug
+bug-reports:          https://github.com/mrkkrp/slug/issues
+category:             Web, Yesod
+synopsis:             Type-safe slugs for Yesod ecosystem
+build-type:           Simple
+description:          Type-safe slugs for Yesod ecosystem.
+extra-doc-files:      CHANGELOG.md
+                    , README.md
+
+flag dev
+  description:        Turn on development settings.
+  manual:             True
+  default:            False
+
+library
+  build-depends:      QuickCheck   >= 2.4   && < 3.0
+                    , aeson        >= 0.8   && < 1.3
+                    , base         >= 4.7   && < 5.0
+                    , exceptions   >= 0.6   && < 0.9
+                    , http-api-data >= 0.2  && < 0.4
+                    , path-pieces  >= 0.1.5 && < 0.3
+                    , persistent   >= 2.0   && < 3.0
+                    , text         >= 1.0   && < 1.3
+  if !impl(ghc >= 8.0)
+    build-depends:    semigroups   == 0.18.*
+  default-extensions: OverloadedStrings
+  exposed-modules:    Web.Slug
+  if flag(dev)
+    ghc-options:      -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-language:   Haskell2010
+
+test-suite tests
+  main-is:            Main.hs
+  hs-source-dirs:     tests
+  type:               exitcode-stdio-1.0
+  if flag(dev)
+    ghc-options:      -Wall -Werror
+  else
+    ghc-options:      -O2 -Wall
+  default-extensions: OverloadedStrings
+  build-depends:      QuickCheck   >= 2.4   && < 3.0
+                    , base         >= 4.7   && < 5.0
+                    , exceptions   >= 0.6   && < 0.9
+                    , hspec        >= 2.0   && < 3.0
+                    , http-api-data >= 0.2  && < 0.4
+                    , path-pieces  >= 0.1.5 && < 0.3
+                    , slug
+                    , text         >= 1.0   && < 1.3
+  if !impl(ghc >= 8.0)
+    build-depends:    semigroups   == 0.18.*
+  default-language:   Haskell2010
+
+source-repository head
+  type:               git
+  location:           https://github.com/mrkkrp/slug.git
diff --git a/test/golden-test-cases/slug.nix.golden b/test/golden-test-cases/slug.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/slug.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, aeson, base, exceptions, fetchurl, hspec
+, http-api-data, path-pieces, persistent, QuickCheck, text
+}:
+mkDerivation {
+  pname = "slug";
+  version = "0.1.7";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base exceptions http-api-data path-pieces persistent
+    QuickCheck text
+  ];
+  testHaskellDepends = [
+    base exceptions hspec http-api-data path-pieces QuickCheck text
+  ];
+  homepage = "https://github.com/mrkkrp/slug";
+  description = "Type-safe slugs for Yesod ecosystem";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/soxlib.cabal b/test/golden-test-cases/soxlib.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/soxlib.cabal
@@ -0,0 +1,70 @@
+Name:             soxlib
+Version:          0.0.3
+License:          BSD3
+License-File:     LICENSE
+Author:           Henning Thielemann <haskell@henning-thielemann.de>
+Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
+Homepage:         http://www.haskell.org/haskellwiki/Sox
+Category:         Sound
+Synopsis:         Write, read, convert audio signals using libsox
+Description:
+   This is an FFI binding to @libsox@ of the Sox (Sound Exchanger) project
+   <http://sox.sourceforge.net/>.
+   It lets write, read and convert audio signals
+   in various formats, resolutions, and numbers of channels.
+   .
+   The package @sox@ has similar functionality
+   but calls the @sox@ shell command.
+Tested-With:       GHC==6.12.3, GHC==7.4.1
+Cabal-Version:     >=1.8
+Build-Type:        Simple
+Extra-Source-Files:
+  src/Sound/SoxLib/Template.h
+
+Source-Repository this
+  Tag:         0.0.3
+  Type:        darcs
+  Location:    http://hub.darcs.net/thielema/soxlib/
+
+Source-Repository head
+  Type:        darcs
+  Location:    http://hub.darcs.net/thielema/soxlib/
+
+Flag buildExamples
+  description: Build example executables
+  default:     False
+
+Library
+  Build-Depends:
+    sample-frame >=0.0.1 && <0.1,
+    storablevector >=0.2.10 && <0.3,
+    bytestring >=0.9 && <0.11,
+    explicit-exception >=0.1.3 && < 0.2,
+    -- that's the way to get compatibility between GHC 6.10 and 6.12
+    extensible-exceptions >=0.1.1 && <0.2,
+    transformers >=0.2 && <0.6,
+    containers >=0.1 && <0.6,
+    utility-ht >=0.0.5 && <0.1,
+    base >=4 && <5
+
+  GHC-Options: -Wall
+  Hs-Source-Dirs: src
+  Include-Dirs: src
+
+  Exposed-Modules:
+    Sound.SoxLib
+  Other-Modules:
+    Sound.SoxLib.FFI
+
+  PkgConfig-Depends: sox >=14.3 && <14.5
+
+Executable soxlib-demo
+  Main-Is: demo/Demo.hs
+  If flag(buildExamples)
+    Build-Depends:
+      soxlib,
+      storablevector,
+      base >=4 && <5
+  Else
+    Buildable: False
+  GHC-Options: -Wall
diff --git a/test/golden-test-cases/soxlib.nix.golden b/test/golden-test-cases/soxlib.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/soxlib.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, bytestring, containers, explicit-exception
+, extensible-exceptions, fetchurl, sample-frame, sox
+, storablevector, transformers, utility-ht
+}:
+mkDerivation {
+  pname = "soxlib";
+  version = "0.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base bytestring containers explicit-exception extensible-exceptions
+    sample-frame storablevector transformers utility-ht
+  ];
+  libraryPkgconfigDepends = [ sox ];
+  homepage = "http://www.haskell.org/haskellwiki/Sox";
+  description = "Write, read, convert audio signals using libsox";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/speedy-slice.cabal b/test/golden-test-cases/speedy-slice.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/speedy-slice.cabal
@@ -0,0 +1,80 @@
+name:                speedy-slice
+version:             0.3.0
+synopsis:            Speedy slice sampling.
+homepage:            http://github.com/jtobin/speedy-slice
+license:             MIT
+license-file:        LICENSE
+author:              Jared Tobin
+maintainer:          jared@jtobin.ca
+category:            Math
+build-type:          Simple
+cabal-version:       >=1.10
+description:
+  Speedy slice sampling.
+  .
+  This implementation of the slice sampling algorithm uses 'lens' as a means to
+  operate over generic indexed traversable functors, so you can expect it to
+  work if your target function takes a list, vector, map, sequence, etc. as its
+  argument.
+  .
+  Additionally you can sample over anything that's an instance of both 'Num' and
+  'Variate', which is useful in the case of discrete parameters.
+  .
+  Exports a 'mcmc' function that prints a trace to stdout, a 'chain' function
+  for collecting results in memory, and a 'slice' transition operator that can
+  be used more generally.
+  .
+  > import Numeric.MCMC.Slice
+  > import Data.Sequence (Seq, index, fromList)
+  >
+  > bnn :: Seq Double -> Double
+  > bnn xs = -0.5 * (x0 ^ 2 * x1 ^ 2 + x0 ^ 2 + x1 ^ 2 - 8 * x0 - 8 * x1) where
+  >   x0 = index xs 0
+  >   x1 = index xs 1
+  >
+  > main :: IO ()
+  > main = withSystemRandom . asGenIO $ mcmc 10000 1 (fromList [0, 0]) bnn
+
+Source-repository head
+  Type:     git
+  Location: http://github.com/jtobin/speedy-slice.git
+
+library
+  default-language:    Haskell2010
+  exposed-modules:
+      Numeric.MCMC.Slice
+  build-depends:
+      base            >= 4 && < 6
+    , kan-extensions  >= 5 && < 6
+    , lens            >= 4 && < 5
+    , primitive       >= 0.6 && < 1.0
+    , mcmc-types      >= 1.0.1
+    , mwc-probability >= 1.0.1
+    , pipes           >= 4 && < 5
+    , transformers    >= 0.5 && < 1.0
+
+Test-suite rosenbrock
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Rosenbrock.hs
+  default-language:    Haskell2010
+  ghc-options:
+    -rtsopts
+  build-depends:
+      base              >= 4 && < 6
+    , mwc-probability   >= 1.0.1
+    , speedy-slice
+
+Test-suite bnn
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             BNN.hs
+  default-language:    Haskell2010
+  ghc-options:
+    -rtsopts
+  build-depends:
+      base              >= 4 && < 6
+    , containers        >= 0.5 && < 0.6
+    , mwc-probability   >= 1.0.1
+    , speedy-slice
+
diff --git a/test/golden-test-cases/speedy-slice.nix.golden b/test/golden-test-cases/speedy-slice.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/speedy-slice.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, containers, fetchurl, kan-extensions, lens
+, mcmc-types, mwc-probability, pipes, primitive, transformers
+}:
+mkDerivation {
+  pname = "speedy-slice";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base kan-extensions lens mcmc-types mwc-probability pipes primitive
+    transformers
+  ];
+  testHaskellDepends = [ base containers mwc-probability ];
+  homepage = "http://github.com/jtobin/speedy-slice";
+  description = "Speedy slice sampling";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/splice.cabal b/test/golden-test-cases/splice.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/splice.cabal
@@ -0,0 +1,66 @@
+name:          splice
+version:       0.6.1.1
+stability:     stable on all operating systems
+synopsis:      Cross-platform Socket to Socket Data Splicing
+description:   A library that implements most efficient socket to socket
+               data transfer loops for proxy servers on all operating systems.
+               .
+               On GNU/Linux, it exports the zero-copy system call @c_splice()@
+               (<http://en.wikipedia.org/wiki/Splice_(system_call)#Requirements>)
+               in @System.IO.Splice.Linux@.
+               .
+               On other operating systems, it only exports a portable Haskell
+               implementation.
+               .
+               A unified sockets API for all operating systems is available in
+               @Network.Socket.Splice@.
+               .
+               [Version Scheme]
+               Major-@/R/@-ewrite . New-@/F/@-unctionality . @/I/@-mprovementAndBugFixes . @/P/@-ackagingOnly
+               .
+               * @PackagingOnly@ changes are made for quality assurance reasons.
+               
+copyright:     Copyright © 2012 Cetin Sert
+license:       BSD3
+license-file:  LICENSE
+author:        Cetin Sert <fusion@corsis.eu>, Corsis Research
+maintainer:    Cetin Sert <fusion@corsis.eu>, Corsis Research
+homepage:      http://corsis.github.com/splice/
+bug-reports:   http://github.com/corsis/splice/issues
+category:      System, Network
+build-type:    Simple
+cabal-version: >= 1.6
+
+
+source-repository head
+    type:      git
+    location:  git://github.com/corsis/splice.git
+
+
+flag portable
+    description: force portable 'splice' implementation on GNU\/Linux
+    default    : True
+
+
+flag llvm
+    description: compile via LLVM
+    default    : False
+
+
+library
+    hs-source-dirs:      src
+    exposed-modules:     Network.Socket.Splice
+    other-modules:       Network.Socket.Splice.Internal
+    build-depends:       base    >= 4 && <= 5,
+                         network -any
+
+    if os(linux) && !flag(portable)
+      exposed-modules:   System.IO.Splice.Linux
+      build-depends:     unix    >= 2 && <= 4
+      cpp-options:       -DLINUX_SPLICE
+
+      
+    ghc-options:         -Wall -O2
+
+    if flag(llvm)
+      ghc-options:       -fllvm -optlo-O3
diff --git a/test/golden-test-cases/splice.nix.golden b/test/golden-test-cases/splice.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/splice.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, network }:
+mkDerivation {
+  pname = "splice";
+  version = "0.6.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base network ];
+  homepage = "http://corsis.github.com/splice/";
+  description = "Cross-platform Socket to Socket Data Splicing";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/spreadsheet.cabal b/test/golden-test-cases/spreadsheet.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/spreadsheet.cabal
@@ -0,0 +1,108 @@
+Name:             spreadsheet
+Version:          0.1.3.7
+License:          BSD3
+License-File:     LICENSE
+Author:           Henning Thielemann <haskell@henning-thielemann.de>
+Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
+Homepage:         http://www.haskell.org/haskellwiki/Spreadsheet
+Category:         Data, Text
+Synopsis:         Read and write spreadsheets from and to CSV files in a lazy way
+Description:
+  Read and write spreadsheets from and to files
+  containing comma separated values (CSV) in a lazy way.
+  Reading from other source than plain 'String's could be easily added.
+  .
+  If you install this package by
+  .
+  > cabal install -fbuildExamples
+  .
+  then the example programs @csvreplace@ and @csvextract@
+  are compiled and installed, too.
+  The program @csvreplace@ fills a template text using data from a CSV file.
+  For similar (non-Haskell) programs see @cut@, @csvfix@, @csvtool@.
+  The program @csvextract@ is the inverse of @csvreplace@.
+  .
+  Related packages:
+  .
+  * @csv@: strict parser
+  .
+  * <http://www.xoltar.org/languages/haskell.html>,
+    <http://www.xoltar.org/languages/haskell/CSV.hs>: strict parser
+  .
+  * @lazy-csv@: lazy @String@ and @ByteString@ parser
+  .
+  * @cassava@: high-level CSV parser that treats rows as records,
+    parses ByteStrings and is biased towards UTF-8 encoding.
+Tested-With:       GHC==7.4.2, GHC==7.8.4
+Cabal-Version:     >=1.8
+Build-Type:        Simple
+Extra-Source-Files:
+  README.md
+
+Source-Repository head
+  Type:     darcs
+  Location: http://code.haskell.org/~thielema/spreadsheet/
+
+Source-Repository this
+  Tag:      0.1.3.7
+  Type:     darcs
+  Location: http://code.haskell.org/~thielema/spreadsheet/
+
+Flag buildExamples
+  description: Build example executables
+  default:     False
+
+Flag splitBase
+  description: Choose the new smaller, split-up base package.
+
+Library
+  Build-Depends:
+    utility-ht >=0.0.2 && <0.1,
+    transformers >=0.2 && <0.6,
+    explicit-exception >=0.1 && <0.2
+  If flag(splitBase)
+    Build-Depends: base >= 2 && <5
+  Else
+    Build-Depends: base >= 1.0 && < 2
+
+  GHC-Options:      -Wall
+  Hs-Source-Dirs:   src
+  Exposed-Modules:
+    Data.Spreadsheet
+  Other-Modules:
+    Data.Spreadsheet.Parser
+    Data.Spreadsheet.CharSource
+
+Executable csvreplace
+  If flag(buildExamples)
+    Build-Depends:
+      spreadsheet,
+      optparse-applicative >=0.12 && <0.15,
+      utility-ht,
+      explicit-exception,
+      base
+  Else
+    Buildable:      False
+  GHC-Options:      -Wall
+  Hs-Source-Dirs:   example
+  Main-Is: CSVReplace.hs
+  Other-Modules:
+    CSVReplace.Option
+    Option
+
+Executable csvextract
+  If flag(buildExamples)
+    Build-Depends:
+      spreadsheet,
+      optparse-applicative >=0.12 && <0.15,
+      containers >=0.4.2 && <0.6,
+      utility-ht,
+      base
+  Else
+    Buildable:      False
+  GHC-Options:      -Wall
+  Hs-Source-Dirs:   example
+  Main-Is: CSVExtract.hs
+  Other-Modules:
+    CSVExtract.Option
+    Option
diff --git a/test/golden-test-cases/spreadsheet.nix.golden b/test/golden-test-cases/spreadsheet.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/spreadsheet.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, explicit-exception, fetchurl, transformers
+, utility-ht
+}:
+mkDerivation {
+  pname = "spreadsheet";
+  version = "0.1.3.7";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base explicit-exception transformers utility-ht
+  ];
+  homepage = "http://www.haskell.org/haskellwiki/Spreadsheet";
+  description = "Read and write spreadsheets from and to CSV files in a lazy way";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/stack-type.cabal b/test/golden-test-cases/stack-type.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stack-type.cabal
@@ -0,0 +1,25 @@
+name:                stack-type
+version:             0.1.0.0
+synopsis:            The basic stack type
+description:         Please see README.md
+homepage:            https://github.com/aiya000/hs-stack-type
+license:             MIT
+license-file:        LICENSE
+author:              aiya000
+maintainer:          aiya000.develop@gmail.com
+copyright:           aiya000
+category:            Simple
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Data.Stack
+  build-depends:       base >= 4.7 && < 5
+                     , transformers
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/aiya000/hs-stack-type
diff --git a/test/golden-test-cases/stack-type.nix.golden b/test/golden-test-cases/stack-type.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stack-type.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, transformers }:
+mkDerivation {
+  pname = "stack-type";
+  version = "0.1.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base transformers ];
+  homepage = "https://github.com/aiya000/hs-stack-type";
+  description = "The basic stack type";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/state-codes.cabal b/test/golden-test-cases/state-codes.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/state-codes.cabal
@@ -0,0 +1,60 @@
+name:                state-codes
+version:             0.1.3
+synopsis:            ISO 3166-2:US state codes and i18n names
+description:         This package provides the ISO 3166-2:US state codes and i18n names
+homepage:            https://github.com/acamino/state-codes#README
+license:             MIT
+license-file:        LICENSE
+author:              Agustin Camino
+maintainer:          agustin.camino@gmail.com
+copyright:           2017 Agustin Camino
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:  README.md
+
+
+flag dev
+  description:        Turn on development settings
+  manual:             True
+  default:            False
+
+
+source-repository head
+  type:      git
+  location:  https://github.com/acamino/state-codes.git
+
+
+library
+  hs-source-dirs:   src
+  build-depends:
+      base                 >= 4.7  && < 5
+    , text
+    , aeson
+    , shakespeare
+  if flag(dev)
+    ghc-options:       -Wall -Werror
+  else
+    ghc-options:       -O2 -Wall
+  other-modules:    Data.StateCodes.ISO31662US
+  exposed-modules:  Data.StateCodes
+  default-language: Haskell2010
+
+test-suite state-codes-test
+  main-is:          Spec.hs
+  type:             exitcode-stdio-1.0
+  hs-source-dirs:   test
+  other-modules:    Data.StateCodesSpec
+
+  build-depends:    base                   >= 4.7   && < 5.0
+                  , aeson
+                  , hspec
+                  , QuickCheck
+                  , state-codes
+                  , text
+
+  if flag(dev)
+    ghc-options:       -Wall -Werror
+  else
+    ghc-options:       -O2 -Wall
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/state-codes.nix.golden b/test/golden-test-cases/state-codes.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/state-codes.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, aeson, base, fetchurl, hspec, QuickCheck
+, shakespeare, text
+}:
+mkDerivation {
+  pname = "state-codes";
+  version = "0.1.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ aeson base shakespeare text ];
+  testHaskellDepends = [ aeson base hspec QuickCheck text ];
+  homepage = "https://github.com/acamino/state-codes#README";
+  description = "ISO 3166-2:US state codes and i18n names";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/stb-image-redux.cabal b/test/golden-test-cases/stb-image-redux.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stb-image-redux.cabal
@@ -0,0 +1,45 @@
+name:                stb-image-redux
+version:             0.2.1.2
+synopsis:            Image loading and writing microlibrary
+description:         See <https://github.com/typedrat/stb-image-redux/blob/master/README.md>.
+homepage:            https://github.com/typedrat/stb-image-redux#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Alexis Williams
+maintainer:          alexis@typedr.at
+copyright:           Copyright: (c) 2017 Alexis Williams
+category:            Graphics
+build-type:          Simple
+extra-source-files:  test/jellybeans.tga test/jellybeans.bmp test/jellybeans-flipped.bmp stb/stb_image.h stb/stb_image_write.h
+cabal-version:       >=1.10
+
+library
+    hs-source-dirs:      src
+    exposed-modules:     Data.STBImage
+    other-modules:       Data.STBImage.Color
+                       , Data.STBImage.ColorTypes
+                       , Data.STBImage.Immutable
+    build-depends:       base       >= 4.8       && < 5
+                       , vector     >= 0.10.12.3 && < 0.13
+    c-sources:           src/stb_image.c
+                       , src/stb_image_write.c
+    include-dirs:        stb
+    cc-options:          -DSTBI_NO_HDR -DSTBI_NO_LINEAR -DSTBI_FAILURE_USERMSG
+    default-language:    Haskell2010
+
+
+test-suite stb-image-redux-tests
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  other-modules:       Data.STBImageSpec
+  build-depends:       base
+                     , stb-image-redux
+                     , vector     >= 0.10.12.3 && < 0.13
+                     , hspec      >= 2.1.5     && < 2.5
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+source-repository head
+    type:     git
+    location: https://github.com/typedrat/stb-image-redux
diff --git a/test/golden-test-cases/stb-image-redux.nix.golden b/test/golden-test-cases/stb-image-redux.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stb-image-redux.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, hspec, vector }:
+mkDerivation {
+  pname = "stb-image-redux";
+  version = "0.2.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base vector ];
+  testHaskellDepends = [ base hspec vector ];
+  homepage = "https://github.com/typedrat/stb-image-redux#readme";
+  description = "Image loading and writing microlibrary";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/stm-containers.cabal b/test/golden-test-cases/stm-containers.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stm-containers.cabal
@@ -0,0 +1,251 @@
+name:
+  stm-containers
+version:
+  0.2.16
+synopsis:
+  Containers for STM
+description:
+  This library is based on an STM-specialized implementation of
+  Hash Array Mapped Trie.
+  It provides efficient implementations of @Map@, @Set@
+  and other data structures,
+  which are marginally slower than their counterparts from \"unordered-containers\",
+  but scale well on concurrent access patterns.
+  .
+  For details on performance of the library see
+  <http://nikita-volkov.github.io/stm-containers/ this blog post>.
+category:
+  Data Structures, STM, Concurrency
+homepage:
+  https://github.com/nikita-volkov/stm-containers
+bug-reports:
+  https://github.com/nikita-volkov/stm-containers/issues
+author:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+maintainer:
+  Nikita Volkov <nikita.y.volkov@mail.ru>
+copyright:
+  (c) 2014, Nikita Volkov
+license:
+  MIT
+license-file:
+  LICENSE
+build-type:
+  Simple
+cabal-version:
+  >=1.10
+
+
+source-repository head
+  type:
+    git
+  location:
+    git://github.com/nikita-volkov/stm-containers.git
+
+
+library
+  hs-source-dirs:
+    library
+  other-modules:
+    STMContainers.Prelude
+    STMContainers.WordArray.Indices
+    STMContainers.WordArray
+    STMContainers.SizedArray
+    STMContainers.HAMT.Level
+    STMContainers.HAMT.Nodes
+    STMContainers.HAMT
+  exposed-modules:
+    STMContainers.Bimap
+    STMContainers.Multimap
+    STMContainers.Map
+    STMContainers.Set
+  build-depends:
+    -- data:
+    hashable < 2,
+    -- control:
+    list-t >= 0.2 && < 2,
+    focus >= 0.1.2 && < 0.2,
+    transformers >= 0.3 && < 0.6,
+    -- general:
+    primitive >= 0.5 && < 0.7,
+    base-prelude < 2,
+    base < 5
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+
+
+test-suite word-array-tests
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    executables
+    library
+  main-is:
+    WordArrayTests.hs
+  other-modules:
+    WordArrayTests.Update
+  build-depends:
+    -- testing:
+    free >= 4.6 && < 5,
+    mtl == 2.*,
+    QuickCheck >= 2.6 && < 3,
+    HTF == 0.13.*,
+    -- data:
+    hashable,
+    -- control:
+    list-t,
+    focus,
+    transformers,
+    -- debugging:
+    loch-th == 0.2.*,
+    placeholders == 0.1.*,
+    -- general:
+    primitive,
+    mtl-prelude < 3,
+    base-prelude,
+    base
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+
+
+test-suite api-tests
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    executables
+  main-is:
+    APITests.hs
+  other-modules:
+    APITests.MapTests
+    APITests.MapTests.Update
+  build-depends:
+    QuickCheck >= 2.7 && < 3,
+    HTF == 0.13.*,
+    stm-containers,
+    -- debugging:
+    loch-th == 0.2.*,
+    placeholders == 0.1.*,
+    -- general:
+    list-t,
+    focus,
+    unordered-containers == 0.2.*,
+    free >= 4.6 && < 5,
+    mtl == 2.*,
+    hashable,
+    mtl-prelude < 3,
+    base-prelude,
+    base
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+
+
+benchmark insertion-bench
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    executables
+  main-is:
+    InsertionBench.hs
+  ghc-options:
+    -O2 -threaded "-with-rtsopts=-N"
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  build-depends:
+    mwc-random == 0.13.*,
+    mwc-random-monad == 0.7.*,
+    criterion == 1.1.*,
+    -- data:
+    text < 1.3,
+    list-t,
+    focus,
+    hashable,
+    hashtables >= 1.1 && < 1.3,
+    containers == 0.5.*,
+    unordered-containers == 0.2.*,
+    stm-containers,
+    -- debugging:
+    loch-th == 0.2.*,
+    placeholders == 0.1.*,
+    -- general:
+    base-prelude,
+    base
+
+
+benchmark concurrent-insertion-bench
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    executables
+  main-is:
+    ConcurrentInsertionBench.hs
+  ghc-options:
+    -O2 -threaded "-with-rtsopts=-N"
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  build-depends:
+    criterion == 1.1.*,
+    mwc-random == 0.13.*,
+    mwc-random-monad == 0.7.*,
+    -- data:
+    vector,
+    text < 2,
+    list-t,
+    focus,
+    unordered-containers == 0.2.*,
+    hashable,
+    stm-containers,
+    -- debugging:
+    loch-th == 0.2.*,
+    placeholders == 0.1.*,
+    -- general:
+    free >= 4.5 && < 5,
+    async >= 2.0 && < 3,
+    base-prelude,
+    base
+
+
+benchmark concurrent-transactions-bench
+  type:
+    exitcode-stdio-1.0
+  hs-source-dirs:
+    executables
+  main-is:
+    ConcurrentTransactionsBench.hs
+  ghc-options:
+    -O2 -threaded "-with-rtsopts=-N"
+  default-extensions:
+    Arrows, BangPatterns, ConstraintKinds, DataKinds, DefaultSignatures, DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric, DeriveTraversable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GADTs, GeneralizedNewtypeDeriving, LambdaCase, LiberalTypeSynonyms, MagicHash, MultiParamTypeClasses, MultiWayIf, NoImplicitPrelude, NoMonomorphismRestriction, OverloadedStrings, PatternGuards, ParallelListComp, QuasiQuotes, RankNTypes, RecordWildCards, ScopedTypeVariables, StandaloneDeriving, TemplateHaskell, TupleSections, TypeFamilies, TypeOperators, UnboxedTuples
+  default-language:
+    Haskell2010
+  build-depends:
+    criterion == 1.1.*,
+    mwc-random == 0.13.*,
+    mwc-random-monad == 0.7.*,
+    -- data:
+    containers >= 0.5.2 && < 0.6,
+    text < 2,
+    list-t,
+    focus,
+    unordered-containers == 0.2.*,
+    hashable,
+    stm-containers,
+    -- debugging:
+    loch-th == 0.2.*,
+    placeholders == 0.1.*,
+    -- general:
+    mtl == 2.*,
+    free >= 4.5 && < 5,
+    async >= 2.0 && < 3,
+    mtl-prelude < 3,
+    base-prelude,
+    base
diff --git a/test/golden-test-cases/stm-containers.nix.golden b/test/golden-test-cases/stm-containers.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stm-containers.nix.golden
@@ -0,0 +1,30 @@
+{ mkDerivation, async, base, base-prelude, containers, criterion
+, fetchurl, focus, free, hashable, hashtables, HTF, list-t, loch-th
+, mtl, mtl-prelude, mwc-random, mwc-random-monad, placeholders
+, primitive, QuickCheck, text, transformers, unordered-containers
+, vector
+}:
+mkDerivation {
+  pname = "stm-containers";
+  version = "0.2.16";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base base-prelude focus hashable list-t primitive transformers
+  ];
+  testHaskellDepends = [
+    base base-prelude focus free hashable HTF list-t loch-th mtl
+    mtl-prelude placeholders primitive QuickCheck transformers
+    unordered-containers
+  ];
+  benchmarkHaskellDepends = [
+    async base base-prelude containers criterion focus free hashable
+    hashtables list-t loch-th mtl mtl-prelude mwc-random
+    mwc-random-monad placeholders text unordered-containers vector
+  ];
+  homepage = "https://github.com/nikita-volkov/stm-containers";
+  description = "Containers for STM";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/streaming-commons.cabal b/test/golden-test-cases/streaming-commons.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/streaming-commons.cabal
@@ -0,0 +1,161 @@
+name:                streaming-commons
+version:             0.1.18
+synopsis:            Common lower-level functions needed by various streaming data libraries
+description:         Provides low-dependency functionality commonly needed by various streaming data libraries, such as conduit and pipes.
+homepage:            https://github.com/fpco/streaming-commons
+license:             MIT
+license-file:        LICENSE
+author:              Michael Snoyman, Emanuel Borsboom
+maintainer:          michael@snoyman.com
+-- copyright:           
+category:            Data
+build-type:          Simple
+cabal-version:       >=1.8
+extra-source-files:
+    test/filesystem/*.txt
+    test/filesystem/bin/*.txt
+    include/*.h
+    cbits/*.c
+    test/LICENSE.gz
+    ChangeLog.md
+    README.md
+
+flag use-bytestring-builder
+  description: Use bytestring-builder package
+  default: False
+
+library
+  exposed-modules:     Data.Streaming.Blaze
+                       Data.Streaming.ByteString.Builder
+                       Data.Streaming.ByteString.Builder.Buffer
+                       Data.Streaming.ByteString.Builder.Class
+                       Data.Streaming.FileRead
+                       Data.Streaming.Filesystem
+                       Data.Streaming.Network
+                       Data.Streaming.Network.Internal
+                       Data.Streaming.Process
+                       Data.Streaming.Process.Internal
+                       Data.Streaming.Text
+                       Data.Streaming.Zlib
+                       Data.Streaming.Zlib.Lowlevel
+
+  -- Due to cabal bugs, not making inclusion of this dependent on text version.
+  -- For more information, see: https://github.com/fpco/text-stream-decode/issues/1
+  other-modules:       Data.Text.Internal.Unsafe.Char
+                       Data.Text.Internal.Unsafe.Shift
+                       Data.Text.Internal.Encoding.Utf8
+                       Data.Text.Internal.Encoding.Utf16
+                       Data.Text.Internal.Encoding.Utf32
+
+  build-depends:       base >= 4.4 && < 5
+                     , array
+                     , async
+                     , blaze-builder >= 0.3 && < 0.5
+                     , bytestring
+                     , directory
+                     , network >= 2.4.0.0
+                     , random
+                     , process
+                     , stm
+                     , text
+                     , transformers
+                     , zlib
+
+  c-sources:           cbits/zlib-helper.c
+                       cbits/text-helper.c
+  include-dirs:        include
+
+  if os(windows)
+    build-depends:     Win32
+                     , filepath
+    cpp-options:       -DWINDOWS
+    other-modules:     System.Win32File
+  else
+    build-depends:     unix
+
+  if flag(use-bytestring-builder)
+    build-depends:     bytestring < 0.10.2.0
+                     , bytestring-builder
+  else
+    build-depends:     bytestring >= 0.10.2.0
+
+test-suite test
+    hs-source-dirs: test
+    main-is:        Spec.hs
+    type:           exitcode-stdio-1.0
+    ghc-options:    -Wall -threaded
+    other-modules:  Data.Streaming.ByteString.BuilderSpec
+                    Data.Streaming.BlazeSpec
+                    Data.Streaming.FileReadSpec
+                    Data.Streaming.FilesystemSpec
+                    Data.Streaming.NetworkSpec
+                    Data.Streaming.ProcessSpec
+                    Data.Streaming.TextSpec
+                    Data.Streaming.ZlibSpec
+    build-depends:  base
+                  , streaming-commons
+                  , hspec >= 1.8
+
+                  , QuickCheck
+                  , array
+                  , async
+                  , blaze-builder
+                  , bytestring
+                  , deepseq
+                  , network >= 2.4.0.0
+                  , text
+                  , zlib
+
+  if flag(use-bytestring-builder)
+    build-depends:     bytestring < 0.10.2.0
+                     , bytestring-builder
+  else
+    build-depends:     bytestring >= 0.10.2.0
+
+  if os(windows)
+    cpp-options:       -DWINDOWS
+  else
+    build-depends:     unix
+
+benchmark count-chars
+    type: exitcode-stdio-1.0
+    hs-source-dirs: bench
+    build-depends:  base
+                  , criterion
+                  , bytestring
+                  , text
+                  , streaming-commons
+    main-is:        count-chars.hs
+    ghc-options:    -Wall -O2
+
+benchmark decode-memory-usage
+    type: exitcode-stdio-1.0
+    hs-source-dirs: bench
+    build-depends:  base
+                  , bytestring
+                  , text
+                  , streaming-commons
+    main-is:        decode-memory-usage.hs
+    ghc-options:    -Wall -O2 -with-rtsopts=-s
+
+benchmark builder-to-bytestring-io
+    type: exitcode-stdio-1.0
+    hs-source-dirs: bench
+    main-is:        builder-to-bytestring-io.hs
+    ghc-options:    -Wall -O2
+    build-depends:  base
+                  , blaze-builder
+                  , bytestring
+                  , criterion
+                  , deepseq
+                  , streaming-commons
+
+  if flag(use-bytestring-builder)
+    build-depends:     bytestring < 0.10.2.0
+                     , bytestring-builder
+  else
+    build-depends:     bytestring >= 0.10.2.0
+
+source-repository head
+  type:     git
+  location: git://github.com/fpco/streaming-commons.git
diff --git a/test/golden-test-cases/streaming-commons.nix.golden b/test/golden-test-cases/streaming-commons.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/streaming-commons.nix.golden
@@ -0,0 +1,26 @@
+{ mkDerivation, array, async, base, blaze-builder, bytestring
+, criterion, deepseq, directory, fetchurl, hspec, network, process
+, QuickCheck, random, stm, text, transformers, unix, zlib
+}:
+mkDerivation {
+  pname = "streaming-commons";
+  version = "0.1.18";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array async base blaze-builder bytestring directory network process
+    random stm text transformers unix zlib
+  ];
+  testHaskellDepends = [
+    array async base blaze-builder bytestring deepseq hspec network
+    QuickCheck text unix zlib
+  ];
+  benchmarkHaskellDepends = [
+    base blaze-builder bytestring criterion deepseq text
+  ];
+  homepage = "https://github.com/fpco/streaming-commons";
+  description = "Common lower-level functions needed by various streaming data libraries";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/strict-base-types.cabal b/test/golden-test-cases/strict-base-types.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/strict-base-types.cabal
@@ -0,0 +1,130 @@
+Name:           strict-base-types
+Version:        0.5.0
+Synopsis:       Strict variants of the types provided in base.
+Category:       Data
+Description:
+     It is common knowledge that lazy datastructures can lead to space-leaks.
+     This problem is particularly prominent, when using lazy datastructures to
+     store the state of a long-running application in memory. The easiest
+     solution to this problem is to use fully strict types to store such state
+     values. By \"fully strict types\" we mean types for whose values it holds
+     that, if they are in weak-head normal form, then they are also in normal
+     form. Intuitively, this means that values of fully strict types cannot
+     contain unevaluated thunks.
+     .
+     To define a fully strict datatype, one typically uses the following recipe.
+     .
+     1. Make all fields of every constructor strict; i.e., add a bang to
+        all fields.
+     .
+     2. Use only strict types for the fields of the constructors.
+     .
+     The second requirement is problematic as it rules out the use of
+     the standard Haskell 'Maybe', 'Either', and pair types. This library
+     solves this problem by providing strict variants of these types and their
+     corresponding standard support functions and type-class instances.
+     .
+     Note that this library does currently not provide fully strict lists.
+     They can be added if they are really required. However, in many cases one
+     probably wants to use unboxed or strict boxed vectors from the 'vector'
+     library (<http://hackage.haskell.org/package/vector>) instead of strict
+     lists.  Moreover, instead of @String@s one probably wants to use strict
+     @Text@ values from the @text@ library
+     (<http://hackage.haskell.org/package/text>).
+     .
+     This library comes with batteries included; i.e., missing instances
+     for type-classes from the @deepseq@, @binary@, @aeson@, @QuickCheck@, and
+     @lens@ packages are included. Of particluar interest is the @Strict@
+     type-class provided by the lens library
+     (<http://hackage.haskell.org/packages/archive/lens/3.9.0.2/doc/html/Control-Lens-Iso.html#t:Strict>).
+     It is used in the following example to simplify the modification of
+     strict fields.
+     .
+     > (-# LANGUAGE TemplateHaskell #-)   -- replace with curly braces,
+     > (-# LANGUAGE OverloadedStrings #-) -- the Haddock prologues are a P.I.T.A!
+     >
+     > import           Control.Lens ( (.=), Strict(strict), from, Iso', makeLenses)
+     > import           Control.Monad.State.Strict (State)
+     > import qualified Data.Map                   as M
+     > import qualified Data.Maybe.Strict          as S
+     > import qualified Data.Text                  as T
+     >
+     > -- | An example of a state record as it could be used in a (very minimal)
+     > -- role-playing game.
+     > data GameState = GameState
+     >     ( _gsCooldown :: !(S.Maybe Int)
+     >     , _gsHealth   :: !Int
+     >     )  -- replace with curly braces, *grmbl*
+     >
+     > makeLenses ''GameState
+     >
+     > -- The isomorphism, which converts a strict field to its lazy variant
+     > lazy :: Strict lazy strict => Iso' strict lazy
+     > lazy = from strict
+     >
+     > type Game = State GameState
+     >
+     > cast :: T.Text -> Game ()
+     > cast spell =
+     >     gsCooldown.lazy .= M.lookup spell spellDuration
+     >     -- ... implement remainder of spell-casting ...
+     >   where
+     >     spellDuration = M.fromList [("fireball", 5)]
+     .
+     See
+     <http://www.haskellforall.com/2013/05/program-imperatively-using-haskell.html>
+     for a gentle introduction to lenses and state manipulation.
+     .
+     Note that this package uses the types provided by the 'strict' package
+     (<http://hackage.haskell.org/package/strict>), but organizes them a bit
+     differently. More precisely, the @strict-base-types@ package
+     .
+     - only provides the fully strict variants of types from 'base',
+     .
+     - is in-sync with the current base library (base-4.6),
+     .
+     - provides the missing instances for (future) Haskell platform packages, and
+     .
+     - conforms to the standard policy that strictness variants of an existing
+       datatype are identified by suffixing \'Strict\' or \'Lazy\' in the
+       module hierarchy.
+
+
+License:        BSD3
+License-File:   LICENSE
+Author:         Roman Leshchinskiy <rl@cse.unsw.edu.au>,
+                Simon Meier <iridcode@gmail.com>
+Maintainer:     Simon Meier <iridcode@gmail.com>
+Copyright:      (c) 2006-2008 by Roman Leshchinskiy
+                (c) 2013-2014 by Simon Meier
+Homepage:       https://github.com/meiersi/strict-base-types
+Cabal-Version: >= 1.6
+Build-type:     Simple
+Tested-with:    GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.2
+
+extra-source-files:
+  CHANGES
+
+source-repository head
+  type:     git
+  location: https://github.com/meiersi/strict-base-types.git
+
+library
+  ghc-options:    -Wall -fwarn-incomplete-uni-patterns
+  build-depends:
+      base       >= 4.5 && < 5
+    , lens       >= 3.9
+    , QuickCheck >= 2
+    , aeson      >= 0.6
+    , binary     >= 0.5
+    , deepseq    >= 1.3
+    , hashable   >= 1.1.1.0
+    , strict     == 0.3.*
+    , bifunctors >= 3.0
+    , ghc-prim
+  hs-source-dirs:    src
+  exposed-modules:
+      Data.Tuple.Strict
+      Data.Maybe.Strict
+      Data.Either.Strict
+
diff --git a/test/golden-test-cases/strict-base-types.nix.golden b/test/golden-test-cases/strict-base-types.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/strict-base-types.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, aeson, base, bifunctors, binary, deepseq, fetchurl
+, ghc-prim, hashable, lens, QuickCheck, strict
+}:
+mkDerivation {
+  pname = "strict-base-types";
+  version = "0.5.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bifunctors binary deepseq ghc-prim hashable lens
+    QuickCheck strict
+  ];
+  homepage = "https://github.com/meiersi/strict-base-types";
+  description = "Strict variants of the types provided in base";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/strict-types.cabal b/test/golden-test-cases/strict-types.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/strict-types.cabal
@@ -0,0 +1,34 @@
+name:           strict-types
+author:         Pepe Iborra
+version:        0.1.2
+license:        BSD3
+license-file:   LICENSE
+copyright:      Jose Iborra Lopez, 2017
+maintainer:     Pepe Iborra (pepeiborra@gmail.com)
+synopsis:       A type level predicate ranging over strict types
+description:    A type class for types T where forall x :: T . rnf x = ⊥ \<=\> rwhnf x = ⊥
+build-type:     Simple
+cabal-version:  >= 1.10
+homepage:       https://github.com/pepeiborra/strict-types
+extra-source-files:  README.md
+
+library
+  hs-source-dirs:
+      src
+  build-depends:
+      base < 5, 
+      array, 
+      bytestring, 
+      containers, 
+      deepseq,
+      hashable, 
+      text, 
+      unordered-containers, 
+      vector
+  exposed-modules:
+      Data.Strict.Forced,
+      Data.Strict.HashMap,
+      Type.Strict
+  other-modules:
+      Paths_strict_types
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/strict-types.nix.golden b/test/golden-test-cases/strict-types.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/strict-types.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, array, base, bytestring, containers, deepseq
+, fetchurl, hashable, text, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "strict-types";
+  version = "0.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array base bytestring containers deepseq hashable text
+    unordered-containers vector
+  ];
+  homepage = "https://github.com/pepeiborra/strict-types";
+  description = "A type level predicate ranging over strict types";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/string-class.cabal b/test/golden-test-cases/string-class.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/string-class.cabal
@@ -0,0 +1,60 @@
+name:               string-class
+-- Don't forget to bump the tag and CHANGELOG placeholder too.
+version:            0.1.6.5
+cabal-version:      >= 1.18
+build-type:         Simple
+license:            BSD3
+license-file:       LICENSE
+copyright:          Copyright (C) 2010 Byron James Johnson
+author:             Byron James Johnson
+maintainer:         ByronJohnsonFP@gmail.com
+category:           Data, Text
+homepage:           https://github.com/bairyn/string-class
+bug-reports:        https://github.com/bairyn/string-class/issues
+tested-with:        GHC == 7.8.3
+extra-source-files:
+-- The extra-doc-files property requires cabal-version >= 1.18.
+extra-doc-files:
+  README.md
+ ,CHANGELOG.md
+synopsis:           String class library
+description:
+  String class library.
+
+library
+  default-language: Haskell2010
+  hs-source-dirs:   src
+  ghc-options:      -Wall
+  default-extensions:
+    --,GADTs
+    --,TemplateHaskell
+    DeriveDataTypeable
+  other-extensions:
+    TypeFamilies
+   ,FlexibleContexts
+   ,TypeSynonymInstances
+   ,ExistentialQuantification
+   ,DeriveDataTypeable
+   ,FlexibleInstances
+   ,UndecidableInstances
+  -- Haven't thoroughly checked version bounds.
+  -- I added as the minimum version for each non-base package the most recent
+  -- version as of this repository's initial commit.
+  build-depends:
+    base       >= 4        && < 5
+   -- bytestring's toStrict and fromString methods were first introduced in 0.10.0.0.
+   --,bytestring >= 0.9.1.8  && < 0.11
+   ,bytestring >= 0.10.0.0 && < 0.11
+   ,text       >= 0.11.0.1 && < 1.3
+   ,tagged     >= 0.1.1    && < 0.9
+  exposed-modules:
+    Data.String.Class
+
+source-repository head
+  type:     git
+  location: git@github.com:bairyn/string-class.git
+
+source-repository this
+  type:     git
+  location: git@github.com:bairyn/string-class.git
+  tag:      v0.1.6.4
diff --git a/test/golden-test-cases/string-class.nix.golden b/test/golden-test-cases/string-class.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/string-class.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, bytestring, fetchurl, tagged, text }:
+mkDerivation {
+  pname = "string-class";
+  version = "0.1.6.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring tagged text ];
+  homepage = "https://github.com/bairyn/string-class";
+  description = "String class library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/stripe-haskell.cabal b/test/golden-test-cases/stripe-haskell.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stripe-haskell.cabal
@@ -0,0 +1,35 @@
+name:                stripe-haskell
+version:             2.2.3
+synopsis:            Stripe API for Haskell
+license:             MIT
+license-file:        LICENSE
+author:              David Johnson, Jeremy Shaw
+maintainer:          djohnson.m@gmail.com
+copyright:           Copyright (c) 2016 David M. Johnson, Jeremy Shaw
+homepage:            https://github.com/dmjio/stripe
+bug-reports:         https://github.com/dmjio/stripe/issues
+category:            Web
+build-type:          Simple
+cabal-version:       >=1.10
+Description:         For usage information please consult README.md
+
+extra-source-files:
+   README.md
+
+library
+  hs-source-dirs:      src src-http-streams
+  build-depends:       base                >= 4   && < 5,
+                       stripe-core         >= 2.0 && < 2.3,
+                       stripe-http-streams >= 2.0 && < 2.3
+
+  default-language:    Haskell2010
+  exposed-modules:
+                       Web.Stripe
+                       Web.Stripe.Client.Stripe
+
+  ghc-options:        -Wall
+
+source-repository head
+  type:     git
+  location: git://github.com/dmjio/stripe.git
+  subdir: stripe
diff --git a/test/golden-test-cases/stripe-haskell.nix.golden b/test/golden-test-cases/stripe-haskell.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/stripe-haskell.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, stripe-core, stripe-http-streams }:
+mkDerivation {
+  pname = "stripe-haskell";
+  version = "2.2.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base stripe-core stripe-http-streams ];
+  homepage = "https://github.com/dmjio/stripe";
+  description = "Stripe API for Haskell";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/svg-tree.cabal b/test/golden-test-cases/svg-tree.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/svg-tree.cabal
@@ -0,0 +1,61 @@
+name:                svg-tree
+version:             0.6.2.1
+synopsis:            SVG file loader and serializer
+description:
+  svg-tree provides types representing a SVG document,
+  and allows to load and save it.
+  .
+  The types definition are aimed at rendering,
+  so they are rather comple. For simpler SVG document building,
+  look after `lucid-svg`.
+  .
+  To render an svg document you can use the `rasterific-svg` package
+
+
+license:             BSD3
+author:              Vincent Berthoux
+maintainer:          Vincent Berthoux
+-- copyright:
+category:            Graphics, Svg
+build-type:          Simple
+cabal-version:       >=1.10
+
+extra-source-files: changelog.md
+
+Source-Repository head
+    Type:      git
+    Location:  git://github.com/Twinside/svg-tree.git
+
+Source-Repository this
+    Type:      git
+    Location:  git://github.com/Twinside/svg-tree.git
+    Tag:       v0.6.2.1
+
+library
+  hs-source-dirs: src
+  Ghc-options: -O3 -Wall
+  default-language: Haskell2010
+  exposed-modules: Graphics.Svg
+                 , Graphics.Svg.CssTypes
+                 , Graphics.Svg.Types
+
+  other-modules: Graphics.Svg.NamedColors
+               , Graphics.Svg.XmlParser
+               , Graphics.Svg.PathParser
+               , Graphics.Svg.CssParser
+               , Graphics.Svg.ColorParser
+
+  build-depends: base >= 4.5 && < 5
+               , JuicyPixels >= 3.2
+               , attoparsec >= 0.12
+               , scientific >= 0.3
+               , containers >= 0.4
+               , xml        >= 1.3
+               , bytestring >= 0.10
+               , linear     >= 1.20
+               , vector     >= 0.10
+               , text       >= 1.1
+               , transformers >= 0.3 && < 0.6
+               , mtl        >= 2.1 && < 2.3
+               , lens       >= 4.6 && < 5
+
diff --git a/test/golden-test-cases/svg-tree.nix.golden b/test/golden-test-cases/svg-tree.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/svg-tree.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, attoparsec, base, bytestring, containers, fetchurl
+, JuicyPixels, lens, linear, mtl, scientific, text, transformers
+, vector, xml
+}:
+mkDerivation {
+  pname = "svg-tree";
+  version = "0.6.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base bytestring containers JuicyPixels lens linear mtl
+    scientific text transformers vector xml
+  ];
+  description = "SVG file loader and serializer";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/swagger.cabal b/test/golden-test-cases/swagger.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/swagger.cabal
@@ -0,0 +1,61 @@
+name:                 swagger
+version:              0.3.0
+synopsis:             Implementation of swagger data model
+author:               Toralf Wittner
+maintainer:           Toralf Wittner <tw@dtex.org>
+copyright:            (C) 2014-2015 Toralf Wittner
+license:              OtherLicense
+license-file:         LICENSE
+category:             Data
+build-type:           Simple
+cabal-version:        >= 1.10
+
+description:
+    Implementation of Swagger specification version 1.2 as defined in
+    <https://github.com/wordnik/swagger-spec/blob/master/versions/1.2.md>
+
+source-repository head
+    type:             git
+    location:         https://gitlab.com/twittner/swagger.git
+
+library
+    default-language: Haskell2010
+    hs-source-dirs:   src
+    ghc-options:      -Wall -O2 -fwarn-tabs
+
+    exposed-modules:
+        Data.Swagger.Build.Api
+        Data.Swagger.Build.Authorisation
+        Data.Swagger.Build.Resource
+        Data.Swagger.Model.Api
+        Data.Swagger.Model.Authorisation
+        Data.Swagger.Model.Resource
+
+    other-modules:
+        Data.Swagger.Build.Util
+        Data.Swagger.Model.Util
+
+    build-depends:
+          aeson        >= 0.6
+        , base         >= 4.6    && < 5.0
+        , bytestring   >= 0.10.4
+        , text         >= 0.11
+        , time         >= 1.4
+        , transformers >= 0.3
+
+test-suite tests
+    type:             exitcode-stdio-1.0
+    default-language: Haskell2010
+    main-is:          Main.hs
+    hs-source-dirs:   test
+    ghc-options:      -threaded -Wall -O2 -fwarn-tabs
+    other-modules:    Test.Api
+
+    build-depends:
+          aeson
+        , base
+        , bytestring
+        , swagger
+        , tasty       >= 0.8
+        , tasty-hunit >= 0.8
+
diff --git a/test/golden-test-cases/swagger.nix.golden b/test/golden-test-cases/swagger.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/swagger.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, aeson, base, bytestring, fetchurl, tasty
+, tasty-hunit, text, time, transformers
+}:
+mkDerivation {
+  pname = "swagger";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bytestring text time transformers
+  ];
+  testHaskellDepends = [ aeson base bytestring tasty tasty-hunit ];
+  description = "Implementation of swagger data model";
+  license = "unknown";
+}
diff --git a/test/golden-test-cases/system-argv0.cabal b/test/golden-test-cases/system-argv0.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/system-argv0.cabal
@@ -0,0 +1,42 @@
+name: system-argv0
+version: 0.1.1
+license: MIT
+license-file: license.txt
+author: John Millikin <jmillikin@gmail.com>
+maintainer: John Millikin <jmillikin@gmail.com>
+build-type: Simple
+cabal-version: >= 1.6
+category: System
+stability: experimental
+homepage: https://john-millikin.com/software/haskell-filesystem/
+bug-reports: mailto:jmillikin@gmail.com
+
+synopsis: Get argv[0] as a FilePath.
+description:
+  Get @argv[0]@ as a FilePath. This is how the program was invoked, and might
+  not correspond to any actual file.
+  .
+  Use this instead of @System.Environment.getProgName@ if you want the full
+  path, and not just the last component.
+
+source-repository head
+  type: bazaar
+  location: https://john-millikin.com/branches/system-argv0/0.1/
+
+source-repository this
+  type: bazaar
+  location: https://john-millikin.com/branches/system-argv0/0.1/
+  tag: system-argv0_0.1.1
+
+library
+  hs-source-dirs: lib
+  ghc-options: -Wall -O2
+
+  build-depends:
+      base >= 4.0 && < 5.0
+    , bytestring
+    , system-filepath >= 0.3 && < 0.5
+    , text
+
+  exposed-modules:
+    System.Argv0
diff --git a/test/golden-test-cases/system-argv0.nix.golden b/test/golden-test-cases/system-argv0.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/system-argv0.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, bytestring, fetchurl, system-filepath, text
+}:
+mkDerivation {
+  pname = "system-argv0";
+  version = "0.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring system-filepath text ];
+  homepage = "https://john-millikin.com/software/haskell-filesystem/";
+  description = "Get argv[0] as a FilePath";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/system-fileio.cabal b/test/golden-test-cases/system-fileio.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/system-fileio.cabal
@@ -0,0 +1,91 @@
+name: system-fileio
+version: 0.3.16.3
+license: MIT
+license-file: license.txt
+author: John Millikin <jmillikin@gmail.com>
+maintainer: FP Complete <michael@fpcomplete.com>
+build-type: Simple
+cabal-version: >= 1.8
+category: System
+stability: experimental
+homepage: https://github.com/fpco/haskell-filesystem
+bug-reports: https://github.com/fpco/haskell-filesystem/issues
+
+synopsis: Consistent filesystem interaction across GHC versions (deprecated)
+description: Please see: https://plus.google.com/+MichaelSnoyman/posts/Ft5hnPqpgEx
+
+extra-source-files:
+  README.md
+  ChangeLog.md
+  lib/hssystemfileio-unix.h
+  lib/hssystemfileio-win32.h
+  --
+  tests/system-fileio-tests.cabal
+  tests/FilesystemTests.hs
+  tests/FilesystemTests/Posix.hs
+  tests/FilesystemTests/Util.hs
+  tests/FilesystemTests/Windows.hs
+
+source-repository head
+  type: git
+  location: https://github.com/fpco/haskell-filesystem.git
+
+library
+  ghc-options: -Wall -O2
+  hs-source-dirs: lib
+
+  build-depends:
+      base >= 4.0 && < 5.0
+    , bytestring >= 0.9
+    , system-filepath >= 0.3.1 && < 0.5
+    , text >= 0.7.1
+    , time >= 1.0 && < 2.0
+
+  if os(windows)
+    cpp-options: -DCABAL_OS_WINDOWS
+    build-depends:
+        Win32 >= 2.2
+      , directory >= 1.0
+    c-sources: lib/hssystemfileio-win32.c
+  else
+    build-depends:
+        unix >= 2.3
+    c-sources: lib/hssystemfileio-unix.c
+    if impl(ghc >= 7.2.0) && impl(ghc < 7.4.0)
+      cpp-options: -DSYSTEMFILEIO_LOCAL_OPEN_FILE
+
+  exposed-modules:
+    Filesystem
+
+test-suite filesystem_tests
+  type: exitcode-stdio-1.0
+  main-is: FilesystemTests.hs
+
+  ghc-options: -Wall -O2
+  cc-options: -Wall
+  hs-source-dirs: tests
+
+  build-depends:
+      base >= 4.0 && < 5.0
+    , bytestring >= 0.9
+    , chell >= 0.4 && < 0.5
+    , system-fileio
+    , system-filepath
+    , temporary >= 1.1 && < 2.0
+    , text
+    , time >= 1.0 && < 2.0
+    , transformers >= 0.2
+
+  if os(windows)
+    cpp-options: -DCABAL_OS_WINDOWS
+  else
+    build-depends:
+        unix >= 2.3
+
+  if os(darwin)
+    cpp-options: -DCABAL_OS_DARWIN
+
+  other-modules:
+    FilesystemTests.Posix
+    FilesystemTests.Util
+    FilesystemTests.Windows
diff --git a/test/golden-test-cases/system-fileio.nix.golden b/test/golden-test-cases/system-fileio.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/system-fileio.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, base, bytestring, chell, fetchurl, system-filepath
+, temporary, text, time, transformers, unix
+}:
+mkDerivation {
+  pname = "system-fileio";
+  version = "0.3.16.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring system-filepath text time unix
+  ];
+  testHaskellDepends = [
+    base bytestring chell system-filepath temporary text time
+    transformers unix
+  ];
+  homepage = "https://github.com/fpco/haskell-filesystem";
+  description = "Consistent filesystem interaction across GHC versions (deprecated)";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/system-filepath.cabal b/test/golden-test-cases/system-filepath.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/system-filepath.cabal
@@ -0,0 +1,61 @@
+name: system-filepath
+version: 0.4.13.4
+synopsis: High-level, byte-based file and directory path manipulations (deprecated)
+description: Please see: https://plus.google.com/+MichaelSnoyman/posts/Ft5hnPqpgEx
+license: MIT
+license-file: license.txt
+author: John Millikin <jmillikin@gmail.com>
+maintainer: FP Complete <michael@fpcomplete.com>
+copyright: John Millikin 2010-2012
+build-type: Custom
+cabal-version: >= 1.8
+category: System
+stability: experimental
+homepage: https://github.com/fpco/haskell-filesystem
+bug-reports: https://github.com/fpco/haskell-filesystem/issues
+extra-source-files: README.md ChangeLog.md
+
+source-repository head
+  type: git
+  location: https://github.com/fpco/haskell-filesystem.git
+
+library
+  ghc-options: -Wall -O2
+  hs-source-dirs: lib
+
+  build-depends:
+      base >= 4.0 && < 5.0
+    , bytestring >= 0.9
+    , deepseq >= 1.1 && < 1.5
+    , text >= 0.11.0.6
+
+  if os(windows)
+    cpp-options: -DCABAL_OS_WINDOWS
+
+  if os(darwin)
+    cpp-options: -DCABAL_OS_DARWIN
+
+  exposed-modules:
+    Filesystem.Path
+    Filesystem.Path.CurrentOS
+    Filesystem.Path.Rules
+
+  other-modules:
+    Filesystem.Path.Internal
+
+test-suite filesystem_path_tests
+  type: exitcode-stdio-1.0
+  main-is: FilesystemPathTests.hs
+
+  ghc-options: -Wall -O2
+  cc-options: -Wall
+  hs-source-dirs: tests
+
+  build-depends:
+      base > 4.0 && < 5.0
+    , bytestring
+    , chell >= 0.4 && < 0.5
+    , chell-quickcheck >= 0.2 && < 0.3
+    , QuickCheck
+    , system-filepath
+    , text
diff --git a/test/golden-test-cases/system-filepath.nix.golden b/test/golden-test-cases/system-filepath.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/system-filepath.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, chell, chell-quickcheck, deepseq
+, fetchurl, QuickCheck, text
+}:
+mkDerivation {
+  pname = "system-filepath";
+  version = "0.4.13.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring deepseq text ];
+  testHaskellDepends = [
+    base bytestring chell chell-quickcheck QuickCheck text
+  ];
+  homepage = "https://github.com/fpco/haskell-filesystem";
+  description = "High-level, byte-based file and directory path manipulations (deprecated)";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/tagged.cabal b/test/golden-test-cases/tagged.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tagged.cabal
@@ -0,0 +1,67 @@
+name:           tagged
+version:        0.8.5
+license:        BSD3
+license-file:   LICENSE
+author:         Edward A. Kmett
+maintainer:     Edward A. Kmett <ekmett@gmail.com>
+stability:      experimental
+category:       Data, Phantom Types
+synopsis:       Haskell 98 phantom types to avoid unsafely passing dummy arguments
+homepage:       http://github.com/ekmett/tagged
+bug-reports:    http://github.com/ekmett/tagged/issues
+copyright:      2009-2015 Edward A. Kmett
+description:    Haskell 98 phantom types to avoid unsafely passing dummy arguments
+build-type:     Simple
+cabal-version:  >= 1.10
+extra-source-files: .travis.yml CHANGELOG.markdown README.markdown HLint.hs
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/tagged.git
+
+flag deepseq
+  description:
+    You can disable the use of the `deepseq` package using `-f-deepseq`.
+    .
+    Disabing this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
+  default: True
+  manual: True
+
+flag transformers
+  description:
+    You can disable the use of the `transformers` and `transformers-compat` packages using `-f-transformers`.
+    .
+    Disable this is an unsupported configuration, but it may be useful for accelerating builds in sandboxes for expert users.
+  default: True
+  manual: True
+
+library
+  default-language: Haskell98
+  other-extensions: CPP
+  build-depends: base >= 2 && < 5
+  ghc-options: -Wall
+  hs-source-dirs: src
+  exposed-modules: Data.Tagged
+
+  if !impl(hugs)
+    cpp-options: -DLANGUAGE_DeriveDataTypeable
+    other-extensions: DeriveDataTypeable
+
+  if impl(ghc<7.7)
+    hs-source-dirs: old
+    exposed-modules: Data.Proxy
+    other-modules: Paths_tagged
+
+  if impl(ghc>=7.2 && <7.5)
+    build-depends: ghc-prim
+
+  if impl(ghc>=7.6)
+    exposed-modules: Data.Proxy.TH
+    build-depends: template-haskell >= 2.8 && < 2.12
+
+  if flag(deepseq)
+    build-depends: deepseq >= 1.1 && < 1.5
+
+  if flag(transformers)
+    build-depends: transformers        >= 0.2 && < 0.6,
+                   transformers-compat >= 0.5 && < 1
diff --git a/test/golden-test-cases/tagged.nix.golden b/test/golden-test-cases/tagged.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tagged.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, deepseq, fetchurl, template-haskell
+, transformers, transformers-compat
+}:
+mkDerivation {
+  pname = "tagged";
+  version = "0.8.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base deepseq template-haskell transformers transformers-compat
+  ];
+  homepage = "http://github.com/ekmett/tagged";
+  description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/taggy.cabal b/test/golden-test-cases/taggy.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/taggy.cabal
@@ -0,0 +1,140 @@
+name:                taggy
+version:             0.2.1
+synopsis:            Efficient and simple HTML/XML parsing library
+description:         
+  /taggy/ is a simple package for parsing HTML (and should work with XML)
+  written on top of the <http://hackage.haskell.org/package/attoparsec attoparsec>
+  library, which makes it one of the most efficient (space and time consumption wise)
+  on hackage.
+  .
+  This is the root module of /taggy/. It reexports everything
+  from the package. See each module's docs for details about
+  the functions and types involved in /taggy/.
+  .
+  While we've been testing the parser on /many/ pages, it may still
+  be a bit rough around the edges. Let us know on <http://github.com/alpmestan/taggy/issues github>
+  if you have any problem.
+  .
+  If you like to look at your HTML through
+  various optical instruments, feel free to take a look at
+  the companion <http://hackage.haskell.org/package/taggy-lens taggy-lens>
+  package we've put up together. It makes HTML parsing a piece of cake.
+  .
+  If you want to parse a document as list of tags
+  and go through it as some kind of stream by just picking
+  what you need, head to "Text.Taggy.Parser" and take
+  a look at 'Text.Taggy.Parser.taggyWith' and
+  'Text.Taggy.Parser.run'.
+  .
+  If you want to parse the document as a DOM tree and
+  traverse it to find the information you need,
+  use 'Text.Taggy.DOM.parseDOM'. This is especially useful
+  when used in conjunction with <http://hackage.haskell.org/package/taggy-lens taggy-lens>.
+  .
+  If you build some HTML manually
+  or just transform some existing DOM tree
+  and want to turn it into a 'Data.Text.Lazy.Text'
+  head to "Text.Taggy.Renderer" and look at 'Text.Taggy.Renderer.render'.
+homepage:            http://github.com/alpmestan/taggy
+license:             BSD3
+license-file:        LICENSE
+author:              Alp Mestanogullari, Vikram Verma
+maintainer:          alpmestan@gmail.com
+copyright:           2014 Alp Mestanogullari, Vikram Verma
+category:            Text, Web
+build-type:          Simple
+extra-source-files:  html_files/*.html
+data-files:          html_files/*.html
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Text.Taggy,
+                       Text.Taggy.DOM,
+                       Text.Taggy.Entities,
+                       Text.Taggy.Parser,
+                       Text.Taggy.Renderer
+                       Text.Taggy.Types
+  other-modules:
+  build-depends:       base >=4.6 && <5,
+                       blaze-html >= 0.7,
+                       blaze-markup >= 0.6,
+                       text >= 1,
+                       attoparsec >=0.11,
+                       vector >=0.7,
+                       unordered-containers >= 0.2
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  ghc-options:         -Wall -O2 -fno-warn-unused-do-bind -funbox-strict-fields
+  -- ghc-prof-options:    -Wall -O2 -fno-warn-unused-do-bind -funbox-strict-fields -prof -auto-all
+
+executable taggy
+  main-is:             taggy.hs
+  hs-source-dirs:      example
+  build-depends:       base >=4.5 && <5,
+                       text >= 1,
+                       attoparsec >=0.12,
+                       taggy
+  ghc-options:         -Wall -O2 -fno-warn-unused-do-bind
+  -- ghc-prof-options:    -Wall -prof -auto-all -O2 -fno-warn-unused-do-bind -rtsopts "-with-rtsopts=-sstderr -p"
+  default-language:    Haskell2010
+
+benchmark taggytagsoup
+  main-is:           vs-tagsoup.hs
+  hs-source-dirs:    bench
+  ghc-options:       -O2 -funbox-strict-fields
+  type:              exitcode-stdio-1.0
+  build-depends:     base >= 4 && < 5,
+                     text >=1,
+                     attoparsec >=0.12,
+                     taggy,
+                     tagsoup,
+                     criterion,
+                     vector
+  default-language:  Haskell2010
+
+test-suite unit
+  type:
+      exitcode-stdio-1.0
+  ghc-options:
+      -Wall -fno-warn-unused-do-bind
+  hs-source-dirs:
+      src, tests/unit
+  main-is:
+      Spec.hs
+  build-depends:
+      base    == 4.*
+    , blaze-html
+    , blaze-markup
+    , text
+    , hspec
+    , hspec-attoparsec
+    , vector
+    , attoparsec
+    , unordered-containers
+  default-language:
+      Haskell2010
+
+test-suite integration
+  type:
+      exitcode-stdio-1.0
+  ghc-options:
+      -Wall -fno-warn-unused-do-bind
+  hs-source-dirs:
+      src, tests/integration
+  main-is:
+      Main.hs
+  build-depends:
+      base    == 4.*
+    , blaze-html
+    , blaze-markup
+    , directory
+    , text
+    , hspec >= 1.11
+    , hspec-attoparsec
+    , vector
+    , attoparsec
+    , unordered-containers
+  other-modules:
+    Paths_taggy
+  default-language:
+      Haskell2010
diff --git a/test/golden-test-cases/taggy.nix.golden b/test/golden-test-cases/taggy.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/taggy.nix.golden
@@ -0,0 +1,30 @@
+{ mkDerivation, attoparsec, base, blaze-html, blaze-markup
+, criterion, directory, fetchurl, hspec, hspec-attoparsec, tagsoup
+, text, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "taggy";
+  version = "0.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    attoparsec base blaze-html blaze-markup text unordered-containers
+    vector
+  ];
+  executableHaskellDepends = [ attoparsec base text ];
+  testHaskellDepends = [
+    attoparsec base blaze-html blaze-markup directory hspec
+    hspec-attoparsec text unordered-containers vector
+  ];
+  benchmarkHaskellDepends = [
+    attoparsec base criterion tagsoup text vector
+  ];
+  homepage = "http://github.com/alpmestan/taggy";
+  description = "Efficient and simple HTML/XML parsing library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/tagstream-conduit.cabal b/test/golden-test-cases/tagstream-conduit.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tagstream-conduit.cabal
@@ -0,0 +1,62 @@
+Name:                tagstream-conduit
+Version:             0.5.5.3
+Synopsis:            streamlined html tag parser
+Description:
+    Tag-stream is a library for parsing HTML//XML to a token stream.
+    It can parse unstructured and malformed HTML from the web.
+    It also provides an Enumeratee which can parse streamline html, which means it consumes constant memory.
+
+    You can start from the `tests/Tests.hs` module to see what it can do.
+Homepage:            http://github.com/yihuang/tagstream-conduit
+License:             BSD3
+License-file:        LICENSE
+Author:              yihuang
+Maintainer:          yi.codeplayer@gmail.com
+Category:            Web, Conduit
+Build-type:          Simple
+Extra-source-files:    tests/Tests.hs
+                     , Highlight.hs
+                     , Parse.hs
+                     , HighlightText.hs
+                     , ParseText.hs
+Cabal-version:       >=1.8
+
+source-repository head
+  type:     git
+  location: git://github.com/yihuang/tagstream-conduit
+
+Library
+  GHC-Options:       -Wall -O2
+  Exposed-modules:     Text.HTML.TagStream
+                     , Text.HTML.TagStream.ByteString
+                     , Text.HTML.TagStream.Text
+                     , Text.HTML.TagStream.Types
+                     , Text.HTML.TagStream.Utils
+                     , Text.HTML.TagStream.Entities
+  Build-depends:       base >= 4 && < 5
+                     , bytestring
+                     , text
+                     , case-insensitive
+                     , transformers >= 0.2
+                     , conduit >= 1.2
+                     , conduit-extra >= 1.1.0
+                     , resourcet
+                     , attoparsec >= 0.10
+                     , blaze-builder
+                     , xml-conduit >= 1.1.0.0
+                     , data-default >= 0.5.0
+
+test-suite test
+    hs-source-dirs: tests
+    main-is: Tests.hs
+    type: exitcode-stdio-1.0
+    build-depends:     base >= 4 && < 5
+                     , bytestring
+                     , text
+                     , conduit >= 1.2
+                     , QuickCheck
+                     , HUnit
+                     , hspec >= 1.3
+                     , tagstream-conduit
+                     , resourcet
+    ghc-options:     -Wall
diff --git a/test/golden-test-cases/tagstream-conduit.nix.golden b/test/golden-test-cases/tagstream-conduit.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tagstream-conduit.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, attoparsec, base, blaze-builder, bytestring
+, case-insensitive, conduit, conduit-extra, data-default, fetchurl
+, hspec, HUnit, QuickCheck, resourcet, text, transformers
+, xml-conduit
+}:
+mkDerivation {
+  pname = "tagstream-conduit";
+  version = "0.5.5.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    attoparsec base blaze-builder bytestring case-insensitive conduit
+    conduit-extra data-default resourcet text transformers xml-conduit
+  ];
+  testHaskellDepends = [
+    base bytestring conduit hspec HUnit QuickCheck resourcet text
+  ];
+  homepage = "http://github.com/yihuang/tagstream-conduit";
+  description = "streamlined html tag parser";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/tasty-hedgehog.cabal b/test/golden-test-cases/tasty-hedgehog.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tasty-hedgehog.cabal
@@ -0,0 +1,41 @@
+name:                tasty-hedgehog
+version:             0.1.0.1
+license:             BSD3
+license-file:        LICENSE
+author:              Dave Laing
+maintainer:          dave.laing.80@gmail.com
+copyright:           Copyright (c) 2017, Commonwealth Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230.
+description:         Integrates the hedgehog testing library with the tasty testing framework.
+category:            Testing
+synopsis:            Integrates the hedgehog testing library with the tasty testing framework.
+homepage:            https://github.com/qfpl/tasty-hedghog
+bug-reports:         https://github.com/qfpl/tasty-hedgehog/issues
+build-type:          Simple
+extra-source-files:  ChangeLog.md
+cabal-version:       >=1.10
+
+source-repository   head
+  type:             git
+  location:         git@github.com:qfpl/tasty-hedgehog.git
+
+library
+  exposed-modules:     Test.Tasty.Hedgehog
+  build-depends:       base >= 4.8 && <4.11
+                     , tagged >= 0.8 && < 0.9
+                     , tasty >= 0.11 && < 0.12
+                     , hedgehog >= 0.5 && < 0.6
+  hs-source-dirs:      src
+  ghc-options:         -Wall
+  default-language:    Haskell2010
+
+test-suite tasty-hedgehog-tests
+  type:                exitcode-stdio-1.0
+  main-is:             Main.hs
+  hs-source-dirs:      test
+  build-depends:       base >= 4.8 && <4.11
+                     , tasty >= 0.11 && < 0.12
+                     , tasty-expected-failure >= 0.11 && < 0.12
+                     , hedgehog >= 0.5 && < 0.6
+                     , tasty-hedgehog
+  ghc-options:         -Wall
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/tasty-hedgehog.nix.golden b/test/golden-test-cases/tasty-hedgehog.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tasty-hedgehog.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, fetchurl, hedgehog, tagged, tasty
+, tasty-expected-failure
+}:
+mkDerivation {
+  pname = "tasty-hedgehog";
+  version = "0.1.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base hedgehog tagged tasty ];
+  testHaskellDepends = [
+    base hedgehog tasty tasty-expected-failure
+  ];
+  homepage = "https://github.com/qfpl/tasty-hedghog";
+  description = "Integrates the hedgehog testing library with the tasty testing framework";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/tasty-rerun.cabal b/test/golden-test-cases/tasty-rerun.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tasty-rerun.cabal
@@ -0,0 +1,87 @@
+name:                tasty-rerun
+version:             1.1.8
+homepage:            http://github.com/ocharles/tasty-rerun
+license:             BSD3
+license-file:        LICENSE
+author:              Oliver Charles
+maintainer:          ollie@ocharles.org.uk
+copyright:           Oliver Charles (c) 2014
+category:            Testing
+build-type:          Simple
+cabal-version:       >=1.10
+extra-source-files:
+  Changelog.md
+
+synopsis:
+  Run tests by filtering the test tree depending on the result of previous test
+  runs
+
+description:
+  This ingredient adds the ability to run tests by first filtering the test tree
+  based on the result of a previous test run. For example, you can use this to
+  run only those tests that failed in the last run, or to run only tests that
+  have been added since tests were last ran.
+  .
+  This ingredient is specifically an ingredient *transformer* - given a list of
+  'Tasty.Ingredient's, 'rerunningTests' adds the ability for all of these
+  ingredients to run against a filtered test tree. This transformer can be
+  applied as follows:
+  .
+  > import Test.Tasty
+  > import Test.Tasty.Runners
+  >
+  > main :: IO ()
+  > main =
+  >   defaultMainWithIngredients
+  >     [ rerunningTests [ listingTests, consoleTestReporter ] ]
+  >     tests
+  >
+  > tests :: TestTree
+  > tests = undefined
+  .
+  This ingredient adds three command line parameters:
+  .
+  [@--rerun-update@] If specified the results of this test run will be saved to
+  the log file at @--rerun-log-file@. If the ingredient does not execute tests
+  (for example, @--list-tests@ is used) then the log file will not be
+  updated. This option is not enabled by default.  This option does not require
+  a value.
+  .
+  [@--rerun-log-file@] The path to the log file to read previous test
+  information from, and where to write new information to (if @--rerun-update@
+  is specified). This option defaults to @.tasty-rerun-log@.
+  .
+  [@--rerun-filter@] Which filters to apply to the 'Tasty.TestTree' based on
+  previous test runs. The value of this option is a comma separated list of the
+  following options:
+  .
+     * @failures@: Only run tests that failed on the previous run.
+  .
+     * @exceptions@: Only run tests that threw an exception on the previous run.
+  .
+     * @new@: Only run tests that are new since the previous test run.
+  .
+     * @successful@: Only run tests that were successful in the previous run.
+  .
+  Multiple options can be combined and will be taken under disjunction - so
+  @--rerun-filter=failures,exceptions@ will run only tests that failed *or*
+  threw an exception on the last run.
+  .
+  Defaults to all filters, which means all tests will be ran.
+
+library
+  exposed-modules:     Test.Tasty.Ingredients.Rerun
+  build-depends:
+    base >=4.6 && <4.11,
+    containers >= 0.5.0.0,
+    mtl >= 2.1.2,
+    optparse-applicative >= 0.6,
+    reducers >= 3.10.1,
+    split >= 0.1 && < 0.3,
+    stm >= 2.4.2,
+    tagged >= 0.7 && <0.9,
+    tasty >=0.10 && <0.13,
+    transformers >= 0.3.0.0
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  ghc-options: -Wall
diff --git a/test/golden-test-cases/tasty-rerun.nix.golden b/test/golden-test-cases/tasty-rerun.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tasty-rerun.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, containers, fetchurl, mtl
+, optparse-applicative, reducers, split, stm, tagged, tasty
+, transformers
+}:
+mkDerivation {
+  pname = "tasty-rerun";
+  version = "1.1.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers mtl optparse-applicative reducers split stm tagged
+    tasty transformers
+  ];
+  homepage = "http://github.com/ocharles/tasty-rerun";
+  description = "Run tests by filtering the test tree depending on the result of previous test runs";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/tce-conf.cabal b/test/golden-test-cases/tce-conf.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tce-conf.cabal
@@ -0,0 +1,66 @@
+name:                tce-conf
+version:             1.3
+cabal-version:       >= 1.10
+build-type:          Simple
+license:             BSD3
+license-file:        LICENSE
+copyright:           2015-2016 Dino Morelli
+author:              Dino Morelli
+maintainer:          Dino Morelli <dino@ui3.info>
+stability:           experimental
+homepage:            http://hub.darcs.net/dino/tce-conf
+synopsis:            Very simple config file reading
+description:         This package contains modules for runtime reading of very simple config files of the `key=value` style or as a Haskell data structure to be deserialized with `Read`. The modules support files with blank lines and simple single-line comments, but nothing else.
+category:            Configuration
+tested-with:         GHC >= 8.0.1
+extra-source-files:  changelog.md
+                     doc/dev/notes
+                     README.md
+                     resources/*.conf
+                     stack.yaml
+                     TODO.md
+                     util/gentags.sh
+                     util/prefs/boring
+
+source-repository    head
+   type:             darcs
+   location:         http://hub.darcs.net/dino/tce-conf
+
+library
+   exposed-modules:  TCE.Data.KVConf
+                     TCE.Data.ReadConf
+   hs-source-dirs:   src
+   build-depends:    base >= 3 && < 5,
+                     containers
+   ghc-options:      -Wall
+   default-language: Haskell2010
+
+test-suite           test-hsmisc
+   type:             exitcode-stdio-1.0
+   main-is:          test-hsmisc.hs
+   hs-source-dirs:   src testsuite
+   build-depends:    base >= 3 && < 5,
+                     containers,
+                     HUnit
+   ghc-options:      -Wall
+   other-modules:    KVConf
+                     ReadConf
+                     TCE.Data.KVConf
+                     TCE.Data.ReadConf
+   default-language: Haskell2010
+
+executable KVConf-example
+   hs-source-dirs:   app
+   main-is:          KVConf-example.hs
+   build-depends:      base >= 3 && < 5
+                     , containers
+                     , tce-conf
+   default-language: Haskell2010
+
+executable ReadConf-example
+   hs-source-dirs:   app
+   main-is:          ReadConf-example.hs
+   build-depends:      base >= 3 && < 5
+                     , containers
+                     , tce-conf
+   default-language: Haskell2010
diff --git a/test/golden-test-cases/tce-conf.nix.golden b/test/golden-test-cases/tce-conf.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tce-conf.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, containers, fetchurl, HUnit }:
+mkDerivation {
+  pname = "tce-conf";
+  version = "1.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base containers ];
+  executableHaskellDepends = [ base containers ];
+  testHaskellDepends = [ base containers HUnit ];
+  homepage = "http://hub.darcs.net/dino/tce-conf";
+  description = "Very simple config file reading";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/terminal-progress-bar.cabal b/test/golden-test-cases/terminal-progress-bar.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/terminal-progress-bar.cabal
@@ -0,0 +1,69 @@
+name:          terminal-progress-bar
+version:       0.1.1.1
+cabal-version: >=1.10
+build-type:    Simple
+stability:     provisional
+author:        Roel van Dijk <vandijk.roel@gmail.com>
+maintainer:    Roel van Dijk <vandijk.roel@gmail.com>
+copyright:     2012–2014 Roel van Dijk <vandijk.roel@gmail.com>
+license:       BSD3
+license-file:  LICENSE
+category:      System, User Interfaces
+homepage:      https://github.com/roelvandijk/terminal-progress-bar
+bug-reports:   https://github.com/roelvandijk/terminal-progress-bar/issues
+synopsis:      A simple progress bar in the terminal
+description:
+  A progress bar is used to convey the progress of a task. This
+  package implements a very simple textual progress bar.
+  .
+  See the module 'System.ProgressBar' on how to use the progress bar
+  or build the package with the -fexample flag for a small example
+  program.
+  .
+  The animated progress bar depends entirely on the interpretation of
+  the carriage return character (\'\\r\'). If your terminal interprets
+  it as something else than \"move cursor to beginning of line\", the
+  animation won't work.
+
+extra-source-files: LICENSE, README.markdown
+
+source-repository head
+  type:     git
+  location: git://github.com/roelvandijk/terminal-progress-bar.git
+
+flag example
+  description: Build a small example program.
+  default: False
+
+library
+    hs-source-dirs: src
+    build-depends: base                 >= 3.0.3.1 && < 5.0
+                 , stm                  >= 2.4     && < 3.0
+                 , stm-chans            >= 3.0.0   && < 4.0
+    exposed-modules: System.ProgressBar
+    ghc-options: -Wall
+    default-language: Haskell2010
+
+test-suite test-terminal-progress-bar
+    type: exitcode-stdio-1.0
+    main-is: test.hs
+    hs-source-dirs: test
+    ghc-options: -Wall
+    build-depends: base                  >= 3.0.3.1 && < 5.0
+                 , HUnit                 >= 1.2.4.2 && < 1.6
+                 , terminal-progress-bar
+                 , test-framework        >= 0.3.3   && < 0.9
+                 , test-framework-hunit  >= 0.2.6   && < 0.4
+    default-language: Haskell2010
+
+executable example
+    main-is: example.hs
+    hs-source-dirs: .
+    ghc-options: -Wall
+    if flag(example)
+      build-depends: base                  >= 3.0.3.1 && < 5.0
+                   , terminal-progress-bar
+      buildable: True
+    else
+      buildable: False
+    default-language: Haskell2010
diff --git a/test/golden-test-cases/terminal-progress-bar.nix.golden b/test/golden-test-cases/terminal-progress-bar.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/terminal-progress-bar.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, fetchurl, HUnit, stm, stm-chans
+, test-framework, test-framework-hunit
+}:
+mkDerivation {
+  pname = "terminal-progress-bar";
+  version = "0.1.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base stm stm-chans ];
+  testHaskellDepends = [
+    base HUnit test-framework test-framework-hunit
+  ];
+  homepage = "https://github.com/roelvandijk/terminal-progress-bar";
+  description = "A simple progress bar in the terminal";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/test-fixture.cabal b/test/golden-test-cases/test-fixture.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/test-fixture.cabal
@@ -0,0 +1,78 @@
+name:
+  test-fixture
+version:
+  0.5.1.0
+synopsis:
+  Test monadic side-effects
+description:
+  Please see README.md
+homepage:
+  http://github.com/cjdev/test-fixture#readme
+license:
+  BSD3
+license-file:
+  LICENSE
+author:
+  Joe Vargas
+maintainer:
+  jvargas@cj.com
+copyright:
+  2016 CJ Affiliate by Conversant
+category:
+  Test
+build-type:
+  Simple
+extra-source-files:
+  CHANGELOG.md
+  LICENSE
+  README.md
+cabal-version:
+   >=1.10
+
+library
+  hs-source-dirs: src
+  default-language: Haskell2010
+  ghc-options: -Wall
+  exposed-modules:
+    Control.Monad.TestFixture
+    Control.Monad.TestFixture.TH
+    Control.Monad.TestFixture.TH.Internal
+    Control.Monad.TestFixture.TH.Internal.TypesQuasi
+  build-depends:
+      base >= 4.7 && < 5
+    , data-default-class
+    , exceptions
+    , haskell-src-exts
+    , haskell-src-meta
+    , mtl
+    , template-haskell >= 2.10 && < 2.13
+    , th-orphans
+  if impl(ghc < 8)
+    build-depends:
+      transformers
+
+
+source-repository head
+  type:
+    git
+  location:
+    https://github.com/cjdev/test-fixture
+
+test-suite test-fixture-test-suite
+  type: exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is: Main.hs
+  default-language: Haskell2010
+  ghc-options: -Wall
+  other-modules:
+    Test.Control.Monad.TestFixtureSpec
+    Test.Control.Monad.TestFixture.DefaultSignaturesSpec
+    Test.Control.Monad.TestFixture.THSpec
+  build-depends:
+      base
+    , test-fixture
+    , hspec
+    , hspec-discover
+    , mtl
+    , template-haskell
+    , transformers
diff --git a/test/golden-test-cases/test-fixture.nix.golden b/test/golden-test-cases/test-fixture.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/test-fixture.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, data-default-class, exceptions, fetchurl
+, haskell-src-exts, haskell-src-meta, hspec, hspec-discover, mtl
+, template-haskell, th-orphans, transformers
+}:
+mkDerivation {
+  pname = "test-fixture";
+  version = "0.5.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base data-default-class exceptions haskell-src-exts
+    haskell-src-meta mtl template-haskell th-orphans
+  ];
+  testHaskellDepends = [
+    base hspec hspec-discover mtl template-haskell transformers
+  ];
+  homepage = "http://github.com/cjdev/test-fixture#readme";
+  description = "Test monadic side-effects";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/texmath.cabal b/test/golden-test-cases/texmath.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/texmath.cabal
@@ -0,0 +1,156 @@
+Name:                texmath
+Version:             0.10.1
+Cabal-Version:       >= 1.10
+Build-type:          Simple
+Synopsis:            Conversion between formats used to represent mathematics.
+Description:         The texmath library provides functions to read and
+                     write TeX math, presentation MathML, and OMML (Office
+                     Math Markup Language, used in Microsoft Office).
+                     Support is also included for converting math formats
+                     to Gnu eqn and to pandoc's native format (allowing
+                     conversion, via pandoc, to a variety of different
+                     markup formats).  The TeX reader supports basic LaTeX
+                     and AMS extensions, and it can parse and apply LaTeX
+                     macros.  (See <http://johnmacfarlane.net/texmath here>
+                     for a live demo of bidirectional conversion between LaTeX
+                     and MathML.)
+                     .
+                     The package also includes several utility modules which
+                     may be useful for anyone looking to manipulate either
+                     TeX math or MathML.  For example, a copy of the MathML
+                     operator dictionary is included.
+                     .
+                     Use the @executable@ flag to install a standalone
+                     executable, @texmath@, that by default reads a LaTeX
+                     formula from @stdin@ and writes MathML to @stdout@.
+                     With flags all the functionality exposed by
+                     'Text.TeXMath' can be accessed through this executable.
+                     (Use the @--help@ flag for a description of all
+                     functionality)
+                     .
+                     The @texmath@ executable can also be used as a CGI
+                     script, when renamed as @texmath-cgi@.
+                     It will expect query parameters for @from@, @to@,
+                     @input@, and optionally @inline@, and return a JSON
+                     object with either @error@ and a message or
+                     @success@ and the converted result.
+
+Category:            Text
+Stability:           Experimental
+License:             GPL
+License-File:        LICENSE
+Author:              John MacFarlane, Matthew Pickering
+Maintainer:          jgm@berkeley.edu
+Homepage:            http://github.com/jgm/texmath
+Extra-source-files:  README.markdown
+                     changelog
+                     man/texmath.1.md
+                     man/Makefile
+                     man/man1/texmath.1
+                     cgi/texmath.html
+                     tests/src/*.mml
+                     tests/src/*.tex
+                     tests/src/*.omml
+                     tests/readers/mml/*.native
+                     tests/readers/mml/*.error
+                     tests/readers/tex/*.native
+                     tests/readers/omml/*.native
+                     tests/writers/*.mml
+                     tests/writers/*.tex
+                     tests/writers/*.omml
+                     tests/writers/*.eqn
+                     lib/totexmath/unicodetotex.hs
+                     lib/totexmath/unimathsymbols.txt
+                     lib/totexmath/Makefile
+                     lib/mmldict/unicode.xml
+                     lib/mmldict/operatorDictionary.xsl
+                     lib/mmldict/generateMMLDict.hs
+                     lib/mmldict/Makefile
+                     lib/tounicode/mkUnicodeTable.hs
+                     lib/tounicode/UnicodeData.txt
+                     lib/tounicode/Makefile
+                     lib/toascii/Data.txt
+                     lib/toascii/generate-cbits.hs
+                     lib/toascii/Makefile
+
+Source-repository head
+  type:              git
+  location:          git://github.com/jgm/texmath.git
+
+Flag executable
+  description:       Compile test executable.
+  default:           False
+
+Flag network-uri
+  description: Get Network.URI from the network-uri package
+  default: True
+
+Library
+    Build-depends:       xml, parsec >= 3, containers,
+                         pandoc-types >= 1.12.3.3 && < 1.18, mtl
+    if impl(ghc >= 6.10)
+      Build-depends: base >= 4.5 && < 5, syb
+    else
+      Build-depends: base >= 3 && < 4
+    Exposed-modules:     Text.TeXMath,
+                         Text.TeXMath.Types,
+                         Text.TeXMath.TeX,
+                         Text.TeXMath.Readers.TeX,
+                         Text.TeXMath.Readers.TeX.Macros,
+                         Text.TeXMath.Readers.MathML,
+                         Text.TeXMath.Readers.MathML.MMLDict,
+                         Text.TeXMath.Readers.MathML.EntityMap,
+                         Text.TeXMath.Readers.OMML,
+                         Text.TeXMath.Writers.MathML,
+                         Text.TeXMath.Writers.OMML,
+                         Text.TeXMath.Writers.Pandoc,
+                         Text.TeXMath.Writers.TeX,
+                         Text.TeXMath.Writers.Eqn,
+                         Text.TeXMath.Unicode.ToUnicode,
+                         Text.TeXMath.Unicode.ToTeX,
+                         Text.TeXMath.Unicode.ToASCII,
+                         Text.TeXMath.Unicode.Fonts
+    Other-modules:       Text.TeXMath.Compat,
+                         Text.TeXMath.Shared,
+                         Paths_texmath
+    if impl(ghc >= 6.12)
+      Ghc-Options:     -Wall -fno-warn-unused-do-bind
+    else
+      Ghc-Options:     -Wall
+    Ghc-Prof-Options:  -fprof-auto-exported
+    Default-Language:    Haskell2010
+    Hs-Source-Dirs:    src
+    c-sources: cbits/valToASCII.c
+            cbits/keyToASCII.c
+
+Executable texmath
+    Default-Language:    Haskell2010
+    Main-is:             texmath.hs
+    Other-Modules:       Paths_texmath
+    Hs-Source-Dirs:      extra
+    if impl(ghc >= 6.12)
+      Ghc-Options:     -Wall -fno-warn-unused-do-bind
+    else
+      Ghc-Options:     -Wall
+    Ghc-Prof-Options:  -fprof-auto-exported
+    if flag(executable)
+      Buildable:         True
+      Build-Depends:     base >= 4.5 && < 5, texmath, xml,
+                         pandoc-types >= 1.12.3.3 && < 1.18,
+                         split, aeson, bytestring, text
+    else
+      Buildable:         False
+    if flag(network-uri)
+      Build-Depends:     network-uri >= 2.6
+    else
+      Build-Depends:     network < 2.6
+
+Test-Suite test-texmath
+    Type:                exitcode-stdio-1.0
+    Main-Is:             test-texmath.hs
+    Hs-Source-Dirs:      tests
+    Build-Depends:       base >= 4.2 && < 5, process, directory, filepath,
+                         texmath, xml, utf8-string, bytestring, process,
+                         temporary, text, split
+    Default-Language:    Haskell2010
+    Ghc-Options:         -Wall
diff --git a/test/golden-test-cases/texmath.nix.golden b/test/golden-test-cases/texmath.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/texmath.nix.golden
@@ -0,0 +1,25 @@
+{ mkDerivation, base, bytestring, containers, directory, fetchurl
+, filepath, mtl, network-uri, pandoc-types, parsec, process, split
+, syb, temporary, text, utf8-string, xml
+}:
+mkDerivation {
+  pname = "texmath";
+  version = "0.10.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base containers mtl pandoc-types parsec syb xml
+  ];
+  executableHaskellDepends = [ network-uri ];
+  testHaskellDepends = [
+    base bytestring directory filepath process split temporary text
+    utf8-string xml
+  ];
+  homepage = "http://github.com/jgm/texmath";
+  description = "Conversion between formats used to represent mathematics";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/text-icu.cabal b/test/golden-test-cases/text-icu.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/text-icu.cabal
@@ -0,0 +1,118 @@
+name:           text-icu
+version:        0.7.0.1
+synopsis:       Bindings to the ICU library
+homepage:       https://github.com/bos/text-icu
+bug-reports:    https://github.com/bos/text-icu/issues
+description:
+  Haskell bindings to the International Components for Unicode (ICU)
+  libraries.  These libraries provide robust and full-featured Unicode
+  services on a wide variety of platforms.
+  .
+  Features include:
+  .
+  * Both pure and impure bindings, to allow for fine control over efficiency
+    and ease of use.
+  .
+  * Breaking of strings on character, word, sentence, and line boundaries.
+  .
+  * Access to the Unicode Character Database (UCD) of character metadata.
+  .
+  * String collation functions, for locales where the conventions for
+    lexicographic ordering differ from the simple numeric ordering of
+    character codes.
+  .
+  * Character set conversion functions, allowing conversion between
+    Unicode and over 220 character encodings.
+  .
+  * Unicode normalization.  (When implementations keep strings in a
+    normalized form, they can be assured that equivalent strings have a
+    unique binary representation.)
+  .
+  * Regular expression search and replace.
+maintainer:     Bryan O'Sullivan <bos@serpentine.com>
+copyright:      2009-2014 Bryan O'Sullivan
+category:       Data, Text
+license:        BSD3
+license-file:   LICENSE
+build-type:     Simple
+cabal-version:  >= 1.10
+extra-source-files:
+  README.markdown
+  benchmarks/Breaker.hs
+  changelog.md
+  include/hs_text_icu.h
+
+library
+  default-language:  Haskell98
+  build-depends:
+    base >= 4 && < 5,
+    bytestring,
+    deepseq,
+    text >= 0.9.1.0
+
+  exposed-modules:
+      Data.Text.ICU
+      Data.Text.ICU.Break
+      Data.Text.ICU.Char
+      Data.Text.ICU.Collate
+      Data.Text.ICU.Convert
+      Data.Text.ICU.Error
+      Data.Text.ICU.Normalize
+      Data.Text.ICU.Regex
+      Data.Text.ICU.Types
+  other-modules:
+      Data.Text.ICU.Break.Pure
+      Data.Text.ICU.Break.Types
+      Data.Text.ICU.Collate.Internal
+      Data.Text.ICU.Collate.Pure
+      Data.Text.ICU.Convert.Internal
+      Data.Text.ICU.Error.Internal
+      Data.Text.ICU.Internal
+      Data.Text.ICU.Iterator
+      Data.Text.ICU.Normalize.Internal
+      Data.Text.ICU.Regex.Internal
+      Data.Text.ICU.Regex.Pure
+      Data.Text.ICU.Text
+  c-sources: cbits/text_icu.c
+  include-dirs: include
+  extra-libraries: icuuc
+  if os(mingw32)
+    extra-libraries: icuin icudt
+  else
+    extra-libraries: icui18n icudata
+
+  ghc-options: -Wall -fwarn-tabs
+
+test-suite tests
+  default-language: Haskell98
+  type:             exitcode-stdio-1.0
+  hs-source-dirs:   tests
+  main-is:          Tests.hs
+  other-modules:    Properties QuickCheckUtils
+
+  ghc-options:
+    -Wall -threaded -O0 -rtsopts
+
+  build-depends:
+    HUnit >= 1.2,
+    QuickCheck >= 2.4,
+    array,
+    base >= 4 && < 5,
+    bytestring,
+    deepseq,
+    directory,
+    ghc-prim,
+    random,
+    test-framework >= 0.4,
+    test-framework-hunit >= 0.2,
+    test-framework-quickcheck2 >= 0.2,
+    text,
+    text-icu
+
+source-repository head
+  type:     git
+  location: https://github.com/bos/text-icu
+
+source-repository head
+  type:     mercurial
+  location: https://bitbucket.org/bos/text-icu
diff --git a/test/golden-test-cases/text-icu.nix.golden b/test/golden-test-cases/text-icu.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/text-icu.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, array, base, bytestring, deepseq, directory
+, fetchurl, ghc-prim, HUnit, icu, QuickCheck, random
+, test-framework, test-framework-hunit, test-framework-quickcheck2
+, text
+}:
+mkDerivation {
+  pname = "text-icu";
+  version = "0.7.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring deepseq text ];
+  librarySystemDepends = [ icu ];
+  testHaskellDepends = [
+    array base bytestring deepseq directory ghc-prim HUnit QuickCheck
+    random test-framework test-framework-hunit
+    test-framework-quickcheck2 text
+  ];
+  homepage = "https://github.com/bos/text-icu";
+  description = "Bindings to the ICU library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/text-postgresql.cabal b/test/golden-test-cases/text-postgresql.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/text-postgresql.cabal
@@ -0,0 +1,50 @@
+name:                text-postgresql
+version:             0.0.2.3
+synopsis:            Parser and Printer of PostgreSQL extended types
+description:         This package involves parser and printer for
+                     text expressions of PostgreSQL extended types.
+                     - inet type, cidr type
+homepage:            http://khibino.github.io/haskell-relational-record/
+license:             BSD3
+license-file:        LICENSE
+author:              Kei Hibino
+maintainer:          ex8k.hibino@gmail.com
+copyright:           Copyright (c) 2015-2017 Kei Hibino
+category:            Database
+build-type:          Simple
+
+cabal-version:       >=1.10
+tested-with:           GHC == 8.2.1
+                     , GHC == 8.0.1, GHC == 8.0.2
+                     , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
+                     , GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
+                     , GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3
+                     , GHC == 7.4.1, GHC == 7.4.2
+
+library
+  exposed-modules:
+                       Data.PostgreSQL.NetworkAddress
+                       Database.PostgreSQL.Parser
+                       Database.PostgreSQL.Printer
+  other-modules:
+                       Text.Parser.List
+                       Text.Printer.List
+
+  build-depends:         base <5
+                       , transformers
+                       , transformers-compat
+                       , dlist
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+
+test-suite pp
+  build-depends:         base <5
+                       , QuickCheck
+                       , quickcheck-simple
+                       , text-postgresql
+  type:                exitcode-stdio-1.0
+  main-is:             ppIso.hs
+  hs-source-dirs:      test
+
+  ghc-options:         -Wall
+  default-language:     Haskell2010
diff --git a/test/golden-test-cases/text-postgresql.nix.golden b/test/golden-test-cases/text-postgresql.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/text-postgresql.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, dlist, fetchurl, QuickCheck
+, quickcheck-simple, transformers, transformers-compat
+}:
+mkDerivation {
+  pname = "text-postgresql";
+  version = "0.0.2.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base dlist transformers transformers-compat
+  ];
+  testHaskellDepends = [ base QuickCheck quickcheck-simple ];
+  homepage = "http://khibino.github.io/haskell-relational-record/";
+  description = "Parser and Printer of PostgreSQL extended types";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/th-expand-syns.cabal b/test/golden-test-cases/th-expand-syns.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/th-expand-syns.cabal
@@ -0,0 +1,39 @@
+name:                th-expand-syns
+version:             0.4.4.0
+synopsis:            Expands type synonyms in Template Haskell ASTs
+description:         Expands type synonyms in Template Haskell ASTs.
+category:            Template Haskell
+license:             BSD3
+license-file:        LICENSE
+author:              Daniel Schüssler
+maintainer:          haskell.5wlh@gishpuppy.com
+cabal-version:       >= 1.8
+build-type:          Simple
+extra-source-files:  changelog.markdown
+homepage:            https://github.com/DanielSchuessler/th-expand-syns
+tested-with:
+    GHC == 7.0.4
+    GHC == 7.2.2
+    GHC == 7.4.2
+    GHC == 7.6.3
+    GHC == 7.8.4
+    GHC == 7.10.3
+    GHC == 8.0.2
+    GHC == 8.2.2
+
+source-repository head
+ type: git
+ location: git://github.com/DanielSchuessler/th-expand-syns.git
+
+Library
+    build-depends:       base >= 4 && < 5, template-haskell < 2.14, syb, containers
+    ghc-options:
+    exposed-modules:     Language.Haskell.TH.ExpandSyns
+    other-modules:       Language.Haskell.TH.ExpandSyns.SemigroupCompat
+
+Test-Suite test-th-expand-syns
+    type:               exitcode-stdio-1.0
+    hs-source-dirs:     testing
+    main-is:            Main.hs
+    other-modules:      Util, Types
+    build-depends:      base, th-expand-syns, template-haskell
diff --git a/test/golden-test-cases/th-expand-syns.nix.golden b/test/golden-test-cases/th-expand-syns.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/th-expand-syns.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, containers, fetchurl, syb, template-haskell
+}:
+mkDerivation {
+  pname = "th-expand-syns";
+  version = "0.4.4.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers syb template-haskell ];
+  testHaskellDepends = [ base template-haskell ];
+  homepage = "https://github.com/DanielSchuessler/th-expand-syns";
+  description = "Expands type synonyms in Template Haskell ASTs";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/these.cabal b/test/golden-test-cases/these.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/these.cabal
@@ -0,0 +1,90 @@
+Name:                these
+Version:             0.7.4
+Synopsis:            An either-or-both data type & a generalized 'zip with padding' typeclass
+Homepage:            https://github.com/isomorphism/these
+License:             BSD3
+License-file:        LICENSE
+Author:              C. McCann
+Maintainer:          cam@uptoisomorphism.net
+Category:            Data,Control
+Build-type:          Simple
+Extra-source-files:  README.md, CHANGELOG.md
+Cabal-version:       >=1.8
+Description:
+  This package provides a data type @These a b@ which can hold a value of either
+  type or values of each type. This is usually thought of as an "inclusive or"
+  type (contrasting @Either a b@ as "exclusive or") or as an "outer join" type
+  (contrasting @(a, b)@ as "inner join").
+  .
+  The major use case of this is provided by the @Align@ class, representing a
+  generalized notion of "zipping with padding" that combines structures without
+  truncating to the size of the smaller input.
+  .
+  Also included is @ChronicleT@, a monad transformer based on the Monad instance
+  for @These a@, along with the usual monad transformer bells and whistles.
+tested-with:
+  GHC==7.4.2,
+  GHC==7.6.3,
+  GHC==7.8.4,
+  GHC==7.10.3,
+  GHC==8.0.2,
+  GHC==8.2.1
+
+source-repository head
+  type: git
+  location: https://github.com/isomorphism/these.git
+
+Library
+  Exposed-modules:     Data.These,
+                       Data.Align,
+                       Data.Align.Key,
+                       Control.Monad.Chronicle,
+                       Control.Monad.Chronicle.Class,
+                       Control.Monad.Trans.Chronicle
+
+  Build-depends:       base                     >= 4.4     && < 4.11,
+                       aeson                    >= 0.7.0.4 && < 1.3,
+                       bifunctors               >= 0.1     && < 5.5,
+                       binary                   >= 0.5.0.2 && < 0.10,
+                       containers               >= 0.4     && < 0.6,
+                       data-default-class       >= 0.0     && < 0.2,
+                       deepseq                  >= 1.3.0.0 && < 1.5,
+                       hashable                 >= 1.2.3   && < 1.3,
+                       keys                     >= 3.10    && < 3.12,
+                       mtl                      >= 2       && < 2.3,
+                       profunctors              >= 3       && < 5.3,
+                       QuickCheck               >= 2.10    && < 2.11,
+                       semigroupoids            >= 1.0     && < 5.3,
+                       transformers             >= 0.2     && < 0.6,
+                       transformers-compat      >= 0.2     && < 0.6,
+                       unordered-containers     >= 0.2     && < 0.3,
+                       vector                   >= 0.4     && < 0.13,
+                       vector-instances         >= 3.3.1   && < 3.5
+  if impl(ghc <7.5)
+    build-depends:     ghc-prim
+
+  if !impl(ghc >= 8.0)
+    build-depends:
+                       semigroups               >= 0.8   && < 0.19
+
+  ghc-options:         -Wall
+
+test-suite test
+  type:                exitcode-stdio-1.0
+  main-is:             Tests.hs
+  hs-source-dirs:      test
+  ghc-options:         -Wall
+  build-depends:       these,
+                       base                    >= 4.5,
+                       quickcheck-instances    >= 0.3.15 && < 0.3.16,
+                       tasty                   >= 0.10   && < 0.12,
+                       tasty-quickcheck        >= 0.8    && < 0.10,
+                       aeson,
+                       bifunctors,
+                       binary,
+                       containers,
+                       hashable,
+                       QuickCheck,
+                       transformers,
+                       unordered-containers,
+                       vector
diff --git a/test/golden-test-cases/these.nix.golden b/test/golden-test-cases/these.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/these.nix.golden
@@ -0,0 +1,27 @@
+{ mkDerivation, aeson, base, bifunctors, binary, containers
+, data-default-class, deepseq, fetchurl, hashable, keys, mtl
+, profunctors, QuickCheck, quickcheck-instances, semigroupoids
+, tasty, tasty-quickcheck, transformers, transformers-compat
+, unordered-containers, vector, vector-instances
+}:
+mkDerivation {
+  pname = "these";
+  version = "0.7.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base bifunctors binary containers data-default-class deepseq
+    hashable keys mtl profunctors QuickCheck semigroupoids transformers
+    transformers-compat unordered-containers vector vector-instances
+  ];
+  testHaskellDepends = [
+    aeson base bifunctors binary containers hashable QuickCheck
+    quickcheck-instances tasty tasty-quickcheck transformers
+    unordered-containers vector
+  ];
+  homepage = "https://github.com/isomorphism/these";
+  description = "An either-or-both data type & a generalized 'zip with padding' typeclass";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/timezone-series.cabal b/test/golden-test-cases/timezone-series.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/timezone-series.cabal
@@ -0,0 +1,57 @@
+Name:                timezone-series
+Version:             0.1.8
+Synopsis:            Enhanced timezone handling for Data.Time
+Description:         This package endows Data.Time, from the time
+                     package, with several data types and functions
+                     for enhanced processing of timezones. For one way
+                     to create timezone series, see the timezone-olson
+                     (<http://hackage.haskell.org/package/timezone-olson>)
+                     and timezone-olson-th
+                     (<http://hackage.haskell.org/package/timezone-olson-th>)
+                     packages.
+Homepage:            http://projects.haskell.org/time-ng/
+License:             BSD3
+License-file:        LICENSE
+Author:              Yitzchak Gale
+Maintainer:          yitz@sefer.org
+Copyright:           Copyright (c) 2010-2015 Yitzchak Gale. All rights reserved.
+Category:            Data
+Build-type:          Simple
+Extra-source-files:  README.md
+Cabal-version:       >=1.10
+Tested-with:         GHC > 7.4 && < 8.1
+
+Source-repository HEAD
+  type:              git
+  location:          https://github.com/ygale/timezone-series.git
+
+Flag time_pre_1_6
+  Description:       Use version < 1.6 of the time library
+  Default:           False
+
+Flag time_1_6_and_1_7
+  Description:       Use version >= 1.6 and < 1.8 of the time library
+  Default:           False
+
+Library
+  Default-language:    Haskell2010
+  Hs-source-dirs:      .
+  if flag(time_pre_1_6)
+    Hs-source-dirs:    time_pre_1_6
+  else
+    if flag(time_1_6_and_1_7)
+      Hs-source-dirs:  time_1_6_and_1_7
+    else
+      Hs-source-dirs:  time_post_1_8
+  Exposed-modules:     Data.Time.LocalTime.TimeZone.Series
+  Other-modules:       Data.Time.LocalTime.TimeZone.Internal.TimeVersion
+  Default-extensions:  DeriveDataTypeable
+  Build-depends:       base >= 4.4 && < 5
+                     , deepseq
+  if flag(time_pre_1_6)
+    Build-depends:     time >= 1.1.4 && < 1.6
+  else
+    if flag(time_1_6_and_1_7)
+      Build-depends:   time >= 1.6 && < 1.8
+    else
+      Build-depends:   time >= 1.8 && < 1.9
diff --git a/test/golden-test-cases/timezone-series.nix.golden b/test/golden-test-cases/timezone-series.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/timezone-series.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, deepseq, fetchurl, time }:
+mkDerivation {
+  pname = "timezone-series";
+  version = "0.1.8";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base deepseq time ];
+  homepage = "http://projects.haskell.org/time-ng/";
+  description = "Enhanced timezone handling for Data.Time";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/transformers-compat.cabal b/test/golden-test-cases/transformers-compat.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/transformers-compat.cabal
@@ -0,0 +1,99 @@
+name:          transformers-compat
+category:      Compatibility
+version:       0.5.1.4
+license:       BSD3
+cabal-version: >= 1.8
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     provisional
+homepage:      http://github.com/ekmett/transformers-compat/
+bug-reports:   http://github.com/ekmett/transformers-compat/issues
+copyright:     Copyright (C) 2012-2015 Edward A. Kmett
+synopsis:      A small compatibility shim exposing the new types from transformers 0.3 and 0.4 to older Haskell platforms.
+description:
+  This package includes backported versions of types that were added
+  to transformers in transformers 0.3, 0.4, and 0.5 for users who need strict
+  transformers 0.2 or 0.3 compatibility to run on old versions of the
+  platform, but also need those types.
+  .
+  Those users should be able to just depend on @transformers >= 0.2@
+  and @transformers-compat >= 0.3@.
+  .
+  Note: missing methods are not supplied, but this at least permits the types to be used.
+
+build-type:    Simple
+tested-with:   GHC == 7.0.4, GHC == 7.4.1, GHC == 7.4.2, GHC == 7.6.1, GHC == 7.8.2, GHC == 7.10.3, GHC == 8.0.1
+extra-source-files:
+  .travis.yml
+  .ghci
+  .gitignore
+  .vim.custom
+  config
+  HLint.hs
+  README.markdown
+  CHANGELOG.markdown
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/transformers-compat.git
+
+flag two
+  default: False
+  description: Use transformers 0.2. This will be selected by cabal picking the appropriate version.
+  manual: True
+
+flag three
+  default: False
+  manual: True
+  description: Use transformers 0.3. This will be selected by cabal picking the appropriate version.
+
+flag mtl
+  default: True
+  manual: True
+  description: -f-mtl Disables support for mtl for transformers 0.2 and 0.3. That is an unsupported configuration, and results in missing instances for `ExceptT`, but keeps the package Haskell 98.
+
+library
+  build-depends:
+    base >= 4.3 && < 5
+
+  hs-source-dirs:
+    src
+
+  exposed-modules:
+    Control.Monad.Trans.Instances
+
+  other-modules:
+    Paths_transformers_compat
+
+  if flag(three)
+    hs-source-dirs: 0.3
+    build-depends:
+      transformers >= 0.3 && < 0.4,
+      mtl >= 2.1 && < 2.2
+  else
+    if flag(two)
+      hs-source-dirs: 0.2 0.3
+      build-depends:
+        transformers >= 0.2 && < 0.3,
+        mtl >= 2.0 && < 2.1
+    else
+      build-depends: transformers >= 0.4.1 && < 0.6
+
+  if !flag(mtl)
+    cpp-options: -DHASKELL98
+  else
+    build-depends: ghc-prim
+
+  if flag(two)
+    exposed-modules:
+      Control.Applicative.Backwards
+      Control.Applicative.Lift
+      Data.Functor.Reverse
+
+  if flag(two) || flag(three)
+    exposed-modules:
+      Control.Monad.Trans.Except
+      Control.Monad.Signatures
+      Data.Functor.Classes
+      Data.Functor.Sum
diff --git a/test/golden-test-cases/transformers-compat.nix.golden b/test/golden-test-cases/transformers-compat.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/transformers-compat.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, ghc-prim, transformers }:
+mkDerivation {
+  pname = "transformers-compat";
+  version = "0.5.1.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ghc-prim transformers ];
+  homepage = "http://github.com/ekmett/transformers-compat/";
+  description = "A small compatibility shim exposing the new types from transformers 0.3 and 0.4 to older Haskell platforms.";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/transformers-lift.cabal b/test/golden-test-cases/transformers-lift.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/transformers-lift.cabal
@@ -0,0 +1,36 @@
+name:                transformers-lift
+version:             0.2.0.1
+synopsis:            Ad-hoc type classes for lifting
+description:
+    This simple and lightweight library provides type classes
+    for lifting monad transformer operations.
+
+license:             BSD3
+license-file:        LICENSE
+author:              Vladislav Zavialov
+maintainer:          Vladislav Zavialov <vlad.z.4096@gmail.com>
+category:            Control
+bug-reports:         https://github.com/int-index/transformers-lift/issues
+build-type:          Simple
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Control.Monad.Trans.Lift.Local
+                       Control.Monad.Trans.Lift.CallCC
+                       Control.Monad.Trans.Lift.Catch
+                       Control.Monad.Trans.Lift.Listen
+                       Control.Monad.Trans.Lift.Pass
+                       Control.Monad.Trans.Lift.StT
+
+  build-depends:       base >=4.6 && <4.11
+               ,       transformers >= 0.4.2.0
+               ,       writer-cps-transformers >= 0.1.1.3
+
+  default-language:    Haskell2010
+  other-extensions:    CPP
+                       RankNTypes
+                       TypeFamilies
+                       KindSignatures
+
+  hs-source-dirs:      src
+  ghc-options:         -Wall -fno-warn-deprecations
diff --git a/test/golden-test-cases/transformers-lift.nix.golden b/test/golden-test-cases/transformers-lift.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/transformers-lift.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, fetchurl, transformers
+, writer-cps-transformers
+}:
+mkDerivation {
+  pname = "transformers-lift";
+  version = "0.2.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base transformers writer-cps-transformers
+  ];
+  description = "Ad-hoc type classes for lifting";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/tree-fun.cabal b/test/golden-test-cases/tree-fun.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tree-fun.cabal
@@ -0,0 +1,70 @@
+-- Initial tree-fun.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+-- The name of the package.
+name:                tree-fun
+
+-- The package version.  See the Haskell package versioning policy (PVP) 
+-- for standards guiding when and how versions should be incremented.
+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
+-- PVP summary:      +-+------- breaking API changes
+--                   | | +----- non-breaking API additions
+--                   | | | +--- code changes with no API change
+version:             0.8.1.0
+
+-- A short (one-line) description of the package.
+synopsis:            Library for functions pertaining to tree exploration and manipulation
+
+-- A longer description of the package.
+-- description:         
+
+-- The license under which the package is released.
+license:             GPL-3
+
+-- The file containing the license text.
+license-file:        LICENSE
+
+-- The package author(s).
+author:              Gregory Schwartz
+
+-- An email address to which users can send suggestions, bug reports, and 
+-- patches.
+maintainer:          gs394@drexel.edu
+
+-- A copyright notice.
+-- copyright:           
+
+category:            Data Structure
+
+build-type:          Simple
+
+-- Extra files to be distributed with the package, such as examples or a 
+-- README.
+extra-source-files:  README.md
+
+-- Constraint on the version of Cabal needed to build this package.
+cabal-version:       >=1.10
+
+
+library
+  -- Modules exported by the library.
+  exposed-modules:     Math.TreeFun.Tree
+                     , Math.TreeFun.Types
+  
+  -- Modules included in this library but not exported.
+  -- other-modules:       
+  
+  -- LANGUAGE extensions used by modules in this package.
+  -- other-extensions:    
+  
+  -- Other library packages from which modules are imported.
+  build-depends:       base >=4.6 && <5
+                     , containers >=0.5
+                     , mtl >=2.1
+  
+  -- Directories containing source files.
+  hs-source-dirs:      src
+  
+  -- Base language which the package is written in.
+  default-language:    Haskell2010
+  
diff --git a/test/golden-test-cases/tree-fun.nix.golden b/test/golden-test-cases/tree-fun.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tree-fun.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, containers, fetchurl, mtl }:
+mkDerivation {
+  pname = "tree-fun";
+  version = "0.8.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers mtl ];
+  description = "Library for functions pertaining to tree exploration and manipulation";
+  license = stdenv.lib.licenses.gpl3;
+}
diff --git a/test/golden-test-cases/ttrie.cabal b/test/golden-test-cases/ttrie.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ttrie.cabal
@@ -0,0 +1,68 @@
+name:                ttrie
+version:             0.1.2.1
+synopsis:            Contention-free STM hash map
+description:
+  A contention-free STM hash map.
+  \"Contention-free\" means that the map will never cause spurious conflicts.
+  A transaction operating on the map will only ever have to retry if
+  another transaction is operating on the same key at the same time.
+  .
+  This is an implementation of the /transactional trie/,
+  which is basically a /lock-free concurrent hash trie/ lifted into STM.
+  For a detailed discussion, including an evaluation of its performance,
+  see Chapter 4 of <https://github.com/mcschroeder/thesis my master's thesis>.
+homepage:            http://github.com/mcschroeder/ttrie
+bug-reports:         http://github.com/mcschroeder/ttrie/issues
+license:             MIT
+license-file:        LICENSE
+author:              Michael Schröder
+maintainer:          mc.schroeder@gmail.com
+copyright:           (c) 2014-2015 Michael Schröder
+category:            Concurrency
+build-type:          Simple
+extra-source-files:  README.md, benchmarks/run.sh
+cabal-version:       >=1.10
+
+extra-source-files:  changelog.md
+
+source-repository head
+  type: git
+  location: https://github.com/mcschroeder/ttrie.git
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Control.Concurrent.STM.Map
+  other-modules:       Data.SparseArray
+  default-language:    Haskell2010
+  ghc-options:         -Wall
+  build-depends:       base >=4.7 && <5
+                     , atomic-primops >=0.6
+                     , hashable >=1.2
+                     , primitive >=0.5
+                     , stm >=2
+
+test-suite map-properties
+  hs-source-dirs:    tests
+  main-is:           MapProperties.hs
+  type:              exitcode-stdio-1.0
+
+  build-depends:
+      base
+    , QuickCheck >=2.5
+    , test-framework >=0.8
+    , test-framework-quickcheck2 >=0.3
+    , containers >=0.5
+    , hashable >=1.2
+    , stm
+    , ttrie
+
+benchmark bench
+  hs-source-dirs:      benchmarks
+  main-is:             Bench.hs
+  other-modules:       BenchGen
+  type:                exitcode-stdio-1.0
+  default-language:    Haskell2010
+  ghc-options:         -O2 -threaded -with-rtsopts=-N
+  build-depends:
+    base, async, bifunctors, containers, criterion-plus, deepseq, mwc-random, primitive, stm, stm-containers, stm-stats, text, transformers, ttrie, unordered-containers, vector
+
diff --git a/test/golden-test-cases/ttrie.nix.golden b/test/golden-test-cases/ttrie.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/ttrie.nix.golden
@@ -0,0 +1,29 @@
+{ mkDerivation, async, atomic-primops, base, bifunctors, containers
+, criterion-plus, deepseq, fetchurl, hashable, mwc-random
+, primitive, QuickCheck, stm, stm-containers, stm-stats
+, test-framework, test-framework-quickcheck2, text, transformers
+, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "ttrie";
+  version = "0.1.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    atomic-primops base hashable primitive stm
+  ];
+  testHaskellDepends = [
+    base containers hashable QuickCheck stm test-framework
+    test-framework-quickcheck2
+  ];
+  benchmarkHaskellDepends = [
+    async base bifunctors containers criterion-plus deepseq mwc-random
+    primitive stm stm-containers stm-stats text transformers
+    unordered-containers vector
+  ];
+  homepage = "http://github.com/mcschroeder/ttrie";
+  description = "Contention-free STM hash map";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/tuple-th.cabal b/test/golden-test-cases/tuple-th.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tuple-th.cabal
@@ -0,0 +1,23 @@
+Name:                tuple-th
+Version:             0.2.5
+Synopsis:            Generate (non-recursive) utility functions for tuples of statically known size
+Description:         Template Haskell functions for generating functions similar to those in Data.List for tuples of statically known size.
+License:             BSD3
+License-file:        LICENSE
+Author:              Daniel Schüssler
+Maintainer:          anotheraddress@gmx.de
+Category:            Template Haskell, Data
+Build-type:          Simple
+Cabal-version:       >=1.6
+Extra-source-files:  tests/Test.hs
+Bug-reports:         https://github.com/DanielSchuessler/tuple-th/issues
+
+Source-Repository head
+    Type: git
+    Location: git://github.com/DanielSchuessler/tuple-th.git
+
+Library
+  Exposed-modules: TupleTH     
+  Build-depends: base >= 4 && < 5, template-haskell, containers
+
+  
diff --git a/test/golden-test-cases/tuple-th.nix.golden b/test/golden-test-cases/tuple-th.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tuple-th.nix.golden
@@ -0,0 +1,12 @@
+{ mkDerivation, base, containers, fetchurl, template-haskell }:
+mkDerivation {
+  pname = "tuple-th";
+  version = "0.2.5";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers template-haskell ];
+  description = "Generate (non-recursive) utility functions for tuples of statically known size";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/tuples-homogenous-h98.cabal b/test/golden-test-cases/tuples-homogenous-h98.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tuples-homogenous-h98.cabal
@@ -0,0 +1,59 @@
+-- Initial tuples-homogenous-h98.cabal generated by cabal init.  For further 
+-- documentation, see http://haskell.org/cabal/users-guide/
+
+-- The name of the package.
+name:                tuples-homogenous-h98
+
+-- The package version.  See the Haskell package versioning policy (PVP) 
+-- for standards guiding when and how versions should be incremented.
+-- http://www.haskell.org/haskellwiki/Package_versioning_policy
+-- PVP summary:      +-+------- breaking API changes
+--                   | | +----- non-breaking API additions
+--                   | | | +--- code changes with no API change
+version:             0.1.1.0
+
+-- A short (one-line) description of the package.
+synopsis:            Wrappers for n-ary tuples with Traversable and Applicative/Monad instances.
+
+-- A longer description of the package.
+description:         Provides @newtype@ wrappers for n-ary homogenous tuples of types @(a,...,a)@ and instances for @Functor@, @Applicative@ (zipping), @Monad@, @Foldable@ and @Traversable@. The package aims to be Haskell98 compliant.
+
+-- URL for the project homepage or repository.
+homepage:            https://github.com/ppetr/tuples-homogenous-h98
+
+-- The license under which the package is released.
+license:             BSD3
+
+-- The file containing the license text.
+license-file:        LICENSE
+
+-- The package author(s).
+author:              Petr Pudlák
+
+-- An email address to which users can send suggestions, bug reports, and 
+-- patches.
+maintainer:          Petr Pudlák
+
+bug-reports:         https://github.com/ppetr/tuples-homogenous-h98/issues
+
+-- A copyright notice.
+-- copyright:           
+
+category:            Data
+
+build-type:          Simple
+
+-- Constraint on the version of Cabal needed to build this package.
+cabal-version:       >=1.8
+
+
+library
+  -- Modules exported by the library.
+  exposed-modules:     Data.Tuple.Homogenous
+  
+  -- Modules included in this library but not exported.
+  -- other-modules:       
+  
+  -- Other library packages from which modules are imported.
+  build-depends:       base >= 4 && < 5
+  
diff --git a/test/golden-test-cases/tuples-homogenous-h98.nix.golden b/test/golden-test-cases/tuples-homogenous-h98.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/tuples-homogenous-h98.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl }:
+mkDerivation {
+  pname = "tuples-homogenous-h98";
+  version = "0.1.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  homepage = "https://github.com/ppetr/tuples-homogenous-h98";
+  description = "Wrappers for n-ary tuples with Traversable and Applicative/Monad instances";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/turtle-options.cabal b/test/golden-test-cases/turtle-options.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/turtle-options.cabal
@@ -0,0 +1,56 @@
+name:                turtle-options
+version:             0.1.0.4
+synopsis:            Collection of command line options and parsers for these options
+description:         Please see README.md
+homepage:            https://github.com/elaye/turtle-options#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Elie Genard
+maintainer:          elaye@users.noreply.github.com
+copyright:           2016 Elie Genard
+category:            Utils
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Turtle.Options.Scale
+                     , Turtle.Options.Percentage
+                     , Turtle.Options.Quality
+                     , Turtle.Options.Timecode
+                     , Turtle.Options.Parsers
+  build-depends:       base >= 4.7 && < 5
+                     , parsec
+                     , text
+                     , optional-args
+                     , turtle
+  default-language:    Haskell2010
+
+executable example
+  hs-source-dirs:      app
+  main-is:             Main.hs
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  build-depends:       base
+                     , turtle
+                     , turtle-options
+  default-language:    Haskell2010
+
+test-suite turtle-options-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base
+                     , turtle-options
+                     , HUnit
+                     , parsec
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  other-modules:       Scale.Tests
+                     , Quality.Tests
+                     , Percentage.Tests
+                     , Timecode.Tests
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/elaye/turtle-options
diff --git a/test/golden-test-cases/turtle-options.nix.golden b/test/golden-test-cases/turtle-options.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/turtle-options.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, fetchurl, HUnit, optional-args, parsec, text
+, turtle
+}:
+mkDerivation {
+  pname = "turtle-options";
+  version = "0.1.0.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base optional-args parsec text turtle ];
+  executableHaskellDepends = [ base turtle ];
+  testHaskellDepends = [ base HUnit parsec ];
+  homepage = "https://github.com/elaye/turtle-options#readme";
+  description = "Collection of command line options and parsers for these options";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/type-operators.cabal b/test/golden-test-cases/type-operators.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/type-operators.cabal
@@ -0,0 +1,26 @@
+name:                type-operators
+version:             0.1.0.4
+synopsis:            Various type-level operators
+description:
+    A set of type-level operators meant to be helpful, e.g. ($) and a
+    tightly binding (->).
+homepage:            https://github.com/Shou/type-operators#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Benedict Aas
+maintainer:          x@shou.io
+copyright:           (C) 2016 Benedict Aas
+category:            Control
+build-type:          Simple
+-- extra-source-files:
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Control.Type.Operator
+  build-depends:       base >= 4.7 && < 5,
+                       ghc-prim
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/Shou/type-operators
diff --git a/test/golden-test-cases/type-operators.nix.golden b/test/golden-test-cases/type-operators.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/type-operators.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, ghc-prim }:
+mkDerivation {
+  pname = "type-operators";
+  version = "0.1.0.4";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ghc-prim ];
+  homepage = "https://github.com/Shou/type-operators#readme";
+  description = "Various type-level operators";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/type-spec.cabal b/test/golden-test-cases/type-spec.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/type-spec.cabal
@@ -0,0 +1,102 @@
+name:                 type-spec
+version:              0.3.0.1
+synopsis:             Type Level Specification by Example
+description:          Please see README.md
+homepage:             https://github.com/sheyll/type-spec#readme
+license:              BSD3
+license-file:         LICENSE
+author:               Sven Heyll
+maintainer:           sven.heyll@gmail.com
+copyright:            2016 Sven Heyll
+category:             Testing
+build-type:           Simple
+extra-source-files:   examples/Main.hs
+                    , README.md
+                    , stack.yaml
+                    , .travis.yml
+cabal-version:        >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Test.TypeSpec
+                     , Test.TypeSpecCrazy
+                     , Test.TypeSpec.Core
+                     , Test.TypeSpec.Group
+                     , Test.TypeSpec.Label
+                     , Test.TypeSpec.ShouldBe
+                     , Test.TypeSpec.Internal.Apply
+                     , Test.TypeSpec.Internal.Either
+                     , Test.TypeSpec.Internal.Equality
+                     , Test.TypeSpec.Internal.Result
+  build-depends:       base >= 4.9 && < 5
+                     , pretty >= 1.1.3 && < 1.2
+  default-language:    Haskell2010
+  default-extensions:  ConstraintKinds
+                     , CPP
+                     , DataKinds
+                     , DefaultSignatures
+                     , DeriveDataTypeable
+                     , DeriveFunctor
+                     , DeriveGeneric
+                     , FlexibleInstances
+                     , FlexibleContexts
+                     , FunctionalDependencies
+                     , GADTs
+                     , GeneralizedNewtypeDeriving
+                     , KindSignatures
+                     , MultiParamTypeClasses
+                     , OverloadedStrings
+                     , PolyKinds
+                     , QuasiQuotes
+                     , RecordWildCards
+                     , RankNTypes
+                     , ScopedTypeVariables
+                     , StandaloneDeriving
+                     , TemplateHaskell
+                     , TupleSections
+                     , TypeFamilies
+                     , TypeInType
+                     , TypeOperators
+                     , TypeSynonymInstances
+                     , UndecidableInstances
+  ghc-options:       -Wall
+
+test-suite examples
+  type:                exitcode-stdio-1.0
+  ghc-options:         -Wall
+  hs-source-dirs:      examples
+  main-is:             Main.hs
+  default-language:    Haskell2010
+  build-depends:       base >= 4.9 && < 5
+                     , type-spec
+  default-language:    Haskell2010
+  default-extensions:  ConstraintKinds
+                     , CPP
+                     , DataKinds
+                     , DefaultSignatures
+                     , DeriveDataTypeable
+                     , DeriveFunctor
+                     , DeriveGeneric
+                     , FlexibleInstances
+                     , FlexibleContexts
+                     , FunctionalDependencies
+                     , GADTs
+                     , GeneralizedNewtypeDeriving
+                     , KindSignatures
+                     , MultiParamTypeClasses
+                     , OverloadedStrings
+                     , QuasiQuotes
+                     , RecordWildCards
+                     , RankNTypes
+                     , ScopedTypeVariables
+                     , StandaloneDeriving
+                     , TemplateHaskell
+                     , TupleSections
+                     , TypeFamilies
+                     , TypeInType
+                     , TypeOperators
+                     , TypeSynonymInstances
+
+source-repository head
+  type:     git
+  location: https://github.com/sheyll/type-spec
diff --git a/test/golden-test-cases/type-spec.nix.golden b/test/golden-test-cases/type-spec.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/type-spec.nix.golden
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchurl, pretty }:
+mkDerivation {
+  pname = "type-spec";
+  version = "0.3.0.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base pretty ];
+  testHaskellDepends = [ base ];
+  homepage = "https://github.com/sheyll/type-spec#readme";
+  description = "Type Level Specification by Example";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/unicode-show.cabal b/test/golden-test-cases/unicode-show.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unicode-show.cabal
@@ -0,0 +1,48 @@
+name:                unicode-show
+version:             0.1.0.2
+synopsis:            print and show in unicode
+description:
+            This package provides variants of 'show' and 'print' functions that does not escape non-ascii characters.
+            .
+            See <http://github.com/nushio3/unicode-show#readme README> for usage.
+            .
+            Run ghci with  @-interactive-print@ flag to print unicode characters. See <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/interactive-evaluation.html#ghci-interactive-print Using a custom interactive printing function> section in the GHC manual.
+
+
+
+
+homepage:            http://github.com/nushio3/unicode-show#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Takayuki Muranushi
+maintainer:          muranushi@gmail.com
+copyright:           2016 Takayuki Muranushi
+category:            Text
+build-type:          Simple
+-- extra-source-files:
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Text.Show.Unicode
+  build-depends:       base >= 4.7 && < 5
+  default-language:    Haskell2010
+
+test-suite unicode-show-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base
+                     , HUnit
+                     , QuickCheck
+                     , unicode-show
+                     , test-framework
+                     , test-framework-hunit
+                     , test-framework-quickcheck2
+
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/nushio3/unicode-show
diff --git a/test/golden-test-cases/unicode-show.nix.golden b/test/golden-test-cases/unicode-show.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unicode-show.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, fetchurl, HUnit, QuickCheck, test-framework
+, test-framework-hunit, test-framework-quickcheck2
+}:
+mkDerivation {
+  pname = "unicode-show";
+  version = "0.1.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base HUnit QuickCheck test-framework test-framework-hunit
+    test-framework-quickcheck2
+  ];
+  homepage = "http://github.com/nushio3/unicode-show#readme";
+  description = "print and show in unicode";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/unique.cabal b/test/golden-test-cases/unique.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unique.cabal
@@ -0,0 +1,31 @@
+name:          unique
+category:      Concurrency, Data
+version:       0
+license:       BSD3
+cabal-version: >= 1.10
+license-file:  LICENSE
+author:        Edward A. Kmett
+maintainer:    Edward A. Kmett <ekmett@gmail.com>
+stability:     experimental
+homepage:      http://github.com/ekmett/unique/
+bug-reports:   http://github.com/ekmett/unique/issues
+copyright:     Copyright (C) 2015 Edward A. Kmett
+synopsis:      Fully concurrent unique identifiers
+description:   Fully concurrent unique identifiers
+build-type:    Simple
+extra-source-files: .travis.yml CHANGELOG.markdown README.markdown stack.yaml
+
+source-repository head
+  type: git
+  location: git://github.com/ekmett/unique.git
+
+library
+  default-language: Haskell2010
+  hs-source-dirs: src
+  other-extensions: CPP, MagicHash, UnboxedTuples
+  exposed-modules: Control.Concurrent.Unique
+  ghc-options: -Wall
+  build-depends:
+    base     >= 4.5 && < 5,
+    hashable >= 1.1 && < 1.3,
+    ghc-prim >= 0.2 && < 0.5
diff --git a/test/golden-test-cases/unique.nix.golden b/test/golden-test-cases/unique.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unique.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, ghc-prim, hashable }:
+mkDerivation {
+  pname = "unique";
+  version = "0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ghc-prim hashable ];
+  homepage = "http://github.com/ekmett/unique/";
+  description = "Fully concurrent unique identifiers";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/unix-bytestring.cabal b/test/golden-test-cases/unix-bytestring.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unix-bytestring.cabal
@@ -0,0 +1,62 @@
+----------------------------------------------------------------
+-- wren gayle romano <wren@community.haskell.org>   ~ 2015.05.30
+----------------------------------------------------------------
+
+-- By and large Cabal >=1.2 is fine; but >= 1.6 gives tested-with:
+-- and source-repository:.
+Cabal-Version:  >= 1.6
+Build-Type:     Simple
+
+Name:           unix-bytestring
+Version:        0.3.7.3
+Stability:      provisional
+Homepage:       http://code.haskell.org/~wren/
+Author:         wren gayle romano
+Maintainer:     wren@community.haskell.org
+Copyright:      Copyright (c) 2010--2015 wren gayle romano
+License:        BSD3
+License-File:   LICENSE
+
+Category:       System
+Synopsis:       Unix/Posix-specific functions for ByteStrings.
+Description:    Unix\/Posix-specific functions for ByteStrings.
+    .
+    Provides @ByteString@ file-descriptor based I\/O API, designed
+    loosely after the @String@ file-descriptor based I\/O API in
+    "System.Posix.IO". The functions here wrap standard C implementations
+    of the functions specified by the ISO\/IEC 9945-1:1990 (``POSIX.1'')
+    and X\/Open Portability Guide Issue 4, Version 2 (``XPG4.2'')
+    specifications.
+    .
+    Note that this package doesn't require the @unix@ package as a
+    dependency. But you'll need it in order to get your hands on
+    an @Fd@, so we're not offering a complete replacement.
+
+Tested-With:
+    GHC ==6.12.1, GHC ==6.12.3, GHC ==7.4.2, GHC ==7.6.1, GHC ==7.8.0
+Extra-source-files:
+    README, CHANGELOG
+Source-Repository head
+    Type:     darcs
+    Location: http://community.haskell.org/~wren/unix-bytestring
+
+----------------------------------------------------------------
+Library
+    Hs-Source-Dirs:  src
+    Exposed-Modules: Foreign.C.Error.Safe
+                   , System.Posix.IO.ByteString
+                   , System.Posix.IO.ByteString.Lazy
+                   , System.Posix.Types.Iovec
+
+    -- We require base>=4.1 for Foreign.C.Error.throwErrnoIfMinus1Retry.
+    --
+    -- We would require unix>=2.4 for System.Posix.IO.fdReadBuf/fdWriteBuf
+    -- (and unix-2.4.0.0 requires base>=4.1 too), except we define
+    -- them on our own for better backwards compatibility.
+    --
+    -- Not sure what the real minbound is on bytestring...
+    Build-Depends: base       >= 4.1 && < 5
+                 , bytestring >= 0.9.1.5
+
+----------------------------------------------------------------
+----------------------------------------------------------- fin.
diff --git a/test/golden-test-cases/unix-bytestring.nix.golden b/test/golden-test-cases/unix-bytestring.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unix-bytestring.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, bytestring, fetchurl }:
+mkDerivation {
+  pname = "unix-bytestring";
+  version = "0.3.7.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring ];
+  homepage = "http://code.haskell.org/~wren/";
+  description = "Unix/Posix-specific functions for ByteStrings";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/unlit.cabal b/test/golden-test-cases/unlit.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unlit.cabal
@@ -0,0 +1,44 @@
+name:                unlit
+version:             0.4.0.0
+synopsis:            Tool to convert literate code between styles or to code.
+description:         Tool to convert literate code between styles or to code.
+                     Usage:
+                     .
+                     > unlit
+                     >   -f STYLE_NAME  --from=STYLE_NAME    Source style (all, bird, haskell, latex, markdown, tildefence, backtickfence)
+                     >   -t STYLE_NAME  --to=STYLE_NAME      Target style (bird, latex, tildefence, backtickfence, code)
+                     >   -i FILE        --input=FILE         Input file (optional)
+                     >   -o FILE        --output=FILE        Output file (optional)
+                     >   -l LANGUAGE    --language=LANGUAGE  Programming language (restrict fenced code blocks)
+                     >   -h             --help               Show help
+                     >   -v             --version            Show version
+                     .
+
+license:             BSD3
+license-file:        LICENSE
+author:              Pepijn Kokke
+maintainer:          pepijn.kokke@gmail.com
+copyright:           2014 (c) Pepijn Kokke
+category:            Language
+build-type:          Simple
+cabal-version:       >=1.10
+
+source-repository head
+  type:     git
+  location: https://github.com/pepijnkokke/unlit
+
+library
+  exposed-modules:     Unlit.Text, Unlit.String
+  hs-source-dirs:      src
+  other-extensions:    OverloadedStrings
+  ghc-options:         -Wall -fwarn-incomplete-patterns
+  build-depends:       base >= 4.7 && < 5, directory, text
+  default-language:    Haskell2010
+
+executable unlit
+  main-is:             Main.hs
+  hs-source-dirs:      exe
+  other-extensions:    OverloadedStrings
+  ghc-options:         -Wall -fwarn-incomplete-patterns
+  build-depends:       base >= 4.7 && < 5, directory, text, unlit
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/unlit.nix.golden b/test/golden-test-cases/unlit.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/unlit.nix.golden
@@ -0,0 +1,15 @@
+{ mkDerivation, base, directory, fetchurl, text }:
+mkDerivation {
+  pname = "unlit";
+  version = "0.4.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [ base directory text ];
+  executableHaskellDepends = [ base directory text ];
+  description = "Tool to convert literate code between styles or to code";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/utility-ht.cabal b/test/golden-test-cases/utility-ht.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/utility-ht.cabal
@@ -0,0 +1,108 @@
+Name:             utility-ht
+Version:          0.0.14
+License:          BSD3
+License-File:     LICENSE
+Author:           Henning Thielemann <haskell@henning-thielemann.de>
+Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
+Category:         Data, List
+Synopsis:         Various small helper functions for Lists, Maybes, Tuples, Functions
+Description:
+  Various small helper functions for Lists, Maybes, Tuples, Functions.
+  Some of these functions are improved implementations of standard functions.
+  They have the same name as their standard counterparts.
+  Others are equivalent to functions from the @base@ package,
+  but if you import them from this utility package
+  then you can write code that runs on older GHC versions
+  or other compilers like Hugs and JHC.
+  .
+  All modules are plain Haskell 98.
+  The package depends exclusively on the @base@ package
+  and only that portions of @base@ that are simple to port.
+  Thus you do not risk a dependency avalanche by importing it.
+  However, further splitting the base package might invalidate this statement.
+  .
+  Alternative packages: @Useful@, @MissingH@
+Tested-With:       GHC==6.8.2, GHC==6.10.4, GHC==6.12.3
+Tested-With:       GHC==7.0.2, GHC==7.2.2, GHC==7.4.1, GHC==7.8.2
+Cabal-Version:     >=1.10
+Build-Type:        Simple
+Stability:         Stable
+
+-- workaround for Cabal-1.10
+Extra-Source-Files:
+  src/Test/Data/Maybe.hs
+  src/Test/Data/ListMatch.hs
+  src/Test/Data/Function.hs
+  src/Test/Data/List.hs
+  src/Test/Utility.hs
+  src/Test.hs
+
+Source-Repository head
+  type:     darcs
+  location: http://code.haskell.org/~thielema/utility/
+
+Source-Repository this
+  type:     darcs
+  location: http://code.haskell.org/~thielema/utility/
+  tag:      0.0.14
+
+Library
+  Build-Depends:
+    base >=2 && <5
+
+  Default-Language: Haskell98
+  GHC-Options:      -Wall
+  Hs-Source-Dirs:   src
+  Exposed-Modules:
+    Data.Bits.HT
+    Data.Bool.HT
+    Data.Eq.HT
+    Data.Function.HT
+    Data.Ix.Enum
+    Data.List.HT
+    Data.List.Key
+    Data.List.Match
+    Data.List.Reverse.StrictElement
+    Data.List.Reverse.StrictSpine
+    Data.Maybe.HT
+    Data.Either.HT
+    Data.Monoid.HT
+    Data.Ord.HT
+    Data.Record.HT
+    Data.String.HT
+    Data.Tuple.HT
+    Data.Tuple.Lazy
+    Data.Tuple.Strict
+    Control.Monad.HT
+    Control.Applicative.HT
+    Control.Functor.HT
+    Data.Strictness.HT
+    Text.Read.HT
+    Text.Show.HT
+  Other-Modules:
+    Data.Bool.HT.Private
+    Data.List.HT.Private
+    Data.List.Key.Private
+    Data.List.Match.Private
+    Data.Function.HT.Private
+    Data.Record.HT.Private
+    Data.Tuple.Example
+
+
+Test-Suite test
+  Type:             exitcode-stdio-1.0
+  Build-Depends:
+    QuickCheck >=1.1 && <3,
+    base >=3 && <5
+  Default-Language: Haskell98
+  Main-Is:          Test.hs
+  GHC-Options:      -Wall
+  Hs-source-dirs:   src
+  Other-Modules:
+    Test.Data.List
+    Test.Data.ListMatch
+    Test.Data.List.Reverse.StrictElement
+    Test.Data.List.Reverse.StrictSpine
+    Test.Data.Maybe
+    Test.Data.Function
+    Test.Utility
diff --git a/test/golden-test-cases/utility-ht.nix.golden b/test/golden-test-cases/utility-ht.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/utility-ht.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, fetchurl, QuickCheck }:
+mkDerivation {
+  pname = "utility-ht";
+  version = "0.0.14";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base ];
+  testHaskellDepends = [ base QuickCheck ];
+  description = "Various small helper functions for Lists, Maybes, Tuples, Functions";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/validity-aeson.cabal b/test/golden-test-cases/validity-aeson.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/validity-aeson.cabal
@@ -0,0 +1,33 @@
+name: validity-aeson
+version: 0.1.0.0
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: Copyright: (c) 2017 Tom Sydney Kerckhove
+maintainer: syd.kerckhove@gmail.com
+homepage: https://github.com/NorfairKing/validity#readme
+synopsis: Validity instances for aeson
+description:
+    Please see README.md
+category: Validity
+author: Tom Sydney Kerckhove
+
+source-repository head
+    type: git
+    location: https://github.com/NorfairKing/validity
+
+library
+    exposed-modules:
+        Data.Validity.Aeson
+    build-depends:
+        base >=4.7 && <5,
+        aeson -any,
+        validity >=0.4 && <0.5,
+        validity-text >=0.2 && <0.3,
+        validity-unordered-containers >=0.1 && <0.2,
+        validity-vector >=0.1 && <0.2,
+        validity-scientific >=0.1 && <0.2
+    default-language: Haskell2010
+    hs-source-dirs: src
+
diff --git a/test/golden-test-cases/validity-aeson.nix.golden b/test/golden-test-cases/validity-aeson.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/validity-aeson.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, aeson, base, fetchurl, validity
+, validity-scientific, validity-text, validity-unordered-containers
+, validity-vector
+}:
+mkDerivation {
+  pname = "validity-aeson";
+  version = "0.1.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base validity validity-scientific validity-text
+    validity-unordered-containers validity-vector
+  ];
+  homepage = "https://github.com/NorfairKing/validity#readme";
+  description = "Validity instances for aeson";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/validity-containers.cabal b/test/golden-test-cases/validity-containers.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/validity-containers.cabal
@@ -0,0 +1,33 @@
+name: validity-containers
+version: 0.2.0.0
+cabal-version: >=1.10
+build-type: Simple
+license: MIT
+license-file: LICENSE
+copyright: Copyright: (c) 2016 Tom Sydney Kerckhove
+maintainer: syd.kerckhove@gmail.com
+homepage: https://github.com/NorfairKing/validity#readme
+synopsis: Validity instances for containers
+description:
+    Please see README.md
+category: Validity
+author: Tom Sydney Kerckhove
+
+source-repository head
+    type: git
+    location: https://github.com/NorfairKing/validity
+
+library
+    exposed-modules:
+        Data.Validity.Containers
+        Data.Validity.Tree
+        Data.Validity.Map
+        Data.Validity.Sequence
+        Data.Validity.Set
+    build-depends:
+        base >=4.7 && <5,
+        validity >=0.4 && <0.5,
+        containers -any
+    default-language: Haskell2010
+    hs-source-dirs: src
+
diff --git a/test/golden-test-cases/validity-containers.nix.golden b/test/golden-test-cases/validity-containers.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/validity-containers.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, containers, fetchurl, validity }:
+mkDerivation {
+  pname = "validity-containers";
+  version = "0.2.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base containers validity ];
+  homepage = "https://github.com/NorfairKing/validity#readme";
+  description = "Validity instances for containers";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/vector-mmap.cabal b/test/golden-test-cases/vector-mmap.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/vector-mmap.cabal
@@ -0,0 +1,33 @@
+Name:           vector-mmap
+Version:        0.0.3
+License:        BSD3
+License-File:   LICENSE
+Author:         Daniel Peebles <pumpkingod@gmail.com>
+Maintainer:     Daniel Peebles <pumpkingod@gmail.com>
+Copyright:      (c) Daniel Peebles 2010
+Homepage:       http://github.com/pumpkin/vector-mmap
+Category:       Data, Data Structures
+Synopsis:       Memory map immutable and mutable vectors
+Description:
+        Memory map immutable and mutable vectors.
+
+Cabal-Version:  >= 1.8
+Build-Type:     Simple
+
+Library
+  Exposed-Modules:
+        Data.Vector.Storable.MMap
+
+  Build-Depends: base >= 2 && < 5, mmap >= 0.5.4, vector >= 0.5, primitive >= 0.2.1
+
+
+Test-Suite quickcheck
+  Type: exitcode-stdio-1.0
+  HS-Source-Dirs: test
+  Main-is: TestSuite.hs
+  build-depends: base >= 2 && < 5, vector-mmap, vector, QuickCheck, temporary
+
+
+Source-Repository head
+  Type: git
+  Location: https://github.com/copumpkin/vector-mmap
diff --git a/test/golden-test-cases/vector-mmap.nix.golden b/test/golden-test-cases/vector-mmap.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/vector-mmap.nix.golden
@@ -0,0 +1,16 @@
+{ mkDerivation, base, fetchurl, mmap, primitive, QuickCheck
+, temporary, vector
+}:
+mkDerivation {
+  pname = "vector-mmap";
+  version = "0.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base mmap primitive vector ];
+  testHaskellDepends = [ base QuickCheck temporary vector ];
+  homepage = "http://github.com/pumpkin/vector-mmap";
+  description = "Memory map immutable and mutable vectors";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/vivid-supercollider.cabal b/test/golden-test-cases/vivid-supercollider.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/vivid-supercollider.cabal
@@ -0,0 +1,69 @@
+name:                vivid-supercollider
+version:             0.3.0.0
+synopsis:
+  Implementation of SuperCollider server specifications
+description:
+  An interface-agnostic implementation of specs for
+  SuperCollider server types and commands.
+   - Server Command Reference
+   - Synth Definition File Format
+  .
+  Note this is an in-progress (incomplete) implementation. Currently only the
+  server commands needed for the \"vivid\" package are supported.
+license:             GPL
+author:              Tom Murphy
+maintainer:          Tom Murphy
+-- copyright:           
+category:            Audio, Music, Sound
+build-type:          Simple
+cabal-version:       >=1.10
+
+library
+  exposed-modules:
+      Vivid.SC.Server.Commands
+    , Vivid.SC.Server.Types
+    , Vivid.SC.SynthDef.Types
+    , Vivid.SC.SynthDef.Literally
+  -- other-modules:       
+  other-extensions:
+      ScopedTypeVariables
+    , LambdaCase
+    , OverloadedStrings
+    , NoMonomorphismRestriction
+    , NoUndecidableInstances
+    , ViewPatterns
+  build-depends:
+      base >3 && <5
+    , vivid-osc >=0.3 && <0.4
+    -- todo: replace completely with cereal:
+    , binary
+      -- >=0.8 && <0.9
+    , bytestring
+      -- >=0.10 && <0.11
+    , utf8-string
+      -- >=1.0 && <1.1
+    , split
+      -- >=0.2 && <0.3
+    , cereal
+      -- >=0.5 && <0.6
+  -- hs-source-dirs:      
+  default-language:    Haskell2010
+
+test-suite vivid-sc-tests
+  hs-source-dirs: test
+  main-is: Test.hs
+  type: exitcode-stdio-1.0
+  build-depends:
+      base >3 && <5
+    , vivid-supercollider
+
+    -- todo: remove binary?:
+    , binary
+    , bytestring
+    , cereal
+    , microspec >=0.1 && <0.2
+    , QuickCheck
+       -- >=2.9 && <2.10
+    , utf8-string
+    , vivid-osc
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/vivid-supercollider.nix.golden b/test/golden-test-cases/vivid-supercollider.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/vivid-supercollider.nix.golden
@@ -0,0 +1,20 @@
+{ mkDerivation, base, binary, bytestring, cereal, fetchurl
+, microspec, QuickCheck, split, utf8-string, vivid-osc
+}:
+mkDerivation {
+  pname = "vivid-supercollider";
+  version = "0.3.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base binary bytestring cereal split utf8-string vivid-osc
+  ];
+  testHaskellDepends = [
+    base binary bytestring cereal microspec QuickCheck utf8-string
+    vivid-osc
+  ];
+  description = "Implementation of SuperCollider server specifications";
+  license = "GPL";
+}
diff --git a/test/golden-test-cases/vty.cabal b/test/golden-test-cases/vty.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/vty.cabal
@@ -0,0 +1,624 @@
+name:                vty
+version:             5.19.1
+license:             BSD3
+license-file:        LICENSE
+author:              AUTHORS
+maintainer:          Jonathan Daugherty (cygnus@foobox.com)
+homepage:            https://github.com/jtdaugherty/vty
+category:            User Interfaces
+synopsis:            A simple terminal UI library
+description:
+  vty is terminal GUI library in the niche of ncurses. It is intended to
+  be easy to use, have no confusing corner cases, and good support for
+  common terminal types.
+  .
+  See the @vty-examples@ package as well as the program
+  @test/interactive_terminal_test.hs@ included in the @vty@ package for
+  examples on how to use the library.
+  .
+  Import the "Graphics.Vty" convenience module to get access to the core
+  parts of the library.
+  .
+  &#169; 2006-2007 Stefan O'Rear; BSD3 license.
+  .
+  &#169; Corey O'Connor; BSD3 license.
+  .
+  &#169; Jonathan Daugherty; BSD3 license.
+cabal-version:       >= 1.18
+build-type:          Simple
+extra-doc-files:     README.md,
+                     AUTHORS,
+                     CHANGELOG.md,
+                     LICENSE
+tested-with:         GHC >= 7.6.2
+
+source-repository head
+  type: git
+  location: https://github.com/jtdaugherty/vty.git
+
+library
+  default-language:    Haskell2010
+  build-depends:       base >= 4.8 && < 5,
+                       blaze-builder >= 0.3.3.2 && < 0.5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       directory,
+                       filepath >= 1.0 && < 2.0,
+                       microlens,
+                       microlens-mtl,
+                       microlens-th,
+                       -- required for nice installation with yi
+                       hashable >= 1.2,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       parallel >= 2.2 && < 3.3,
+                       parsec >= 2 && < 4,
+                       stm,
+                       terminfo >= 0.3 && < 0.5,
+                       transformers >= 0.3.0.0,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+  exposed-modules:     Graphics.Vty
+                       Graphics.Vty.Attributes
+                       Graphics.Vty.Config
+                       Graphics.Vty.Error
+                       Graphics.Vty.Image
+                       Graphics.Vty.Inline
+                       Graphics.Vty.Inline.Unsafe
+                       Graphics.Vty.Input
+                       Graphics.Vty.Input.Events
+                       Graphics.Vty.Picture
+                       Graphics.Vty.Output
+                       Graphics.Text.Width
+                       -- the modules below are only meant to be used by the tests.
+                       Codec.Binary.UTF8.Debug
+                       Data.Terminfo.Parse
+                       Data.Terminfo.Eval
+                       Graphics.Vty.Debug
+                       Graphics.Vty.DisplayAttributes
+                       Graphics.Vty.Image.Internal
+                       Graphics.Vty.Input.Classify
+                       Graphics.Vty.Input.Classify.Types
+                       Graphics.Vty.Input.Classify.Parse
+                       Graphics.Vty.Input.Loop
+                       Graphics.Vty.Input.Mouse
+                       Graphics.Vty.Input.Focus
+                       Graphics.Vty.Input.Paste
+                       Graphics.Vty.Input.Terminfo
+                       Graphics.Vty.PictureToSpans
+                       Graphics.Vty.Span
+                       Graphics.Vty.Output.Mock
+                       Graphics.Vty.Output.Interface
+                       Graphics.Vty.Output.XTermColor
+                       Graphics.Vty.Output.TerminfoBased
+
+  other-modules:       Graphics.Vty.Attributes.Color
+                       Graphics.Vty.Attributes.Color240
+                       Graphics.Vty.Debug.Image
+                       Graphics.Vty.Input.Terminfo.ANSIVT
+
+  c-sources:           cbits/gwinsz.c
+                       cbits/set_term_timing.c
+                       cbits/mk_wcwidth.c
+
+  include-dirs:        cbits
+
+  hs-source-dirs:      src
+
+  default-extensions:  ScopedTypeVariables
+                       ForeignFunctionInterface
+
+  ghc-options:         -O2 -funbox-strict-fields -Wall -fspec-constr -fspec-constr-count=10
+
+  ghc-prof-options:    -O2 -funbox-strict-fields -caf-all -Wall -fspec-constr -fspec-constr-count=10
+
+  cc-options:          -O2
+
+executable vty-mode-demo
+  main-is:             ModeDemo.hs
+  hs-source-dirs:      demos
+
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+  ghc-options:         -threaded
+
+  build-depends:       vty,
+                       base >= 4.8 && < 5,
+                       containers,
+                       microlens,
+                       microlens-mtl,
+                       mtl >= 1.1.1.0 && < 2.3
+
+executable vty-demo
+  main-is:             Demo.hs
+  hs-source-dirs:      demos
+
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+  ghc-options:         -threaded
+
+  build-depends:       vty,
+                       base >= 4.8 && < 5,
+                       containers,
+                       microlens,
+                       microlens-mtl,
+                       mtl >= 1.1.1.0 && < 2.3
+
+test-suite verify-attribute-ops
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+  type:                detailed-0.9
+  hs-source-dirs:      test
+  test-module:         VerifyAttributeOps
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-using-mock-terminal
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyUsingMockTerminal
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.Prelude
+                       Verify.Graphics.Vty.Picture
+                       Verify.Graphics.Vty.Image
+                       Verify.Graphics.Vty.Span
+                       Verify.Graphics.Vty.Output
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       terminfo >= 0.3 && < 0.5,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-terminal
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyOutput
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.Prelude
+                       Verify.Graphics.Vty.Picture
+                       Verify.Graphics.Vty.Image
+                       Verify.Graphics.Vty.Span
+                       Verify.Graphics.Vty.Output
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       terminfo >= 0.3 && < 0.5,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-display-attributes
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyDisplayAttributes
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.DisplayAttributes
+                       Verify.Graphics.Vty.Prelude
+                       Verify.Graphics.Vty.Picture
+                       Verify.Graphics.Vty.Image
+                       Verify.Graphics.Vty.Span
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-empty-image-props
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyEmptyImageProps
+
+  other-modules:       Verify
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-eval-terminfo-caps
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyEvalTerminfoCaps
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Output
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       blaze-builder >= 0.3.3.2 && < 0.5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       terminfo >= 0.3 && < 0.5,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-image-ops
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyImageOps
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.Image
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-image-trans
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyImageTrans
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.Image
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-inline
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyInline
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Output
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-parse-terminfo-caps
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyParseTerminfoCaps
+
+  other-modules:       Verify
+                       Verify.Data.Terminfo.Parse
+                       Verify.Graphics.Vty.Output
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       terminfo >= 0.3 && < 0.5,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-simple-span-generation
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifySimpleSpanGeneration
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.Prelude
+                       Verify.Graphics.Vty.Picture
+                       Verify.Graphics.Vty.Image
+                       Verify.Graphics.Vty.Span
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+
+test-suite verify-crop-span-generation
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyCropSpanGeneration
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.Prelude
+                       Verify.Graphics.Vty.Picture
+                       Verify.Graphics.Vty.Image
+                       Verify.Graphics.Vty.Span
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+
+test-suite verify-layers-span-generation
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyLayersSpanGeneration
+
+  other-modules:       Verify
+                       Verify.Graphics.Vty.Attributes
+                       Verify.Graphics.Vty.Prelude
+                       Verify.Graphics.Vty.Picture
+                       Verify.Graphics.Vty.Image
+                       Verify.Graphics.Vty.Span
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-utf8-width
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                detailed-0.9
+
+  hs-source-dirs:      test
+
+  test-module:         VerifyUtf8Width
+
+  other-modules:       Verify
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+test-suite verify-using-mock-input
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                exitcode-stdio-1.0
+
+  hs-source-dirs:      test
+
+  main-is:             VerifyUsingMockInput.hs
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       QuickCheck >= 2.7,
+                       smallcheck == 1.*,
+                       quickcheck-assertions >= 0.1.1,
+                       test-framework == 0.8.*,
+                       test-framework-smallcheck == 0.2.*,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       microlens,
+                       microlens-mtl,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       stm,
+                       terminfo >= 0.3 && < 0.5,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+  ghc-options:         -threaded -Wall
+
+test-suite verify-config
+  default-language:    Haskell2010
+  default-extensions:  ScopedTypeVariables
+
+  type:                exitcode-stdio-1.0
+
+  hs-source-dirs:      test
+
+  main-is:             VerifyConfig.hs
+
+  build-depends:       vty,
+                       Cabal >= 1.20,
+                       HUnit,
+                       QuickCheck >= 2.7,
+                       smallcheck == 1.*,
+                       quickcheck-assertions >= 0.1.1,
+                       test-framework == 0.8.*,
+                       test-framework-smallcheck == 0.2.*,
+                       test-framework-hunit,
+                       random >= 1.0 && < 1.2,
+                       base >= 4.8 && < 5,
+                       bytestring,
+                       containers,
+                       deepseq >= 1.1 && < 1.5,
+                       microlens,
+                       microlens-mtl,
+                       mtl >= 1.1.1.0 && < 2.3,
+                       string-qq,
+                       terminfo >= 0.3 && < 0.5,
+                       text >= 0.11.3,
+                       unix,
+                       utf8-string >= 0.3 && < 1.1,
+                       vector >= 0.7
+
+  ghc-options:         -threaded -Wall
diff --git a/test/golden-test-cases/vty.nix.golden b/test/golden-test-cases/vty.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/vty.nix.golden
@@ -0,0 +1,36 @@
+{ mkDerivation, base, blaze-builder, bytestring, Cabal, containers
+, deepseq, directory, fetchurl, filepath, hashable, HUnit
+, microlens, microlens-mtl, microlens-th, mtl, parallel, parsec
+, QuickCheck, quickcheck-assertions, random, smallcheck, stm
+, string-qq, terminfo, test-framework, test-framework-hunit
+, test-framework-smallcheck, text, transformers, unix, utf8-string
+, vector
+}:
+mkDerivation {
+  pname = "vty";
+  version = "5.19.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    base blaze-builder bytestring containers deepseq directory filepath
+    hashable microlens microlens-mtl microlens-th mtl parallel parsec
+    stm terminfo text transformers unix utf8-string vector
+  ];
+  executableHaskellDepends = [
+    base containers microlens microlens-mtl mtl
+  ];
+  testHaskellDepends = [
+    base blaze-builder bytestring Cabal containers deepseq HUnit
+    microlens microlens-mtl mtl QuickCheck quickcheck-assertions random
+    smallcheck stm string-qq terminfo test-framework
+    test-framework-hunit test-framework-smallcheck text unix
+    utf8-string vector
+  ];
+  homepage = "https://github.com/jtdaugherty/vty";
+  description = "A simple terminal UI library";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/wai-cors.cabal b/test/golden-test-cases/wai-cors.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-cors.cabal
@@ -0,0 +1,168 @@
+-- ------------------------------------------------------ --
+-- Copyright © 2015-2017 Lars Kuhtz <lakuhtz@gmail.com>
+-- Copyright © 2014 AlephCloud Systems, Inc.
+-- ------------------------------------------------------ --
+
+Name: wai-cors
+Version: 0.2.6
+Synopsis: CORS for WAI
+
+Description:
+    This package provides an implemenation of
+    Cross-Origin resource sharing (CORS) for
+    <http://hackage.haskell.org/package/wai Wai>
+    that aims to be compliant with <http://www.w3.org/TR/cors>.
+
+Homepage: https://github.com/larskuhtz/wai-cors
+Bug-reports: https://github.com/larskuhtz/wai-cors/issues
+License: MIT
+License-file: LICENSE
+Author: Lars Kuhtz <lakuhtz@gmail.com>
+Maintainer: Lars Kuhtz <lakuhtz@gmail.com>
+Copyright:
+    (c) 2015-2017 Lars Kuhtz <lakuhtz@gmail.com>,
+    (c) 2014 AlephCloud Systems, Inc.
+Category: HTTP, Network, Web, Yesod
+Build-type: Simple
+Cabal-version: >= 1.14.0
+tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1, GHC == 8.2.2
+
+data-files:
+    README.md
+    CHANGELOG.md
+    test/index.html
+    test/phantomjs.js
+    examples/Scotty.hs
+    examples/Wai.hs
+    examples/ServantWai.hs
+
+source-repository head
+    type: git
+    location: https://github.com/larskuhtz/wai-cors
+    branch: master
+
+source-repository this
+    type: git
+    location: https://github.com/larskuhtz/wai-cors
+    tag: 0.2.6
+
+flag transformers-3
+    description: use transformers<0.3 (this is set automatically)
+    default: False
+    manual: False
+
+flag wai-1
+    description: use version wai<2 (this is set automatically)
+    default: False
+    manual: False
+
+flag wai-2
+    description: use version wai<3 (this is set automatically)
+    default: False
+    manual: False
+
+Library
+    default-language: Haskell2010
+    hs-source-dirs: src
+
+    exposed-modules:
+        Network.Wai.Middleware.Cors
+
+    build-depends:
+        attoparsec >= 0.10.4.0,
+        base == 4.*,
+        base-unicode-symbols >= 0.2.2.3,
+        bytestring >= 0.10.0.2,
+        case-insensitive >= 1.0.0.1,
+        http-types >= 0.8.0
+
+    if flag(wai-1) && !flag(wai-2)
+        build-depends:
+            wai < 2.0,
+            resourcet >= 0.4,
+            transformers < 0.4
+    if flag(wai-2)
+        build-depends:
+            wai < 3.0 && >= 2.0
+    if !flag(wai-1) && !flag(wai-2)
+        build-depends:
+            wai >= 3.0
+
+    if flag(transformers-3)
+        build-depends:
+            mtl >= 2.1,
+            transformers >= 0.3 && < 0.4,
+            transformers-compat >= 0.3
+    else
+        build-depends:
+            mtl >= 2.2,
+            transformers >= 0.4,
+            wai >= 2
+
+    ghc-options: -Wall
+
+Test-Suite phantomjs
+    type: exitcode-stdio-1.0
+    default-language: Haskell2010
+    main-is: PhantomJS.hs
+    hs-source-dirs: test
+
+    other-modules:
+        Server
+
+    build-depends:
+        base == 4.*,
+        base-unicode-symbols >= 0.2,
+        directory >= 1.2,
+        filepath >= 1.4,
+        http-types >= 0.8,
+        network >= 2.6,
+        process >= 1.2,
+        text >= 1.2,
+        wai-cors
+
+    if impl(ghc < 7.8)
+        build-depends:
+            filepath < 1.4.1.2
+
+    -- We only build the tests suite with the more recent versions of wai and ghc.
+    -- Cabal fails to resolves the old dependencies otherwise.
+    if flag (wai-1) || flag (wai-2) || impl(ghc < 7.10)
+        buildable: False
+    else
+        build-depends:
+            wai-websockets >= 3.0,
+            warp >= 3.0,
+            wai >= 3.0,
+            websockets >= 0.9
+
+    ghc-options: -threaded -Wall -with-rtsopts=-N
+
+Test-Suite unit-tests
+    type: exitcode-stdio-1.0
+    default-language: Haskell2010
+    main-is: UnitTests.hs
+    hs-source-dirs: test
+
+    build-depends:
+        base == 4.*,
+        base-unicode-symbols >= 0.2,
+        http-types >= 0.8,
+        tasty >= 0.10,
+        tasty-hunit >= 0.9,
+        wai-cors
+
+    -- We only build the tests suite with the more recent versions of wai and ghc.
+    -- Cabal fails to resolves the old dependencies otherwise.
+    if flag (wai-1) || flag (wai-2) || impl(ghc < 7.10)
+        buildable: False
+    else
+        build-depends:
+            wai-extra >= 3.0,
+            wai-websockets >= 3.0,
+            warp >= 3.0,
+            wai >= 3.0,
+            websockets >= 0.9
+
+    ghc-options: -threaded -Wall -with-rtsopts=-N
+
diff --git a/test/golden-test-cases/wai-cors.nix.golden b/test/golden-test-cases/wai-cors.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-cors.nix.golden
@@ -0,0 +1,26 @@
+{ mkDerivation, attoparsec, base, base-unicode-symbols, bytestring
+, case-insensitive, directory, fetchurl, filepath, http-types, mtl
+, network, process, tasty, tasty-hunit, text, transformers, wai
+, wai-extra, wai-websockets, warp, websockets
+}:
+mkDerivation {
+  pname = "wai-cors";
+  version = "0.2.6";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    attoparsec base base-unicode-symbols bytestring case-insensitive
+    http-types mtl transformers wai
+  ];
+  testHaskellDepends = [
+    base base-unicode-symbols directory filepath http-types network
+    process tasty tasty-hunit text wai wai-extra wai-websockets warp
+    websockets
+  ];
+  homepage = "https://github.com/larskuhtz/wai-cors";
+  description = "CORS for WAI";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/wai-middleware-auth.cabal b/test/golden-test-cases/wai-middleware-auth.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-middleware-auth.cabal
@@ -0,0 +1,75 @@
+name:                wai-middleware-auth
+version:             0.1.2.1
+synopsis:            Authentication middleware that secures WAI application
+description:         See README
+license:             MIT
+license-file:        LICENSE
+author:              Alexey Kuleshevich
+maintainer:          alexey@fpcomplete.com
+category:            Web
+build-type:          Simple
+extra-doc-files:     README.md CHANGELOG.md
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Network.Wai.Middleware.Auth
+                       Network.Wai.Middleware.Auth.OAuth2
+                       Network.Wai.Middleware.Auth.OAuth2.Github
+                       Network.Wai.Middleware.Auth.OAuth2.Google
+                       Network.Wai.Middleware.Auth.Provider
+                       Network.Wai.Auth.Executable
+  other-modules:       Paths_wai_middleware_auth
+                       Network.Wai.Auth.AppRoot
+                       Network.Wai.Auth.Config
+                       Network.Wai.Auth.ClientSession
+                       Network.Wai.Auth.Tools
+  build-depends:       aeson
+                     , base                 >= 4.7 && < 5
+                     , base64-bytestring
+                     , binary
+                     , blaze-builder
+                     , blaze-html
+                     , bytestring
+                     , case-insensitive
+                     , cereal
+                     , clientsession
+                     , cookie
+                     , exceptions
+                     , hoauth2              >= 0.5.0
+                     , http-client
+                     , http-client-tls
+                     , http-conduit
+                     , http-reverse-proxy
+                     , http-types
+                     , regex-posix
+                     , safe-exceptions
+                     , shakespeare
+                     , text
+                     , unix-compat
+                     , unordered-containers
+                     , uri-bytestring
+                     , vault
+                     , wai                  >= 3.0 && < 4
+                     , wai-app-static
+                     , wai-extra            >= 3.0.7
+                     , yaml
+  hs-source-dirs:      src
+  default-language:    Haskell2010
+  ghc-options:        -Wall
+
+executable wai-auth
+  default-language:    Haskell2010
+  hs-source-dirs:      app
+  main-is:             Main.hs
+  build-depends:       base
+                     , bytestring
+                     , cereal
+                     , clientsession
+                     , optparse-simple
+                     , wai-middleware-auth
+                     , warp
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+source-repository head
+  type:     git
+  location: https://github.com/fpco/wai-middleware-auth
diff --git a/test/golden-test-cases/wai-middleware-auth.nix.golden b/test/golden-test-cases/wai-middleware-auth.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-middleware-auth.nix.golden
@@ -0,0 +1,31 @@
+{ mkDerivation, aeson, base, base64-bytestring, binary
+, blaze-builder, blaze-html, bytestring, case-insensitive, cereal
+, clientsession, cookie, exceptions, fetchurl, hoauth2, http-client
+, http-client-tls, http-conduit, http-reverse-proxy, http-types
+, optparse-simple, regex-posix, safe-exceptions, shakespeare, text
+, unix-compat, unordered-containers, uri-bytestring, vault, wai
+, wai-app-static, wai-extra, warp, yaml
+}:
+mkDerivation {
+  pname = "wai-middleware-auth";
+  version = "0.1.2.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base base64-bytestring binary blaze-builder blaze-html
+    bytestring case-insensitive cereal clientsession cookie exceptions
+    hoauth2 http-client http-client-tls http-conduit http-reverse-proxy
+    http-types regex-posix safe-exceptions shakespeare text unix-compat
+    unordered-containers uri-bytestring vault wai wai-app-static
+    wai-extra yaml
+  ];
+  executableHaskellDepends = [
+    base bytestring cereal clientsession optparse-simple warp
+  ];
+  description = "Authentication middleware that secures WAI application";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/wai-middleware-caching-redis.cabal b/test/golden-test-cases/wai-middleware-caching-redis.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-middleware-caching-redis.cabal
@@ -0,0 +1,40 @@
+name:                wai-middleware-caching-redis
+version:             0.2.0.0
+synopsis:            Cache Wai Middleware using Redis backend
+description:         Please see README.md
+homepage:            http://github.com/yogsototh/wai-middleware-caching/tree/master/wai-middleware-caching-redis#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Yann Esposito
+maintainer:          yann.esposito@gmail.com
+copyright:           Yann Esposito © 2015
+category:            Web
+build-type:          Simple
+-- extra-source-files:
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Network.Wai.Middleware.RedisCache
+  build-depends:       base >= 4.7 && < 5
+                     , wai-middleware-caching
+                     , hedis >= 0.6
+                     , blaze-builder
+                     , bytestring
+                     , text
+                     , http-types
+                     , wai >= 3.0
+  default-language:    Haskell2010
+
+test-suite wai-middleware-caching-redis-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  build-depends:       base
+                     , wai-middleware-caching-redis
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+source-repository head
+  type:     git
+  location: https://github.com/yogsototh/wai-middleware-caching
diff --git a/test/golden-test-cases/wai-middleware-caching-redis.nix.golden b/test/golden-test-cases/wai-middleware-caching-redis.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-middleware-caching-redis.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, blaze-builder, bytestring, fetchurl, hedis
+, http-types, text, wai, wai-middleware-caching
+}:
+mkDerivation {
+  pname = "wai-middleware-caching-redis";
+  version = "0.2.0.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base blaze-builder bytestring hedis http-types text wai
+    wai-middleware-caching
+  ];
+  testHaskellDepends = [ base ];
+  homepage = "http://github.com/yogsototh/wai-middleware-caching/tree/master/wai-middleware-caching-redis#readme";
+  description = "Cache Wai Middleware using Redis backend";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/wai-middleware-prometheus.cabal b/test/golden-test-cases/wai-middleware-prometheus.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-middleware-prometheus.cabal
@@ -0,0 +1,46 @@
+name:                wai-middleware-prometheus
+version:             0.3.0
+synopsis:
+    WAI middlware for exposing http://prometheus.io metrics.
+description:
+    WAI middlware for exposing http://prometheus.io metrics.
+homepage:            https://github.com/fimad/prometheus-haskell
+license:             Apache-2.0
+license-file:        LICENSE
+author:              Will Coster
+maintainer:          willcoster@gmail.com
+copyright:           2015 Will Coster
+category:            Network
+build-type:          Simple
+cabal-version:       >=1.10
+
+source-repository head
+  type:     git
+  location: https://github.com/fimad/prometheus-haskell
+
+library
+  hs-source-dirs:      src/
+  default-language:    Haskell2010
+  exposed-modules:
+      Network.Wai.Middleware.Prometheus
+  build-depends:
+      base               >=4.7 && <5
+    , bytestring         >=0.9
+    , clock
+    , data-default
+    , http-types
+    , prometheus-client
+    , text               >=0.11
+    , wai                >=3.0
+  ghc-options: -Wall
+
+test-suite doctest
+  type:                 exitcode-stdio-1.0
+  default-language:     Haskell2010
+  hs-source-dirs:       tests
+  ghc-options:          -Wall
+  main-is:              doctest.hs
+  build-depends:
+      base               >=4.7 && <5
+    , doctest
+    , prometheus-client
diff --git a/test/golden-test-cases/wai-middleware-prometheus.nix.golden b/test/golden-test-cases/wai-middleware-prometheus.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/wai-middleware-prometheus.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, bytestring, clock, data-default, doctest
+, fetchurl, http-types, prometheus-client, text, wai
+}:
+mkDerivation {
+  pname = "wai-middleware-prometheus";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring clock data-default http-types prometheus-client
+    text wai
+  ];
+  testHaskellDepends = [ base doctest prometheus-client ];
+  homepage = "https://github.com/fimad/prometheus-haskell";
+  description = "WAI middlware for exposing http://prometheus.io metrics.";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/test/golden-test-cases/warp.cabal b/test/golden-test-cases/warp.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/warp.cabal
@@ -0,0 +1,208 @@
+Name:                warp
+Version:             3.2.13
+Synopsis:            A fast, light-weight web server for WAI applications.
+License:             MIT
+License-file:        LICENSE
+Author:              Michael Snoyman, Kazu Yamamoto, Matt Brown
+Maintainer:          michael@snoyman.com
+Homepage:            http://github.com/yesodweb/wai
+Category:            Web, Yesod
+Build-Type:          Simple
+Cabal-Version:       >=1.8
+Stability:           Stable
+description:         HTTP\/1.0, HTTP\/1.1 and HTTP\/2 are supported.
+                     For HTTP\/2,  Warp supports direct and ALPN (in TLS)
+                     but not upgrade.
+                     API docs and the README are available at
+                     <http://www.stackage.org/package/warp>.
+extra-source-files:  attic/hex
+                     ChangeLog.md
+                     README.md
+                     test/head-response
+                     test/inputFile
+
+Flag network-bytestring
+    Default: False
+
+Flag allow-sendfilefd
+    Description: Allow use of sendfileFd (not available on GNU/kFreeBSD)
+    Default:     True
+
+Flag warp-debug
+    Description: print debug output. not suitable for production
+    Default:     False
+
+Library
+  Build-Depends:     base                      >= 3        && < 5
+                   , array
+                   , async
+                   , auto-update               >= 0.1.3    && < 0.2
+                   , blaze-builder             >= 0.4
+                   , bytestring                >= 0.9.1.4
+                   , bytestring-builder
+                   , case-insensitive          >= 0.2
+                   , containers
+                   , ghc-prim
+                   , http-types                >= 0.9.1
+                   , iproute                   >= 1.3.1
+                   , http2                     >= 1.6      && < 1.7
+                   , simple-sendfile           >= 0.2.7    && < 0.3
+                   , unix-compat               >= 0.2
+                   , wai                       >= 3.2      && < 3.3
+                   , text
+                   , streaming-commons         >= 0.1.10
+                   , vault                     >= 0.3
+                   , stm                       >= 2.3
+                   , word8
+                   , hashable
+                   , http-date
+  if flag(network-bytestring)
+      Build-Depends: network                   >= 2.2.1.5  && < 2.2.3
+                   , network-bytestring        >= 0.1.3    && < 0.1.4
+  else
+      Build-Depends: network               >= 2.3
+  Exposed-modules:   Network.Wai.Handler.Warp
+                     Network.Wai.Handler.Warp.Internal
+  Other-modules:     Network.Wai.Handler.Warp.Buffer
+                     Network.Wai.Handler.Warp.Conduit
+                     Network.Wai.Handler.Warp.Counter
+                     Network.Wai.Handler.Warp.Date
+                     Network.Wai.Handler.Warp.FdCache
+                     Network.Wai.Handler.Warp.File
+                     Network.Wai.Handler.Warp.FileInfoCache
+                     Network.Wai.Handler.Warp.HashMap
+                     Network.Wai.Handler.Warp.HTTP2
+                     Network.Wai.Handler.Warp.HTTP2.EncodeFrame
+                     Network.Wai.Handler.Warp.HTTP2.File
+                     Network.Wai.Handler.Warp.HTTP2.HPACK
+                     Network.Wai.Handler.Warp.HTTP2.Manager
+                     Network.Wai.Handler.Warp.HTTP2.Receiver
+                     Network.Wai.Handler.Warp.HTTP2.Request
+                     Network.Wai.Handler.Warp.HTTP2.Sender
+                     Network.Wai.Handler.Warp.HTTP2.Types
+                     Network.Wai.Handler.Warp.HTTP2.Worker
+                     Network.Wai.Handler.Warp.Header
+                     Network.Wai.Handler.Warp.IO
+                     Network.Wai.Handler.Warp.IORef
+                     Network.Wai.Handler.Warp.PackInt
+                     Network.Wai.Handler.Warp.ReadInt
+                     Network.Wai.Handler.Warp.Recv
+                     Network.Wai.Handler.Warp.Request
+                     Network.Wai.Handler.Warp.RequestHeader
+                     Network.Wai.Handler.Warp.Response
+                     Network.Wai.Handler.Warp.ResponseHeader
+                     Network.Wai.Handler.Warp.Run
+                     Network.Wai.Handler.Warp.SendFile
+                     Network.Wai.Handler.Warp.Settings
+                     Network.Wai.Handler.Warp.Some
+                     Network.Wai.Handler.Warp.Timeout
+                     Network.Wai.Handler.Warp.Types
+                     Network.Wai.Handler.Warp.Windows
+                     Network.Wai.Handler.Warp.WithApplication
+                     Paths_warp
+  Ghc-Options:       -Wall
+
+  if flag(warp-debug)
+      Cpp-Options:   -DWARP_DEBUG
+  if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd)
+      Cpp-Options:   -DSENDFILEFD
+  if os(windows)
+      Cpp-Options:   -DWINDOWS
+      Build-Depends: time
+  else
+      Build-Depends: unix
+      Other-modules: Network.Wai.Handler.Warp.MultiMap
+
+Test-Suite doctest
+  Type:                 exitcode-stdio-1.0
+  HS-Source-Dirs:       test
+  Ghc-Options:          -threaded -Wall
+  Main-Is:              doctests.hs
+  Build-Depends:        base
+                      , doctest >= 0.10.1
+
+Test-Suite spec
+    Main-Is:         Spec.hs
+    Other-modules:   BufferPoolSpec
+                     ConduitSpec
+                     ExceptionSpec
+                     FdCacheSpec
+                     FileSpec
+                     ReadIntSpec
+                     RequestSpec
+                     ResponseHeaderSpec
+                     ResponseSpec
+                     RunSpec
+                     SendFileSpec
+                     WithApplicationSpec
+                     HTTP
+    Hs-Source-Dirs:  test, .
+    Type:            exitcode-stdio-1.0
+
+    Ghc-Options:     -Wall
+    Build-Depends:   base >= 4 && < 5
+                   , array
+                   , auto-update
+                   , blaze-builder             >= 0.4
+                   , bytestring                >= 0.9.1.4
+                   , bytestring-builder
+                   , case-insensitive          >= 0.2
+                   , ghc-prim
+                   , HTTP
+                   , http-types                >= 0.8.5
+                   , iproute                   >= 1.3.1
+                   , lifted-base               >= 0.1
+                   , simple-sendfile           >= 0.2.4    && < 0.3
+                   , transformers              >= 0.2.2
+                   , unix-compat               >= 0.2
+                   , wai                       >= 3.2      && < 3.3
+                   , network
+                   , HUnit
+                   , QuickCheck
+                   , hspec                     >= 1.3
+                   , time
+                   , text
+                   , streaming-commons         >= 0.1.10
+                   , silently
+                   , async
+                   , vault
+                   , stm                       >= 2.3
+                   , directory
+                   , process
+                   , containers
+                   , http2                     >= 1.6      && < 1.7
+                   , word8
+                   , hashable
+                   , http-date
+
+  if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd)
+    Cpp-Options:   -DSENDFILEFD
+    Build-Depends: unix
+  if os(windows)
+      Cpp-Options:   -DWINDOWS
+
+Benchmark parser
+    Type:           exitcode-stdio-1.0
+    Main-Is:        Parser.hs
+    HS-Source-Dirs: bench .
+    Build-Depends:  base
+                  , auto-update
+                  , bytestring
+                  , containers
+                  , criterion >= 1
+                  , hashable
+                  , http-date
+                  , http-types
+                  , network
+                  , network
+                  , unix-compat
+
+  if (os(linux) || os(freebsd) || os(darwin)) && flag(allow-sendfilefd)
+    Cpp-Options:   -DSENDFILEFD
+    Build-Depends: unix
+  if os(windows)
+      Cpp-Options:   -DWINDOWS
+
+Source-Repository head
+  Type:     git
+  Location: git://github.com/yesodweb/wai.git
diff --git a/test/golden-test-cases/warp.nix.golden b/test/golden-test-cases/warp.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/warp.nix.golden
@@ -0,0 +1,37 @@
+{ mkDerivation, array, async, auto-update, base, blaze-builder
+, bytestring, bytestring-builder, case-insensitive, containers
+, criterion, directory, doctest, fetchurl, ghc-prim, hashable
+, hspec, HTTP, http-date, http-types, http2, HUnit, iproute
+, lifted-base, network, process, QuickCheck, silently
+, simple-sendfile, stm, streaming-commons, text, time, transformers
+, unix, unix-compat, vault, wai, word8
+}:
+mkDerivation {
+  pname = "warp";
+  version = "3.2.13";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    array async auto-update base blaze-builder bytestring
+    bytestring-builder case-insensitive containers ghc-prim hashable
+    http-date http-types http2 iproute network simple-sendfile stm
+    streaming-commons text unix unix-compat vault wai word8
+  ];
+  testHaskellDepends = [
+    array async auto-update base blaze-builder bytestring
+    bytestring-builder case-insensitive containers directory doctest
+    ghc-prim hashable hspec HTTP http-date http-types http2 HUnit
+    iproute lifted-base network process QuickCheck silently
+    simple-sendfile stm streaming-commons text time transformers unix
+    unix-compat vault wai word8
+  ];
+  benchmarkHaskellDepends = [
+    auto-update base bytestring containers criterion hashable http-date
+    http-types network unix unix-compat
+  ];
+  homepage = "http://github.com/yesodweb/wai";
+  description = "A fast, light-weight web server for WAI applications";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/weigh.cabal b/test/golden-test-cases/weigh.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/weigh.cabal
@@ -0,0 +1,60 @@
+name:                weigh
+version:             0.0.7
+synopsis:            Measure allocations of a Haskell functions/values
+description:         Please see README.md
+homepage:            https://github.com/fpco/weigh#readme
+license:             BSD3
+license-file:        LICENSE
+author:              Chris Done
+maintainer:          chrisdone@fpcomplete.com
+copyright:           FP Complete
+category:            Web
+build-type:          Simple
+extra-source-files:  README.md
+                     CHANGELOG
+cabal-version:       >=1.10
+
+flag weigh-maps
+  manual: True
+  default: False
+  description: Weigh maps.
+
+library
+  hs-source-dirs:      src
+  ghc-options:         -Wall -O2
+  exposed-modules:     Weigh
+  other-modules:       Weigh.GHCStats
+  build-depends:       base >= 4.7 && < 5
+                     , process
+                     , deepseq
+                     , mtl
+                     , split
+                     , template-haskell
+                     , temporary
+  default-language:    Haskell2010
+
+test-suite weigh-test
+  default-language:    Haskell2010
+  type: exitcode-stdio-1.0
+  hs-source-dirs: src/test
+  ghc-options: -O2
+  main-is: Main.hs
+  build-depends: base
+               , weigh
+               , deepseq
+
+test-suite weigh-maps
+  if !flag(weigh-maps)
+    buildable: False
+  default-language:    Haskell2010
+  type: exitcode-stdio-1.0
+  hs-source-dirs: src/test
+  ghc-options: -O2
+  main-is: Maps.hs
+  build-depends: base
+               , weigh
+               , deepseq
+               , containers
+               , unordered-containers
+               , bytestring-trie
+               , random
diff --git a/test/golden-test-cases/weigh.nix.golden b/test/golden-test-cases/weigh.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/weigh.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, base, bytestring-trie, containers, deepseq
+, fetchurl, mtl, process, random, split, template-haskell
+, temporary, unordered-containers
+}:
+mkDerivation {
+  pname = "weigh";
+  version = "0.0.7";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base deepseq mtl process split template-haskell temporary
+  ];
+  testHaskellDepends = [
+    base bytestring-trie containers deepseq random unordered-containers
+  ];
+  homepage = "https://github.com/fpco/weigh#readme";
+  description = "Measure allocations of a Haskell functions/values";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/xml-hamlet.cabal b/test/golden-test-cases/xml-hamlet.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/xml-hamlet.cabal
@@ -0,0 +1,44 @@
+Name:                xml-hamlet
+Version:             0.4.1.1
+Synopsis:            Hamlet-style quasiquoter for XML content
+Homepage:            http://www.yesodweb.com/
+License:             BSD3
+License-file:        LICENSE
+Author:              Michael Snoyman
+Maintainer:          michael@snoyman.com
+Category:            Text
+Build-type:          Simple
+Description:         Hamlet-style quasiquoter for XML content
+Extra-source-files:  test/main.hs ChangeLog.md README.md
+
+Cabal-version:       >=1.8
+
+Library
+  Exposed-modules:     Text.Hamlet.XML
+  Other-modules:       Text.Hamlet.XMLParse
+  
+  Build-depends:       base                       >= 4        && < 5
+                     , shakespeare                >= 1.0      && < 2.2
+                     , xml-conduit                >= 1.0
+                     , text                       >= 0.10
+                     , template-haskell
+                     , parsec                     >= 2.0      && < 3.2
+                     , containers
+
+  Ghc-options:         -Wall
+
+test-suite test
+  main-is:             main.hs
+  hs-source-dirs:      test
+  type:                exitcode-stdio-1.0
+  ghc-options:         -Wall
+  build-depends:       hspec >= 1.3
+                     , HUnit
+                     , base >= 4 && < 5
+                     , shakespeare
+                     , xml-conduit
+                     , text
+                     , template-haskell
+                     , parsec
+                     , xml-hamlet
+                     , containers
diff --git a/test/golden-test-cases/xml-hamlet.nix.golden b/test/golden-test-cases/xml-hamlet.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/xml-hamlet.nix.golden
@@ -0,0 +1,22 @@
+{ mkDerivation, base, containers, fetchurl, hspec, HUnit, parsec
+, shakespeare, template-haskell, text, xml-conduit
+}:
+mkDerivation {
+  pname = "xml-hamlet";
+  version = "0.4.1.1";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base containers parsec shakespeare template-haskell text
+    xml-conduit
+  ];
+  testHaskellDepends = [
+    base containers hspec HUnit parsec shakespeare template-haskell
+    text xml-conduit
+  ];
+  homepage = "http://www.yesodweb.com/";
+  description = "Hamlet-style quasiquoter for XML content";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/xmonad-contrib.cabal b/test/golden-test-cases/xmonad-contrib.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/xmonad-contrib.cabal
@@ -0,0 +1,338 @@
+name:               xmonad-contrib
+version:            0.13
+homepage:           http://xmonad.org/
+synopsis:           Third party extensions for xmonad
+description:
+    Third party tiling algorithms, configurations and scripts to xmonad,
+    a tiling window manager for X.
+    .
+    For an introduction to building, configuring and using xmonad
+    extensions, see "XMonad.Doc". In particular:
+    .
+    "XMonad.Doc.Configuring", a guide to configuring xmonad
+    .
+    "XMonad.Doc.Extending", using the contributed extensions library
+    .
+    "XMonad.Doc.Developing", introduction to xmonad internals and writing
+    your own extensions.
+    .
+category:           System
+license:            BSD3
+license-file:       LICENSE
+author:             Spencer Janssen & others
+maintainer:         xmonad@haskell.org
+extra-source-files: README.md CHANGES.md scripts/generate-configs scripts/run-xmonad.sh
+                    scripts/window-properties.sh
+                    scripts/xinitrc scripts/xmonad-acpi.c
+                    scripts/xmonad-clock.c
+                    tests/genMain.hs
+                    tests/ManageDocks.hs
+                    tests/Selective.hs
+                    tests/SwapWorkspaces.hs
+                    tests/XPrompt.hs
+                    XMonad/Config/dmwit.xmobarrc
+cabal-version:      >= 1.6
+build-type:         Simple
+bug-reports:        https://github.com/xmonad/xmonad-contrib/issues
+
+tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1
+
+source-repository head
+  type:     git
+  location: https://github.com/xmonad/xmonad-contrib
+
+
+flag use_xft
+  description: Use Xft to render text
+
+flag testing
+  description: Testing mode
+  manual: True
+  default: False
+
+library
+    build-depends: base >= 4.5 && < 5,
+                   bytestring >= 0.10 && < 0.11,
+                   containers >= 0.5 && < 0.6,
+                   directory,
+                   extensible-exceptions,
+                   filepath,
+                   old-locale,
+                   old-time,
+                   process,
+                   random,
+                   mtl >= 1 && < 3,
+                   unix,
+                   X11>=1.6.1 && < 1.9,
+                   xmonad>=0.13   && < 0.14,
+                   utf8-string
+
+    if flag(use_xft)
+        build-depends: X11-xft >= 0.2
+        cpp-options: -DXFT
+
+    if true
+        ghc-options:    -fwarn-tabs -Wall
+
+    if flag(testing)
+        ghc-options:    -fwarn-tabs -Werror
+
+    if impl(ghc >= 6.12.1)
+        ghc-options:    -fno-warn-unused-do-bind
+
+    exposed-modules:    XMonad.Doc
+                        XMonad.Doc.Configuring
+                        XMonad.Doc.Extending
+                        XMonad.Doc.Developing
+                        XMonad.Actions.AfterDrag
+                        XMonad.Actions.BluetileCommands
+                        XMonad.Actions.Commands
+                        XMonad.Actions.ConstrainedResize
+                        XMonad.Actions.CopyWindow
+                        XMonad.Actions.CycleRecentWS
+                        XMonad.Actions.CycleSelectedLayouts
+                        XMonad.Actions.CycleWindows
+                        XMonad.Actions.CycleWS
+                        XMonad.Actions.DeManage
+                        XMonad.Actions.DwmPromote
+                        XMonad.Actions.DynamicWorkspaces
+                        XMonad.Actions.DynamicWorkspaceGroups
+                        XMonad.Actions.DynamicWorkspaceOrder
+                        XMonad.Actions.DynamicProjects
+                        XMonad.Actions.FindEmptyWorkspace
+                        XMonad.Actions.FlexibleManipulate
+                        XMonad.Actions.FlexibleResize
+                        XMonad.Actions.FloatKeys
+                        XMonad.Actions.FloatSnap
+                        XMonad.Actions.FocusNth
+                        XMonad.Actions.GridSelect
+                        XMonad.Actions.GroupNavigation
+                        XMonad.Actions.Launcher
+                        XMonad.Actions.LinkWorkspaces
+                        XMonad.Actions.MessageFeedback
+                        XMonad.Actions.MouseGestures
+                        XMonad.Actions.MouseResize
+                        XMonad.Actions.Navigation2D
+                        XMonad.Actions.NoBorders
+                        XMonad.Actions.OnScreen
+                        XMonad.Actions.PerWorkspaceKeys
+                        XMonad.Actions.PhysicalScreens
+                        XMonad.Actions.Plane
+                        XMonad.Actions.Promote
+                        XMonad.Actions.RandomBackground
+                        XMonad.Actions.KeyRemap
+                        XMonad.Actions.RotSlaves
+                        XMonad.Actions.Search
+                        XMonad.Actions.ShowText
+                        XMonad.Actions.SimpleDate
+                        XMonad.Actions.SinkAll
+                        XMonad.Actions.SpawnOn
+                        XMonad.Actions.Submap
+                        XMonad.Actions.SwapWorkspaces
+                        XMonad.Actions.TagWindows
+                        XMonad.Actions.TopicSpace
+                        XMonad.Actions.TreeSelect
+                        XMonad.Actions.UpdateFocus
+                        XMonad.Actions.UpdatePointer
+                        XMonad.Actions.Warp
+                        XMonad.Actions.WindowBringer
+                        XMonad.Actions.WindowGo
+                        XMonad.Actions.WindowMenu
+                        XMonad.Actions.WindowNavigation
+                        XMonad.Actions.WithAll
+                        XMonad.Actions.WorkspaceCursors
+                        XMonad.Actions.WorkspaceNames
+                        XMonad.Actions.Workscreen
+                        XMonad.Config.Arossato
+                        XMonad.Config.Azerty
+                        XMonad.Config.Bluetile
+                        XMonad.Config.Bepo
+                        XMonad.Config.Desktop
+                        XMonad.Config.Dmwit
+                        XMonad.Config.Droundy
+                        XMonad.Config.Gnome
+                        XMonad.Config.Kde
+                        XMonad.Config.Mate
+                        XMonad.Config.Prime
+                        XMonad.Config.Sjanssen
+                        XMonad.Config.Xfce
+                        XMonad.Hooks.CurrentWorkspaceOnTop
+                        XMonad.Hooks.DebugEvents
+                        XMonad.Hooks.DebugKeyEvents
+                        XMonad.Hooks.DynamicBars
+                        XMonad.Hooks.DynamicHooks
+                        XMonad.Hooks.DynamicLog
+                        XMonad.Hooks.DynamicProperty
+                        XMonad.Hooks.DebugStack
+                        XMonad.Hooks.EwmhDesktops
+                        XMonad.Hooks.FadeInactive
+                        XMonad.Hooks.FadeWindows
+                        XMonad.Hooks.FloatNext
+                        XMonad.Hooks.ICCCMFocus
+                        XMonad.Hooks.InsertPosition
+                        XMonad.Hooks.ManageDebug
+                        XMonad.Hooks.ManageDocks
+                        XMonad.Hooks.ManageHelpers
+                        XMonad.Hooks.Minimize
+                        XMonad.Hooks.Place
+                        XMonad.Hooks.PositionStoreHooks
+                        XMonad.Hooks.RestoreMinimized
+                        XMonad.Hooks.ScreenCorners
+                        XMonad.Hooks.Script
+                        XMonad.Hooks.ServerMode
+                        XMonad.Hooks.SetWMName
+                        XMonad.Hooks.ToggleHook
+                        XMonad.Hooks.UrgencyHook
+                        XMonad.Hooks.WallpaperSetter
+                        XMonad.Hooks.WorkspaceByPos
+                        XMonad.Hooks.WorkspaceHistory
+                        XMonad.Hooks.XPropManage
+                        XMonad.Layout.Accordion
+                        XMonad.Layout.AutoMaster
+                        XMonad.Layout.AvoidFloats
+                        XMonad.Layout.BinarySpacePartition
+                        XMonad.Layout.BorderResize
+                        XMonad.Layout.BoringWindows
+                        XMonad.Layout.ButtonDecoration
+                        XMonad.Layout.CenteredMaster
+                        XMonad.Layout.Circle
+                        XMonad.Layout.Column
+                        XMonad.Layout.Combo
+                        XMonad.Layout.ComboP
+                        XMonad.Layout.Cross
+                        XMonad.Layout.Decoration
+                        XMonad.Layout.DecorationAddons
+                        XMonad.Layout.DecorationMadness
+                        XMonad.Layout.Dishes
+                        XMonad.Layout.DraggingVisualizer
+                        XMonad.Layout.DragPane
+                        XMonad.Layout.Drawer
+                        XMonad.Layout.Dwindle
+                        XMonad.Layout.DwmStyle
+                        XMonad.Layout.FixedColumn
+                        XMonad.Layout.Fullscreen
+                        XMonad.Layout.Gaps
+                        XMonad.Layout.Grid
+                        XMonad.Layout.GridVariants
+                        XMonad.Layout.Groups
+                        XMonad.Layout.Groups.Examples
+                        XMonad.Layout.Groups.Helpers
+                        XMonad.Layout.Groups.Wmii
+                        XMonad.Layout.Hidden
+                        XMonad.Layout.HintedGrid
+                        XMonad.Layout.HintedTile
+                        XMonad.Layout.IfMax
+                        XMonad.Layout.IM
+                        XMonad.Layout.ImageButtonDecoration
+                        XMonad.Layout.IndependentScreens
+                        XMonad.Layout.LayoutBuilder
+                        XMonad.Layout.LayoutBuilderP
+                        XMonad.Layout.LayoutCombinators
+                        XMonad.Layout.LayoutHints
+                        XMonad.Layout.LayoutModifier
+                        XMonad.Layout.LayoutScreens
+                        XMonad.Layout.LimitWindows
+                        XMonad.Layout.MagicFocus
+                        XMonad.Layout.Magnifier
+                        XMonad.Layout.Master
+                        XMonad.Layout.Maximize
+                        XMonad.Layout.MessageControl
+                        XMonad.Layout.Minimize
+                        XMonad.Layout.Monitor
+                        XMonad.Layout.Mosaic
+                        XMonad.Layout.MosaicAlt
+                        XMonad.Layout.MouseResizableTile
+                        XMonad.Layout.MultiColumns
+                        XMonad.Layout.MultiToggle
+                        XMonad.Layout.MultiToggle.Instances
+                        XMonad.Layout.Named
+                        XMonad.Layout.NoBorders
+                        XMonad.Layout.NoFrillsDecoration
+                        XMonad.Layout.OnHost
+                        XMonad.Layout.OneBig
+                        XMonad.Layout.PerScreen
+                        XMonad.Layout.PerWorkspace
+                        XMonad.Layout.PositionStoreFloat
+                        XMonad.Layout.Reflect
+                        XMonad.Layout.Renamed
+                        XMonad.Layout.ResizableTile
+                        XMonad.Layout.ResizeScreen
+                        XMonad.Layout.Roledex
+                        XMonad.Layout.ShowWName
+                        XMonad.Layout.SimpleDecoration
+                        XMonad.Layout.SimpleFloat
+                        XMonad.Layout.Simplest
+                        XMonad.Layout.SimplestFloat
+                        XMonad.Layout.SortedLayout
+                        XMonad.Layout.Spacing
+                        XMonad.Layout.Spiral
+                        XMonad.Layout.Square
+                        XMonad.Layout.StackTile
+                        XMonad.Layout.Stoppable
+                        XMonad.Layout.SubLayouts
+                        XMonad.Layout.TabBarDecoration
+                        XMonad.Layout.Tabbed
+                        XMonad.Layout.ThreeColumns
+                        XMonad.Layout.ToggleLayouts
+                        XMonad.Layout.TrackFloating
+                        XMonad.Layout.TwoPane
+                        XMonad.Layout.WindowArranger
+                        XMonad.Layout.WindowNavigation
+                        XMonad.Layout.WindowSwitcherDecoration
+                        XMonad.Layout.WorkspaceDir
+                        XMonad.Layout.ZoomRow
+                        XMonad.Prompt
+                        XMonad.Prompt.AppendFile
+                        XMonad.Prompt.AppLauncher
+                        XMonad.Prompt.ConfirmPrompt
+                        XMonad.Prompt.Directory
+                        XMonad.Prompt.DirExec
+                        XMonad.Prompt.Email
+                        XMonad.Prompt.Input
+                        XMonad.Prompt.Layout
+                        XMonad.Prompt.Man
+                        XMonad.Prompt.Pass
+                        XMonad.Prompt.RunOrRaise
+                        XMonad.Prompt.Shell
+                        XMonad.Prompt.Ssh
+                        XMonad.Prompt.Theme
+                        XMonad.Prompt.Unicode
+                        XMonad.Prompt.Window
+                        XMonad.Prompt.Workspace
+                        XMonad.Prompt.XMonad
+                        XMonad.Util.Cursor
+                        XMonad.Util.CustomKeys
+                        XMonad.Util.DebugWindow
+                        XMonad.Util.Dmenu
+                        XMonad.Util.Dzen
+                        XMonad.Util.ExtensibleState
+                        XMonad.Util.EZConfig
+                        XMonad.Util.Font
+                        XMonad.Util.Image
+                        XMonad.Util.Invisible
+                        XMonad.Util.Loggers
+                        XMonad.Util.Loggers.NamedScratchpad
+                        XMonad.Util.NamedActions
+                        XMonad.Util.NamedScratchpad
+                        XMonad.Util.NamedWindows
+                        XMonad.Util.NoTaskbar
+                        XMonad.Util.Paste
+                        XMonad.Util.PositionStore
+                        XMonad.Util.RemoteWindows
+                        XMonad.Util.Replace
+                        XMonad.Util.Run
+                        XMonad.Util.Scratchpad
+                        XMonad.Util.SpawnOnce
+                        XMonad.Util.SpawnNamedPipe
+                        XMonad.Util.Stack
+                        XMonad.Util.StringProp
+                        XMonad.Util.Themes
+                        XMonad.Util.Timer
+                        XMonad.Util.TreeZipper
+                        XMonad.Util.Types
+                        XMonad.Util.Ungrab
+                        XMonad.Util.WindowProperties
+                        XMonad.Util.WindowState
+                        XMonad.Util.WorkspaceCompare
+                        XMonad.Util.XSelection
+                        XMonad.Util.XUtils
diff --git a/test/golden-test-cases/xmonad-contrib.nix.golden b/test/golden-test-cases/xmonad-contrib.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/xmonad-contrib.nix.golden
@@ -0,0 +1,21 @@
+{ mkDerivation, base, bytestring, containers, directory
+, extensible-exceptions, fetchurl, filepath, mtl, old-locale
+, old-time, process, random, unix, utf8-string, X11, X11-xft
+, xmonad
+}:
+mkDerivation {
+  pname = "xmonad-contrib";
+  version = "0.13";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base bytestring containers directory extensible-exceptions filepath
+    mtl old-locale old-time process random unix utf8-string X11 X11-xft
+    xmonad
+  ];
+  homepage = "http://xmonad.org/";
+  description = "Third party extensions for xmonad";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/yahoo-finance-api.cabal b/test/golden-test-cases/yahoo-finance-api.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yahoo-finance-api.cabal
@@ -0,0 +1,71 @@
+name:                yahoo-finance-api
+version:             0.2.0.3
+synopsis:            Read quotes from Yahoo Finance API.
+description:
+  Haskell wrapper for the stock APIs provided by Yahoo Finance.
+  .
+  __UPDATE__: It appears that yahoo disabled the quote API used by this
+  pakcage.  This package is no longer usable.  See
+  <https://github.com/cdepillabout/yahoo-finance-api/issues/5 this issue>.
+homepage:            https://github.com/cdepillabout/yahoo-finance-api
+license:             BSD3
+license-file:        LICENSE
+author:              Dennis Gosnell, James M.C. Haver II
+maintainer:          cdep.illabout@gmail.com, mchaver@gmail.com
+copyright:           2016 Dennis Gosnell
+category:            Web
+build-type:          Simple
+extra-source-files:  README.md
+cabal-version:       >=1.10
+
+library
+  hs-source-dirs:      src
+  exposed-modules:     Web.Yahoo.Finance.YQL
+                       Web.Yahoo.Finance.YQL.Internal.API
+                       Web.Yahoo.Finance.YQL.Internal.Types
+  build-depends:       base  >= 4.7 && < 5
+                     , aeson 
+                     , either
+                     , http-api-data
+                     , http-client
+                     , mtl
+                     , servant        >= 0.4
+                     , servant-client >= 0.4
+                     , text
+                     , time
+                     , transformers
+                     , vector
+  default-language:    Haskell2010
+  ghc-options:         -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates -fwarn-monomorphism-restriction
+
+test-suite yahoo-finance-api-test
+  type:                exitcode-stdio-1.0
+  hs-source-dirs:      test
+  main-is:             Spec.hs
+  other-modules:       Web.Yahoo.FinanceSpec
+  build-depends:       base
+                     , either
+                     , hspec
+                     , yahoo-finance-api
+                     , http-client
+                     , http-client-tls
+                     , mtl
+                     , safe
+                     , servant
+                     , servant-client
+  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
+  default-language:    Haskell2010
+
+test-suite yahoo-finance-api-doctest
+  type:                exitcode-stdio-1.0
+  main-is:             DocTest.hs
+  hs-source-dirs:      test
+  build-depends:       base
+                     , doctest >= 0.11
+                     , Glob    >= 0.7
+  default-language:    Haskell2010
+  ghc-options:         -Wall -threaded -rtsopts -with-rtsopts=-N
+
+source-repository head
+  type:     git
+  location: https://github.com/cdepillabout/yahoo-finance-api
diff --git a/test/golden-test-cases/yahoo-finance-api.nix.golden b/test/golden-test-cases/yahoo-finance-api.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yahoo-finance-api.nix.golden
@@ -0,0 +1,23 @@
+{ mkDerivation, aeson, base, doctest, either, fetchurl, Glob, hspec
+, http-api-data, http-client, http-client-tls, mtl, safe, servant
+, servant-client, text, time, transformers, vector
+}:
+mkDerivation {
+  pname = "yahoo-finance-api";
+  version = "0.2.0.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    aeson base either http-api-data http-client mtl servant
+    servant-client text time transformers vector
+  ];
+  testHaskellDepends = [
+    base doctest either Glob hspec http-client http-client-tls mtl safe
+    servant servant-client
+  ];
+  homepage = "https://github.com/cdepillabout/yahoo-finance-api";
+  description = "Read quotes from Yahoo Finance API";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/test/golden-test-cases/yesod-form-bootstrap4.cabal b/test/golden-test-cases/yesod-form-bootstrap4.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yesod-form-bootstrap4.cabal
@@ -0,0 +1,31 @@
+-- This file has been generated from package.yaml by hpack version 0.17.1.
+--
+-- see: https://github.com/sol/hpack
+
+name:           yesod-form-bootstrap4
+version:        0.1.0.2
+synopsis:       renderBootstrap4
+category:       Web
+homepage:       https://github.com/ncaq/yesod-form-bootstrap4#readme
+bug-reports:    https://github.com/ncaq/yesod-form-bootstrap4/issues
+author:         ncaq
+maintainer:     ncaq@ncaq.net
+copyright:      © ncaq
+license:        MIT
+build-type:     Simple
+cabal-version:  >= 1.10
+
+source-repository head
+  type: git
+  location: https://github.com/ncaq/yesod-form-bootstrap4
+
+library
+  hs-source-dirs:
+      src
+  build-depends:
+      base >= 4.7 && < 5
+    , classy-prelude-yesod
+    , yesod-form
+  exposed-modules:
+      Yesod.Form.Bootstrap4
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/yesod-form-bootstrap4.nix.golden b/test/golden-test-cases/yesod-form-bootstrap4.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yesod-form-bootstrap4.nix.golden
@@ -0,0 +1,13 @@
+{ mkDerivation, base, classy-prelude-yesod, fetchurl, yesod-form }:
+mkDerivation {
+  pname = "yesod-form-bootstrap4";
+  version = "0.1.0.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base classy-prelude-yesod yesod-form ];
+  homepage = "https://github.com/ncaq/yesod-form-bootstrap4#readme";
+  description = "renderBootstrap4";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/yesod-gitrepo.cabal b/test/golden-test-cases/yesod-gitrepo.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yesod-gitrepo.cabal
@@ -0,0 +1,28 @@
+name:                yesod-gitrepo
+version:             0.2.1.0
+synopsis:            Host content provided by a Git repo
+description:         See README.md
+homepage:            https://github.com/snoyberg/yesod-gitrepo
+license:             MIT
+license-file:        LICENSE
+author:              Michael Snoyman
+maintainer:          michael@snoyman.com
+category:            Web
+build-type:          Simple
+extra-source-files:  README.md
+                     ChangeLog.md
+cabal-version:       >=1.10
+
+library
+  exposed-modules:     Yesod.GitRepo
+  build-depends:       base < 5
+                     , temporary >=1.2
+                     , directory
+                     , yesod-core >=1.2 && <1.5
+                     , wai >=3.0
+                     , http-types
+                     , process >=1.1
+                     , lifted-base
+                     , text
+                     , enclosed-exceptions
+  default-language:    Haskell2010
diff --git a/test/golden-test-cases/yesod-gitrepo.nix.golden b/test/golden-test-cases/yesod-gitrepo.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yesod-gitrepo.nix.golden
@@ -0,0 +1,19 @@
+{ mkDerivation, base, directory, enclosed-exceptions, fetchurl
+, http-types, lifted-base, process, temporary, text, wai
+, yesod-core
+}:
+mkDerivation {
+  pname = "yesod-gitrepo";
+  version = "0.2.1.0";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base directory enclosed-exceptions http-types lifted-base process
+    temporary text wai yesod-core
+  ];
+  homepage = "https://github.com/snoyberg/yesod-gitrepo";
+  description = "Host content provided by a Git repo";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/yesod-recaptcha2.cabal b/test/golden-test-cases/yesod-recaptcha2.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yesod-recaptcha2.cabal
@@ -0,0 +1,37 @@
+-- This file has been generated from package.yaml by hpack version 0.17.1.
+--
+-- see: https://github.com/sol/hpack
+
+name:           yesod-recaptcha2
+version:        0.2.3
+synopsis:       yesod recaptcha2
+description:    recaptcha2 for yesod-form
+category:       Web
+homepage:       https://github.com/ncaq/yesod-recaptcha2#readme
+bug-reports:    https://github.com/ncaq/yesod-recaptcha2/issues
+author:         ncaq
+maintainer:     ncaq@ncaq.net
+copyright:      © ncaq
+license:        MIT
+license-file:   LICENSE
+build-type:     Simple
+cabal-version:  >= 1.10
+
+extra-source-files:
+    README.md
+
+source-repository head
+  type: git
+  location: https://github.com/ncaq/yesod-recaptcha2
+
+library
+  hs-source-dirs:
+      src
+  build-depends:
+      base >= 4.7 && < 5
+    , classy-prelude-yesod
+    , http-conduit
+    , yesod-auth
+  exposed-modules:
+      Yesod.ReCaptcha2
+  default-language: Haskell2010
diff --git a/test/golden-test-cases/yesod-recaptcha2.nix.golden b/test/golden-test-cases/yesod-recaptcha2.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/yesod-recaptcha2.nix.golden
@@ -0,0 +1,17 @@
+{ mkDerivation, base, classy-prelude-yesod, fetchurl, http-conduit
+, yesod-auth
+}:
+mkDerivation {
+  pname = "yesod-recaptcha2";
+  version = "0.2.3";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [
+    base classy-prelude-yesod http-conduit yesod-auth
+  ];
+  homepage = "https://github.com/ncaq/yesod-recaptcha2#readme";
+  description = "yesod recaptcha2";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/test/golden-test-cases/zlib.cabal b/test/golden-test-cases/zlib.cabal
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/zlib.cabal
@@ -0,0 +1,97 @@
+name:            zlib
+version:         0.6.1.2
+copyright:       (c) 2006-2016 Duncan Coutts
+license:         BSD3
+license-file:    LICENSE
+author:          Duncan Coutts <duncan@community.haskell.org>
+maintainer:      Duncan Coutts <duncan@community.haskell.org>
+bug-reports:     https://github.com/haskell/zlib/issues
+category:        Codec
+synopsis:        Compression and decompression in the gzip and zlib formats
+description:     This package provides a pure interface for compressing and 
+                 decompressing streams of data represented as lazy 
+                 'ByteString's. It uses the
+                 <https://en.wikipedia.org/wiki/Zlib zlib C library>
+                 so it has high performance. It supports the \"zlib\",
+                 \"gzip\" and \"raw\" compression formats.
+                 .
+                 It provides a convenient high level API suitable for most
+                 tasks and for the few cases where more control is needed it
+                 provides access to the full zlib feature set.
+build-type:      Simple
+cabal-version:   >= 1.10
+tested-with:     GHC ==7.0.4, GHC ==7.2.2, GHC ==7.4.2, GHC ==7.6.3, GHC ==7.8.4, GHC ==7.10.3, GHC ==8.0.1, GHC==8.0.2, GHC ==8.1.*
+
+extra-source-files: changelog
+                    -- zlib C sources (for Windows)
+                    cbits/crc32.h cbits/inffast.h cbits/inflate.h
+                    cbits/trees.h cbits/deflate.h cbits/inffixed.h
+                    cbits/inftrees.h cbits/zutil.h cbits/gzguts.h
+                    -- test data files
+                    test/data/bad-crc.gz test/data/custom-dict.zlib
+                    test/data/custom-dict.zlib-dict test/data/hello.gz
+                    test/data/not-gzip test/data/two-files.gz
+                    -- demo programs:
+                    examples/gzip.hs examples/gunzip.hs
+
+source-repository head
+  type: git
+  location: https://github.com/haskell/zlib.git
+
+flag non-blocking-ffi
+  default:     False
+  manual:      True
+  description: The (de)compression calls can sometimes take a long time, which
+               prevents other Haskell threads running. Enabling this flag
+               avoids this unfairness, but with greater overall cost.
+
+library
+  exposed-modules: Codec.Compression.GZip,
+                   Codec.Compression.Zlib,
+                   Codec.Compression.Zlib.Raw,
+                   Codec.Compression.Zlib.Internal
+  other-modules:   Codec.Compression.Zlib.Stream
+  if impl(ghc < 7)
+    default-language: Haskell98
+    default-extensions: PatternGuards
+  else
+    default-language: Haskell2010
+  other-extensions: CPP, ForeignFunctionInterface, RankNTypes, BangPatterns,
+                    DeriveDataTypeable
+  if impl(ghc >= 7.2)
+    other-extensions: DeriveGeneric
+  build-depends:   base >= 4 && < 5,
+                   bytestring >= 0.9 && < 0.12
+  if impl(ghc >= 7.2 && < 7.6)
+    build-depends: ghc-prim
+  includes:        zlib.h
+  ghc-options:     -Wall -fwarn-tabs
+  if flag(non-blocking-ffi)
+    cpp-options:   -DNON_BLOCKING_FFI
+  if !os(windows)
+    -- Normally we use the the standard system zlib:
+    extra-libraries: z
+  else
+    -- However for the benefit of users of Windows (which does not have zlib
+    -- by default) we bundle a complete copy of the C sources of zlib-1.2.8
+    c-sources:     cbits/adler32.c cbits/compress.c cbits/crc32.c
+                   cbits/deflate.c cbits/infback.c
+                   cbits/inffast.c cbits/inflate.c cbits/inftrees.c
+                   cbits/trees.c cbits/uncompr.c cbits/zutil.c
+    include-dirs:  cbits
+    install-includes: zlib.h zconf.h
+
+test-suite tests
+  type: exitcode-stdio-1.0
+  main-is:         Test.hs
+  other-modules:   Utils,
+                   Test.Codec.Compression.Zlib.Internal,
+                   Test.Codec.Compression.Zlib.Stream
+  hs-source-dirs:  test
+  default-language: Haskell2010
+  build-depends:   base, bytestring, zlib,
+                   QuickCheck       == 2.*,
+                   tasty            >= 0.8 && < 0.12,
+                   tasty-quickcheck == 0.8.*,
+                   tasty-hunit      >= 0.8 && < 0.10
+  ghc-options:     -Wall
diff --git a/test/golden-test-cases/zlib.nix.golden b/test/golden-test-cases/zlib.nix.golden
new file mode 100644
--- /dev/null
+++ b/test/golden-test-cases/zlib.nix.golden
@@ -0,0 +1,18 @@
+{ mkDerivation, base, bytestring, fetchurl, QuickCheck, tasty
+, tasty-hunit, tasty-quickcheck, zlib
+}:
+mkDerivation {
+  pname = "zlib";
+  version = "0.6.1.2";
+  src = fetchurl {
+    url = "http://example.org/";
+    sha256 = "abc";
+  };
+  libraryHaskellDepends = [ base bytestring ];
+  librarySystemDepends = [ zlib ];
+  testHaskellDepends = [
+    base bytestring QuickCheck tasty tasty-hunit tasty-quickcheck
+  ];
+  description = "Compression and decompression in the gzip and zlib formats";
+  license = stdenv.lib.licenses.bsd3;
+}
