@@ -64,6 +64,11 @@ data Configuration = Configuration
6464 -- also disable their meta.hydraPlatforms attribute to avoid cluttering our
6565 -- Hydra job with lots of failure messages.
6666 , brokenPackages :: [Constraint ]
67+
68+ -- | These packages have likely been broken for a long time and are unmaintained
69+ -- upstream. To reduce the size of hackage-packages.nix, we don't even create
70+ -- expressions for them.
71+ , excludedPackages :: Set PackageName
6772 }
6873 deriving (Show , Generic )
6974
@@ -79,6 +84,7 @@ instance Semigroup Configuration where
7984 , unsupportedPlatforms = unsupportedPlatforms l <> unsupportedPlatforms r
8085 , dontDistributePackages = dontDistributePackages l <> dontDistributePackages r
8186 , brokenPackages = brokenPackages l <> brokenPackages r
87+ , excludedPackages = excludedPackages l <> excludedPackages r
8288 }
8389
8490instance FromJSON Configuration where
@@ -92,6 +98,7 @@ instance FromJSON Configuration where
9298 <*> o .:? " unsupported-platforms" .!= mempty
9399 <*> o .:? " dont-distribute-packages" .!= mempty
94100 <*> o .:? " broken-packages" .!= mempty
101+ <*> o .:? " excluded-packages" .!= mempty
95102 parseJSON _ = error " invalid Configuration"
96103
97104instance FromJSON Identifier where
@@ -114,7 +121,11 @@ assertConsistency :: MonadFail m => Configuration -> m Configuration
114121assertConsistency cfg@ Configuration {.. } = do
115122 let report msg = fail (" *** configuration error: " ++ msg)
116123 maintainedPackages = Set. unions (Map. elems packageMaintainers)
117- disabledPackages = dontDistributePackages `Set.union` Set. fromList (constraintPkgName <$> brokenPackages)
124+ disabledPackages = Set. unions
125+ [ dontDistributePackages
126+ , Set. fromList (constraintPkgName <$> brokenPackages)
127+ , excludedPackages
128+ ]
118129 disabledMaintainedPackages = maintainedPackages `Set.intersection` disabledPackages
119130 unless (Set. null disabledMaintainedPackages) $
120131 report (" disabled packages that have a maintainer: " ++ show disabledMaintainedPackages)
0 commit comments