diff --git a/cabal2nix.cabal b/cabal2nix.cabal
--- a/cabal2nix.cabal
+++ b/cabal2nix.cabal
@@ -1,5 +1,5 @@
 Name:                   cabal2nix
-Version:                1.69
+Version:                1.70
 Copyright:              Peter Simons, Andres Loeh
 License:                BSD3
 License-File:           LICENSE
@@ -10,7 +10,7 @@
 Synopsis:               Convert Cabal files into Nix build instructions
 Cabal-Version:          >= 1.8
 Build-Type:             Custom
-Tested-With:            GHC >= 6.10.4 && <= 7.8.3
+Tested-With:            GHC >= 7.0.4 && <= 7.8.3
 Data-files:             README.md
 Description:
   The @cabal2nix@ utility converts Cabal files into Nix build instructions. The
@@ -38,8 +38,8 @@
   .
   The only required argument is the path to the cabal file. For example:
   .
-  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.69/cabal2nix.cabal
-  > cabal2nix cabal://cabal2nix-1.69
+  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.70/cabal2nix.cabal
+  > cabal2nix cabal://cabal2nix-1.70
   .
   If the @--sha256@ option has not been specified, cabal2nix calls
   @nix-prefetch-url@ to determine the hash automatically. This causes
@@ -57,7 +57,7 @@
 Executable cabal2nix
   main-is:              cabal2nix.hs
   hs-source-dirs:       src
-  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.16,
+  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.18,
                         filepath, directory, process, hackage-db, transformers
   Extensions:           PatternGuards, RecordWildCards, CPP
   Ghc-Options:          -Wall
@@ -79,7 +79,7 @@
 Executable hackage4nix
   main-is:              hackage4nix.hs
   hs-source-dirs:       src
-  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.16,
+  Build-Depends:        base >= 3 && < 5, regex-posix, pretty, Cabal >= 1.18,
                         mtl, containers, directory, filepath, hackage-db, transformers, process
   Extensions:           PatternGuards, RecordWildCards, CPP
   Ghc-Options:          -Wall
diff --git a/src/Cabal2Nix/Flags.hs b/src/Cabal2Nix/Flags.hs
--- a/src/Cabal2Nix/Flags.hs
+++ b/src/Cabal2Nix/Flags.hs
@@ -13,6 +13,7 @@
  | name == "hslua"              = [enable "system-lua"]
  | name == "idris"              = [enable "llvm", enable "gmp", enable "ffi"]
  | name == "io-streams"         = [enable "NoInteractiveTests"]
+ | name == "pandoc"             = [enable "https", enable "make-pandoc-man-pages"]
  | name == "reactive-banana-wx" = [disable "buildExamples"]
  | name == "snap-server"        = [enable "openssl"]
  | name == "xmobar"             = [enable "all_extensions"]
diff --git a/src/Cabal2Nix/License.hs b/src/Cabal2Nix/License.hs
--- a/src/Cabal2Nix/License.hs
+++ b/src/Cabal2Nix/License.hs
@@ -12,6 +12,7 @@
 fromCabalLicense (LGPL (Just (Version [2,1] [])))       = Known "self.stdenv.lib.licenses.lgpl21"
 fromCabalLicense (LGPL (Just (Version [2] [])))         = Known "self.stdenv.lib.licenses.lgpl2"
 fromCabalLicense (LGPL (Just (Version [3] [])))         = Known "self.stdenv.lib.licenses.gpl3"
+fromCabalLicense (AGPL (Just (Version [3] [])))         = Known "self.stdenv.lib.licenses.agpl3"
 fromCabalLicense BSD3                                   = Known "self.stdenv.lib.licenses.bsd3"
 fromCabalLicense BSD4                                   = Known "self.stdenv.lib.licenses.bsd4"
 fromCabalLicense MIT                                    = Known "self.stdenv.lib.licenses.mit"
diff --git a/src/Cabal2Nix/Name.hs b/src/Cabal2Nix/Name.hs
--- a/src/Cabal2Nix/Name.hs
+++ b/src/Cabal2Nix/Name.hs
@@ -75,6 +75,7 @@
 libNixName "poppler-glib"                       = return "popplerGlib"
 libNixName "pq"                                 = return "postgresql"
 libNixName "pthread"                            = []
