diff --git a/cabal2nix.cabal b/cabal2nix.cabal
--- a/cabal2nix.cabal
+++ b/cabal2nix.cabal
@@ -1,5 +1,5 @@
 name:               cabal2nix
-version:            2.14.2
+version:            2.14.3
 synopsis:           Convert Cabal files into Nix build instructions.
 description:
   Convert Cabal files into Nix build instructions. Users of Nix can install the latest
@@ -74,7 +74,7 @@
                     Александр Цамутали
 maintainer:         Peter Simons <simons@cryp.to>
 stability:          stable
-tested-with:        GHC == 8.6.3
+tested-with:        GHC == 8.6.4
 category:           Distribution, Nix
 homepage:           https://github.com/nixos/cabal2nix#readme
 bug-reports:        https://github.com/nixos/cabal2nix/issues
@@ -109,10 +109,10 @@
   hs-source-dirs:     src
   build-depends:      base                 > 4.11
                     , Cabal                > 2.4
-                    , aeson
+                    , aeson                > 1
                     , ansi-wl-pprint
                     , bytestring
-                    , containers
+                    , containers           >= 0.5.9
                     , deepseq              >= 1.4
                     , directory
                     , distribution-nixpkgs >= 1.2
diff --git a/hackage2nix/Main.hs b/hackage2nix/Main.hs
--- a/hackage2nix/Main.hs
+++ b/hackage2nix/Main.hs
@@ -77,6 +77,8 @@
             . Map.delete "som"                  -- TODO: https://github.com/NixOS/cabal2nix/issues/164
             . Map.delete "type"                 -- TODO: https://github.com/NixOS/cabal2nix/issues/163
             . Map.delete "control-invariants"   -- TODO: depends on "assert"
+            . Map.delete "with"                 -- TODO: https://github.com/NixOS/cabal2nix/issues/164
+            . Map.delete "telega"               -- TODO: depends on "with"
             . over (at "hermes") (fmap (set (contains "1.3.4.3") False))  -- TODO: https://github.com/haskell/hackage-server/issues/436
   hackage <- fixup <$> readHackage hackageRepository
   let
@@ -132,9 +134,14 @@
       (descr, cabalSHA256) <- readPackage hackageRepository pkgId
       meta <- readPackageMeta hackageRepository pkgId
 
-      let isInDefaultPackageSet :: Bool
+      let isInDefaultPackageSet, isHydraEnabled, isBroken :: Bool
           isInDefaultPackageSet = (== Just v) (Map.lookup name generatedDefaultPackageSet)
+          isHydraEnabled = isInDefaultPackageSet && not (isBroken || name `Set.member` dontDistributePackages config)
+          isBroken = any (withinRange v) [ vr | Dependency pn vr <- brokenPackages config, pn == name ]
 
+          droppedPlatforms :: Set Platform
+          droppedPlatforms = Map.findWithDefault mempty name (unsupportedPlatforms config)
+
           tarballSHA256 :: SHA256Hash
           tarballSHA256 = fromMaybe (error (display pkgId ++ ": meta data has no hash for the tarball"))
                                     (view (hashes . at "SHA256") meta)
@@ -149,9 +156,11 @@
           drv = fromGenericPackageDescription haskellResolver nixpkgsResolver targetPlatform (compilerInfo config) flagAssignment [] descr
                   & src .~ urlDerivationSource ("mirror://hackage/" ++ display pkgId ++ ".tar.gz") tarballSHA256
                   & editedCabalFile .~ cabalSHA256
-                  & metaSection.hydraPlatforms %~ (`Set.difference` Map.findWithDefault Set.empty name (dontDistributePackages config))
+                  & metaSection.platforms %~ (`Set.difference` Map.findWithDefault Set.empty name (unsupportedPlatforms config))
+                  & metaSection.hydraPlatforms %~ (if Set.null droppedPlatforms then id else (`Set.difference` droppedPlatforms))
+                  & metaSection.hydraPlatforms %~ (if isHydraEnabled then id else const Set.empty)
+                  & metaSection.broken ||~ isBroken
                   & metaSection.maintainers .~ Map.findWithDefault Set.empty name globalPackageMaintainers
-                  & metaSection.hydraPlatforms %~ (if isInDefaultPackageSet then id else const Set.empty)
                   & metaSection.homepage .~ ""
 
           overrides :: Doc
diff --git a/src/Distribution/Nixpkgs/Haskell/FromCabal/Configuration.hs b/src/Distribution/Nixpkgs/Haskell/FromCabal/Configuration.hs
--- a/src/Distribution/Nixpkgs/Haskell/FromCabal/Configuration.hs
+++ b/src/Distribution/Nixpkgs/Haskell/FromCabal/Configuration.hs
@@ -1,14 +1,16 @@
 {-# LANGUAGE RecordWildCards #-}
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE OverloadedStrings #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 
-module Distribution.Nixpkgs.Haskell.FromCabal.Configuration ( Configuration(..), readConfiguration, assertConsistency ) where
+module Distribution.Nixpkgs.Haskell.FromCabal.Configuration
+  ( Configuration(..), readConfiguration, assertConsistency
+  )
+  where
 
-import Control.Exception ( throwIO )
 import Control.DeepSeq
+import Control.Exception ( throwIO )
 import Control.Lens
 import Control.Monad
 import Data.Aeson
@@ -40,14 +42,22 @@
   -- role during dependency resolution.
   , extraPackages :: [Constraint]
 
-  -- |We know that these packages won't build, so we give them an empty
-  -- meta.hydraPlatforms attribute to avoid cluttering our Hydra output with
-  -- lots of failure messages.
-  , dontDistributePackages :: Map PackageName (Set Platform)
-
   -- |This information is used by the @hackage2nix@ utility to determine the
   -- 'maintainers' for a given Haskell package.
   , packageMaintainers :: Map Identifier (Set PackageName)
+
+  -- |These packages (by design) don't support certain platforms.
+  , unsupportedPlatforms :: Map PackageName (Set Platform)
+
+  -- |These packages cannot be distributed by Hydra, i.e. because they have an
+  -- unfree license or depend on other tools that cannot be distributed for
+  -- some reason.
+  , dontDistributePackages :: Set PackageName
+
+  -- |We know that these packages won't compile, so we mark them as broken and
+  -- also disable their meta.hydraPlatforms attribute to avoid cluttering our
+  -- Hydra job with lots of failure messages.
+  , brokenPackages :: [Constraint]
   }
   deriving (Show, Generic)
 
