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 heroku-pre-install hook #1

Merged
merged 1 commit into from Nov 21, 2012
Merged

Add heroku-pre-install hook #1

merged 1 commit into from Nov 21, 2012

Conversation

timjb
Copy link

@timjb timjb commented Nov 12, 2012

I've got a project that depends on the regex-pcre package, which in turn depends on the pcre C library. Since Heroku doesn't have that library installed, I have to write a script that downloads and builds the C library and installs regex-pcre with --extra-lib-dirs. This commit allows me to do that by including a script named heroku-pre-install in my Haskell Heroku app that gets executed before cabal install.

…exists)

can be used to install c dependencies etc.
@mwotton
Copy link
Owner

mwotton commented Nov 12, 2012

I wonder if this is the right way to approach it - we're going to hit the same issue for other stuff. maybe the multi-buildpack approach would be cleaner? @luciferous, @pufuwozu, what do you think?

@puffnfresh
Copy link

I did hit this regex-pcre problem when trying to deploy a Hakyll website 😞

But multi-buildpack doesn't seem like a bad idea 💡 - willing to give it a try?

@puffnfresh
Copy link

Damn, just ran into this now that my important project depends on yesod-markdown. 👎

mwotton added a commit that referenced this pull request Nov 21, 2012
Add `heroku-pre-install` hook
@mwotton mwotton merged commit 9d11126 into mwotton:master Nov 21, 2012
@mwotton
Copy link
Owner

mwotton commented Nov 21, 2012

I don't have time to hack on the multi-buildpack idea, so I'll merge this.

@timjb
Copy link
Author

timjb commented Nov 21, 2012

In my opinion the multi-buildpack approach would better, but I just couldn't get it to work. I've tried installing the pcre C library in my heroku-pre-install script without using a separate cabal install with --extra-lib-dirs for the regex packages. This would be the first logical step towards turning my script into a buildpack, since this buildpack can't rely on GHC and cabal since would be executed before the Haskell buildpack. I've fiddled with various options in heroku-buildpack-haskell and my heroku-pre-install script but the cabal install of the main project always failed because cabal couldn't find a particular library. So this seems to be the easiest solution for my case. Thanks for merging the pull request.

@puffnfresh
Copy link

@timjb I'm add highlighting-kate with pcre-light preinstalled to my fork because:

  1. It doesn't require having a C library installed
  2. It's common enough for webapps

If pcre-light doesn't work properly for everyone I'll just update the Buildpack to have the C library preinstalled.

mwotton pushed a commit that referenced this pull request Jul 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants