Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Preserve ENV vars CPATH and CPPPATH (composable buildpacks) #30

merged 1 commit into from

2 participants

David Rice Zeke Sikelianos
David Rice

Not overriding these variables entirely in the nodejs buildpack allows for it to be easily composable with others that provide dependencies not specifiable in an npm package.json using the heroku-buildpack-multi without having to hack the nodejs buildpack itself.

David Rice davidjrice referenced this pull request in ddollar/heroku-buildpack-multi

Allow buildpack to export environment for subsequent packs #11

Zeke Sikelianos

Thanks for submitting this pull request @davidjrice. I don't see any immediate harm in merging this, but I'd like to better understand your use case first. Can you give a rundown of the multi-buildpack workflow you're using?

David Rice

@zeke cool

The buildpacks used are.

  • heroku-buildpack-cairo
  • heroku-buildpack-nodejs

The rough workflow is

  • Install heroku-buildpack-cairo
  • This modifies environment variables CPPPATH, CPATH, LIBRARY_PATH, PKG_CONFIG_PATH and CFLAGS
  • Modification was required then for the node.js buildpack to not override any previously set ENV vars

The end result is that node-canvas installs gracefully under npm without hacking the library itself.

Zeke Sikelianos zeke merged commit 51fd8ec into from
Zeke Sikelianos

Thanks for the patch, @davidjrice. It's been merged into the official buildpack! I'd love to see a blog post about how you wired this all together, as I've got some cairo/node-canvas aspirations of my own... :metal:

Justin Searls searls referenced this pull request in linemanjs/heroku-buildpack-lineman

Cache node_modules #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/compile
4 bin/compile
@@ -164,8 +164,8 @@ cp "$VENDORED_NODE/bin/node" "$BUILD_DIR/bin/node"
# setting up paths for building
# install dependencies with npm
echo "-----> Installing dependencies with npm"
Something went wrong with that request. Please try again.