You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently haskell.nix uses the package name as the key for `hsPkgs`. This means that only one package with a given name can exist for a given plan. When the cabal planner makes a plan it often includes more than one version of a given package. For instance if a package is needed for a `build-tool-depends` it is likely that it may have requirements that do not match the rest of the project.
When there are two versions of the same package in the plan haskell.nix currently chooses the most recent one. This is often the correct choice for the main plan (though it may not always be), but it can sometimes be the wrong choice for the `build-tool-depends`.
This PR aims to resolve this issue by using the unit ID from the `plan.json` file as the key for `hsPkgs`. This means that we can much more closely match the plan.
* Use the `plan.json` as much as possible (including dependencies and cabal flag settings).
* Fall back on existing sources for information not in `plan.json`.
* Include mappings from `hsPkgs.${pkg-name}` to unit ID based entries.
* Support overrides of the form `packages.${pkg-name}...` (these are applied to all the versions of the package).
* Per-component `pre-existing` packages based on the `plan.json` dependencies.
0 commit comments