@@ -9,8 +9,8 @@ module Distribution.Nixpkgs.Haskell.FromCabal.Configuration
99 )
1010 where
1111
12−import Control.Exception ( throwIO )
1312import Control.DeepSeq
13+import Control.Exception ( throwIO )
1414import Control.Lens
1515import Control.Monad
1616import Data.Aeson
@@ -57,7 +57,7 @@ data Configuration = Configuration
5757 -- |We know that these packages won't compile, so we mark them as broken and
5858 -- also disable their meta.hydraPlatforms attribute to avoid cluttering our
5959 -- Hydra job with lots of failure messages.
60− , brokenPackages :: Set PackageName
60+ , brokenPackages :: [Constraint]
6161 }
6262 deriving (Show, Generic)
6363
@@ -89,15 +89,13 @@ parseKey :: FromJSON k => Text -> k
8989parseKey s = either error id (parseEither parseJSON (String s))
9090
9191readConfiguration :: FilePath -> IO Configuration
92−readConfiguration path =
93− decodeFileEither path >>= either throwIO assertConsistency
92+readConfiguration path = decodeFileEither path >>= either throwIO assertConsistency
9493
9594assertConsistency :: Monad m => Configuration -> m Configuration
9695assertConsistency cfg@Configuration {..} = do
9796 let report msg = fail ("*** configuration error: " ++ msg)
98−
9997 maintainedPackages = Set.unions (Map.elems packageMaintainers)
100− disabledPackages = dontDistributePackages `Set.union` brokenPackages
98+ disabledPackages = dontDistributePackages `Set.union` Set.fromList (depPkgName <$> brokenPackages)
10199 disabledMaintainedPackages = maintainedPackages `Set.intersection` disabledPackages
102100 unless (Set.null disabledMaintainedPackages) $
103101 report ("disabled packages that have a maintainer: " ++ show disabledMaintainedPackages)