+libNixName "sdl2"                               = return "SDL2"
 libNixName "sndfile"                            = return "libsndfile"
 libNixName "sqlite3"                            = return "sqlite"
 libNixName "ssl"                                = return "openssl"
diff --git a/src/Cabal2Nix/PostProcess.hs b/src/Cabal2Nix/PostProcess.hs
--- a/src/Cabal2Nix/PostProcess.hs
+++ b/src/Cabal2Nix/PostProcess.hs
@@ -30,7 +30,8 @@
   | pname == "epic"             = deriv { extraLibs = "gmp":"boehmgc":extraLibs, buildTools = "happy":buildTools }
   | pname == "either"           = deriv { runHaddock = True, phaseOverrides = eitherNoHaddock }
   | pname == "ghc-heap-view"    = deriv { phaseOverrides = ghciPostInstall }
-  | pname == "ghc-mod"          = deriv { phaseOverrides = ghcModPostInstall, buildTools = "emacs":buildTools }
+  | pname == "ghc-mod"          = deriv { phaseOverrides = ghcModPostInstall, buildTools = "emacs":"makeWrapper":buildTools }
+  | pname == "ghc-parser"       = deriv { buildTools = "cpphs":"happy":buildTools, phaseOverrides = ghcParserPatchPhase }
   | pname == "ghc-paths"        = deriv { phaseOverrides = ghcPathsPatches }
   | pname == "ghc-vis"          = deriv { phaseOverrides = ghciPostInstall }
   | pname == "git-annex"        = deriv { phaseOverrides = gitAnnexOverrides, buildTools = "git":"rsync":"gnupg1":"curl":"lsof":"openssh":"which":"bup":"perl":buildTools }
@@ -46,6 +47,7 @@
   | pname == "haddock" && version < Version [2,14] []
                                 = deriv { buildTools = "alex":"happy":buildTools }
   | pname == "haddock"          = deriv { phaseOverrides = haddockPreCheck }
+  | pname == "hakyll"           = deriv { testDepends = "utillinux":testDepends }
   | pname == "happy"            = deriv { buildTools = "perl":buildTools }
   | pname == "haskeline"        = deriv { buildDepends = "utf8String":buildDepends }
   | pname == "haskell-src"      = deriv { buildTools = "happy":buildTools }
@@ -57,6 +59,7 @@
   | pname == "hmatrix"          = deriv { extraLibs = "liblapack":"blas": filter (/= "lapack") extraLibs }
   | pname == "hoogle"           = deriv { testTarget = "--test-option=--no-net" }
   | pname == "hspec"            = deriv { doCheck = False }
+  | pname == "hsyslog"          = deriv { phaseOverrides = hsyslogNoHaddock }
   | pname == "HTTP" && version >= Version [4000,2,14] []
                                 = deriv { runHaddock = True, phaseOverrides = httpNoHaddock }
   | pname == "GlomeVec"         = deriv { buildTools = "llvm":buildTools }
@@ -86,6 +89,7 @@
                                 = deriv { runHaddock = True, phaseOverrides = quickCheckNoHaddock }
   | pname == "repa-algorithms"  = deriv { extraLibs = "llvm":extraLibs }
   | pname == "repa-examples"    = deriv { extraLibs = "llvm":extraLibs }
+  | pname == "saltine"          = deriv { extraLibs = map (\x -> if x == "sodium" then "libsodium" else x) extraLibs }
   | pname == "SDL-image"        = deriv { extraLibs = "SDL_image":extraLibs }
   | pname == "SDL-mixer"        = deriv { extraLibs = "SDL_mixer":extraLibs }
   | pname == "SDL-ttf"          = deriv { extraLibs = "SDL_ttf":extraLibs }
@@ -152,14 +156,10 @@
   , "  cd .."
   , "  ensureDir \"$out/share/emacs\""
   , "  mv $pname-$version emacs/site-lisp"
-  , "  mv $out/bin/ghc-mod $out/bin/.ghc-mod-wrapped"
-  , "  cat - > $out/bin/ghc-mod <<EOF"
-  , "  #! ${self.stdenv.shell}"
-  , "  COMMAND=\\$1"
-  , "  shift"
-  , "  eval exec $out/bin/.ghc-mod-wrapped \\$COMMAND \\$( ${self.ghc.GHCGetPackages} ${self.ghc.version} | tr \" \" \"\\n\" | tail -n +2 | paste -d \" \" - - | sed 's/.*/-g \"&\"/' | tr \"\\n\" \" \") \"\\$@\""
-  , "  EOF"
-  , "  chmod +x $out/bin/ghc-mod"
+  , "  wrapProgram $out/bin/ghc-mod --add-flags \\"
+  , "    \"\\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \\\"\\$(dirname \\$0)\\\" \\\"-g -package-db -g\\\")\""
+  , "  wrapProgram $out/bin/ghc-modi --add-flags \\"
+  , "    \"\\$(${self.ghc.GHCGetPackages} ${self.ghc.version} \\\"\\$(dirname \\$0)\\\" \\\"-g -package-db -g\\\")\""
   , "'';"
   ]
 
@@ -207,10 +207,7 @@
 
 gitAnnexOverrides :: String
 gitAnnexOverrides = unlines
-  [ "preConfigure = ''"
-  , "  export HOME=\"$NIX_BUILD_TOP/tmp\""
-  , "  mkdir \"$HOME\""
-  , "'';"
+  [ "preConfigure = \"export HOME=$TEMPDIR\";"
   , "installPhase = \"./Setup install\";"
   , "checkPhase = ''"
   , "  cp dist/build/git-annex/git-annex git-annex"
@@ -262,11 +259,12 @@
 eitherNoHaddock :: String
 eitherNoHaddock = "noHaddock = self.stdenv.lib.versionOlder self.ghc.version \"7.6\";"
 
-httpNoHaddock, quickCheckNoHaddock, tarNoHaddock, transformersNoHaddock :: String
+httpNoHaddock, quickCheckNoHaddock, tarNoHaddock, transformersNoHaddock, hsyslogNoHaddock :: String
 httpNoHaddock = "noHaddock = self.stdenv.lib.versionOlder self.ghc.version \"6.11\";"
 quickCheckNoHaddock = httpNoHaddock
 tarNoHaddock = httpNoHaddock
 transformersNoHaddock = httpNoHaddock
+hsyslogNoHaddock = httpNoHaddock
 
 agdaPostInstall :: String
 agdaPostInstall = unlines
@@ -304,3 +302,10 @@
 
 haddockPreCheck :: String
 haddockPreCheck = "preCheck = \"unset GHC_PACKAGE_PATH\";"
+
+ghcParserPatchPhase :: String
+ghcParserPatchPhase = unlines
+  [ "patchPhase = ''"
+  , "  substituteInPlace build-parser.sh --replace \"/bin/bash\" \"$SHELL\""
+  , "'';"
+  ]
diff --git a/src/Distribution/NixOS/Fetch.hs b/src/Distribution/NixOS/Fetch.hs
--- a/src/Distribution/NixOS/Fetch.hs
+++ b/src/Distribution/NixOS/Fetch.hs
@@ -56,9 +56,14 @@
     , (True, "bzr")
     ]
 
+  -- | Remove '/' from the end of the path. Nix doesn't accept paths that
+  -- end in a slash.
+  stripSlashSuffix :: String -> String
+  stripSlashSuffix = reverse . dropWhile (== '/') . reverse
+
   fetchLocal :: Source -> MaybeT IO (DerivationSource, a)
   fetchLocal src = do
-    let path = stripPrefix "file://" $ sourceUrl src
+    let path = stripSlashSuffix $ stripPrefix "file://" $ sourceUrl src
     existsFile <- liftIO $ doesFileExist path
     existsDir  <- liftIO $ doesDirectoryExist path
     guard $ existsDir || existsFile
diff --git a/src/hackage4nix.hs b/src/hackage4nix.hs
--- a/src/hackage4nix.hs
+++ b/src/hackage4nix.hs
@@ -247,8 +247,6 @@
                     -- This build is way too complicated to maintain it automatically.
                   , "pkgs/development/compilers/pakcs/default.nix"
                   , "pkgs/development/libraries/haskell/hoogle/local.nix"
-                    -- Requires platform-specific magic that I don't want to add to cabal2nix.
-                  , "pkgs/development/libraries/haskell/fsnotify/default.nix"
                     -- Not registered on Hackage.
                   , "pkgs/development/compilers/agda/stdlib.nix"
                   , "pkgs/development/compilers/cryptol/1.8.x.nix"
