Skip to content

Build nonReinstallablePkgs from pre-existing packages in plan.json #2207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jun 4, 2024

Conversation

hamishmack
Copy link
Collaborator

@hamishmack hamishmack commented May 27, 2024

Haskell.nix now respects the pre-existing packages selected by the cabal planner. The selection made by the planner is used to set nonReinstallablePkgs.

Instead setting nonReinstallablePkgs and reinstallableLibGhc haskell.nix projects should add constraints to the cabal project.

For instance to force the use of the pre-exising text package add:

  constraints: text installed

To make sure text is reinstalled use:

  constraints: text source

The pre-existing ghc will now be used by default as that is what cabal will choose (haskell.nix used to choose reinstallableLibGhc=true by default).

To allow cabal to choose reinstalling ghc add:

  allow-boot-library-installs: True

To force cabal to choose reinstalling:

  constraints: ghc source
  allow-boot-library-installs: True

It may also need allow-newer: ghc:Cabal

@hamishmack hamishmack requested a review from andreabedini May 27, 2024 12:00
@hamishmack hamishmack self-assigned this Jun 4, 2024
@hamishmack hamishmack merged commit adc2e66 into master Jun 4, 2024
894 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant