Safe Haskell | None |
---|---|
Language | GHC2021 |
Hix.Managed.Cabal.Resources
Synopsis
- packageDbs :: PackageDBStack
- resources :: Packages ManagedPackage -> SolveConfig -> M SolveResources
- acquire :: Packages ManagedPackage -> CabalConfig -> GhcDb -> M SolveResources
Documentation
resources :: Packages ManagedPackage -> SolveConfig -> M SolveResources Source #
This adds the ManagedPackage
s to the source package DB, which is the set of available package IDs.
This means that the solver will find our local packages (for targets that depend on packages in other envs) like it
finds Hackage packages, and therefore local deps will be included in the plan.
Because we don't want local packages in the plan (as they are not mutable, but static in the Nix build), it would be
tempting to add ManagedPackage
s to the installed package index instead, which would exclude them from the plan's
overrides.
However, their metadata must include concrete unit IDs for their dependencies with fixed versions, which would
require us to choose versions for them and might interfere with solving.
Maybe the basic installed package index could be queried to determine the dep versions. Not sure this would be better than just filtering the plan.
acquire :: Packages ManagedPackage -> CabalConfig -> GhcDb -> M SolveResources Source #