Skip to content
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

Add an option to use cabal-install for the build #8

Open
wants to merge 1 commit into
base: ghc962
Choose a base branch
from

Conversation

Gabriella439
Copy link
Collaborator

This adds a new useCabalInstall option to the Haskell builder which lets you use the cabal (v2) command-line interface instead of the ./Setup (v1) command-line interface.

This is a hash-preserving change for Haskell packages that don't use this flag.

Comment on lines -539 to +547
export GHC_PACKAGE_PATH="$packageConfDir:"
${lib.optionalString (!useCabalInstall) ''export GHC_PACKAGE_PATH="$packageConfDir:"''}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this env var simply be ignored if using cabal-install? Why put it behind a switch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cabal V2 CLI complains about it if you set it. It will tell you to instead set --package-db to the same value (which the Nix build already does)

Copy link
Member

@9999years 9999years left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should upstream this

@Gabriella439
Copy link
Collaborator Author

I'm still not sure if I should merge this because it doesn't seem to fix the original build performance problem I was trying to solve. I'm still debugging further

@parsonsmatt parsonsmatt removed their request for review August 6, 2024 16:17
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.

3 participants