@@ -64,6 +64,11 @@ data Configuration = Configuration
64
64
-- also disable their meta.hydraPlatforms attribute to avoid cluttering our
65
65
-- Hydra job with lots of failure messages.
66
66
, 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
67
72
}
68
73
deriving (Show , Generic )
69
74
@@ -79,6 +84,7 @@ instance Semigroup Configuration where
79
84
, unsupportedPlatforms = unsupportedPlatforms l <> unsupportedPlatforms r
80
85
, dontDistributePackages = dontDistributePackages l <> dontDistributePackages r
81
86
, brokenPackages = brokenPackages l <> brokenPackages r
87
+ , excludedPackages = excludedPackages l <> excludedPackages r
82
88
}
83
89
84
90
instance FromJSON Configuration where
@@ -92,6 +98,7 @@ instance FromJSON Configuration where
92
98
<*> o .:? " unsupported-platforms" .!= mempty
93
99
<*> o .:? " dont-distribute-packages" .!= mempty
94
100
<*> o .:? " broken-packages" .!= mempty
101
+ <*> o .:? " excluded-packages" .!= mempty
95
102
parseJSON _ = error " invalid Configuration"
96
103
97
104
instance FromJSON Identifier where
@@ -114,7 +121,11 @@ assertConsistency :: MonadFail m => Configuration -> m Configuration
114
121
assertConsistency cfg@ Configuration {.. } = do
115
122
let report msg = fail (" *** configuration error: " ++ msg)
116
123
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
+ ]
118
129
disabledMaintainedPackages = maintainedPackages `Set.intersection` disabledPackages
119
130
unless (Set. null disabledMaintainedPackages) $
120
131
report (" disabled packages that have a maintainer: " ++ show disabledMaintainedPackages)
0 commit comments