Skip to content

stack_install: let user apply source patches #902

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

Closed
aherrmann opened this issue May 27, 2019 · 3 comments
Closed

stack_install: let user apply source patches #902

aherrmann opened this issue May 27, 2019 · 3 comments

Comments

@aherrmann
Copy link
Member

Is your feature request related to a problem? Please describe.
With Hazel some Hackage packages require small source patches to build under Bazel. E.g. to adjust file paths to embedded files or runtime data dependencies. See wai-app-static for example. The new stack_install does not allow users to apply source patches.

Describe the solution you'd like
stack_install should allow users to specify source patches. Ideally in a way similar to http_archive.

Describe alternatives you've considered
Users could fork the package repository and if stack_install allowed to override a package's source repository users could inject patches that way. For small patches this is usually too much overhead.

Additional context
Opening issue as suggested in #887 (comment).

@mboes
Copy link
Member

mboes commented May 27, 2019

A simple but powerful way to achieve this would be to add a vendored_packages attribute that lets users include source checkouts local to the repo, or in a http_archive. Users can patch that source as much as they want, or include a BUILD.bazel, which would override any default target definition.

@aherrmann
Copy link
Member Author

vendored_packages sounds like a very good solution to this problem.

@hanshoglund
Copy link
Contributor

Looks like this is covered by #1060. Shall we close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants