git.iko.soy/typeable/cabal2nix
on master help sign in
hackage2nix: add the specified core package versions to the default package list to make the resolver happy

This solution is probably bad because we don't care to have packages generated that are core packages anyway.

commit4546c2bc9c0ba044a102cb76f248c37dc043c45f authorPeter Simons <simons@cryp.to> dateSun 4 Jan 2015, 20:35 (12 years ago) parent5c74aaf
1 file changed+7−1
src/hackage2nix.hs+7−1
src/hackage2nix.hs+7−1
@@ -158,7 +158,13 @@ defaultPackageOverrides :: [Dependency]
158158defaultPackageOverrides = map (\s -> maybe (error (show s ++ " is not a valid override selector")) id (simpleParse s))
159159 [ "mtl == 2.1.*"
160160 , "monad-control == 0.3.*"
161− ]
161+ ] ++
162+ [ Dependency n (thisVersion v) | PackageIdentifier n v <- corePackages ]
163+ -- TODO: This is necessary because otherwise we may end up having a
164+ -- version that's "too new" in the default package set. The problem
165+ -- is that we don't want those packages generated, really, so maybe
166+ -- we should remove them from the final package set after the
167+ -- resover has been constructed?
162168
163169-- These packages are added to the generated set, but the play no role during dependency resolution.
164170extraPackages :: [Dependency]