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

Implement a GHC_OPTIONS_LOCAL envvar #43

Open
harendra-kumar opened this issue Jun 7, 2021 · 0 comments
Open

Implement a GHC_OPTIONS_LOCAL envvar #43

harendra-kumar opened this issue Jun 7, 2021 · 0 comments

Comments

@harendra-kumar
Copy link
Member

In cabal GHC_OPTIONS envvar translates to the --ghc-options cabal flag, which enables ghc options for all dependencies. We can have another flag to set the ghc options only on the package being built.

To implement that we can create a temporary cabal.project file in .packcheck dir, copy the original cabal.project to this and add a ghc-options stanza in it with the specified options. Then use this cabal.project for build.

In case of sdist build we anyway create a fresh cabal.project, we can add the ghc-options stanza to it.

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

No branches or pull requests

1 participant