@@ -59,50 +69,33 @@
         <*> o .:? "core-packages" .!= mempty
         <*> o .:? "default-package-overrides" .!= mempty
         <*> o .:? "extra-packages" .!= mempty
-        <*> o .:? "dont-distribute-packages" .!= mempty
         <*> o .:? "package-maintainers" .!= mempty
+        <*> o .:? "unsupported-platforms" .!= mempty
+        <*> o .:? "dont-distribute-packages" .!= mempty
+        <*> o .:? "broken-packages" .!= mempty
   parseJSON _ = error "invalid Configuration"
 
 instance FromJSON Identifier where
   parseJSON (String s) = pure (review ident (T.unpack s))
   parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Nix identifier")
 
-#if MIN_VERSION_aeson(1,0,0)
-
 instance FromJSONKey Identifier where
   fromJSONKey = FromJSONKeyText parseKey
 
 instance FromJSONKey PackageName where
   fromJSONKey = FromJSONKeyText parseKey
 
-#elif MIN_VERSION_aeson(0,11,0)
-
-instance (FromJSON v) => FromJSON (Map Identifier v) where
-  parseJSON = fmap (Map.mapKeys parseKey) . parseJSON
-
-instance (FromJSON v) => FromJSON (Map PackageName v) where
-  parseJSON = fmap (Map.mapKeys parseKey) . parseJSON
-
-#else
-
-instance (Ord k, FromJSON k, FromJSON v) => FromJSON (Map k v) where
-  parseJSON  = fmap (Map.mapKeys parseKey) . parseJSON
-
-#endif
-
 parseKey :: FromJSON k => Text -> k
 parseKey s = either error id (parseEither parseJSON (String s))
 
 readConfiguration :: FilePath -> IO Configuration
-readConfiguration path =
-  decodeFileEither path >>= either throwIO assertConsistency
+readConfiguration path = decodeFileEither path >>= either throwIO assertConsistency
 
 assertConsistency :: Monad m => Configuration -> m Configuration
 assertConsistency cfg@Configuration {..} = do
   let report msg = fail ("*** configuration error: " ++ msg)
-
       maintainedPackages = Set.unions (Map.elems packageMaintainers)
-      disabledPackages = Map.keysSet dontDistributePackages
+      disabledPackages = dontDistributePackages `Set.union` Set.fromList (depPkgName <$> brokenPackages)
       disabledMaintainedPackages = maintainedPackages `Set.intersection` disabledPackages
   unless (Set.null disabledMaintainedPackages) $
     report ("disabled packages that have a maintainer: " ++ show disabledMaintainedPackages)
diff --git a/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs b/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs
--- a/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs
+++ b/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs
@@ -105,6 +105,7 @@
 libNixName "m"                                  = []  -- in stdenv
 libNixName "magic"                              = return "file"
 libNixName "MagickWand"                         = return "imagemagick"
+libNixName "mnl"                                = return "libmnl"
 libNixName "mpi"                                = return "openmpi"
 libNixName "ncursesw"                           = return "ncurses"
 libNixName "netsnmp"                            = return "net_snmp"
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
@@ -229,13 +229,12 @@
   where
     gitAnnexOverrides = unlines
       [ "preConfigure = \"export HOME=$TEMPDIR; patchShebangs .\";"
-      , "installPhase = \"make PREFIX=$out BUILDER=: install\";"
-      , "checkPhase = ''"
+      , "postBuild = ''"
       , "  ln -sf dist/build/git-annex/git-annex git-annex"
       , "  ln -sf git-annex git-annex-shell"
-      , "  export PATH+=\":$PWD\""
-      , "  git-annex test"
       , "'';"
+      , "installPhase = \"make PREFIX=$out BUILDER=: install install-completions\";"
+      , "checkPhase = ''PATH+=\":$PWD\" git-annex test'';"
       , "enableSharedExecutables = false;"
       ]
     buildInputs = pkgs ["git","rsync","gnupg","curl","wget","lsof","openssh","which","bup","perl"]
diff --git a/src/Distribution/Nixpkgs/Haskell/OrphanInstances.hs b/src/Distribution/Nixpkgs/Haskell/OrphanInstances.hs
--- a/src/Distribution/Nixpkgs/Haskell/OrphanInstances.hs
+++ b/src/Distribution/Nixpkgs/Haskell/OrphanInstances.hs
@@ -49,6 +49,10 @@
   parseJSON (String s) = return (fromString (T.unpack s))
   parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Haskell package identifier")
 
+instance FromJSON VersionRange where
+  parseJSON (String s) = return (fromString (T.unpack s))
+  parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Cabal VersionRange")
+
 instance FromJSON Dependency where
   parseJSON (String s) = return (fromString (T.unpack s))
   parseJSON s = fail ("parseJSON: " ++ show s ++ " is not a valid Haskell Dependency")
