Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Allow buildpack to export environment for subsequent packs #11

wants to merge 4 commits into from

7 participants


This enables a buildpack to become entirely composable. Great work by @salsify

For example. Am currently using this to enable deploying a node.js app that depends on cairo.

Note, as some of the existing heroku buildpacks completely override previously set ENV variables at compile time, tweaks may be needed in other buildpacks themselves.



any chance to integrate this pull request?
(Or equivalently) any workaround to pass enviroment variable between buildpacks?
(Unfortunately) any library which is requiring the usage of pkg-config which need to be available at compilation time will require hack on the main buildpack.
It is specifically an issue for nodejs binded libraries


I'm running into this trying to use the npm package nodelua. The lua buildpack runs first, but has no way to pass on environment variables to the next buildpack.


I wonder if we could utilize the new .profile.d scripts to enable this functionality.


Alas, not as currently implemented, since the paths will be different at build- and runtime.

@tomdickin tomdickin referenced this pull request from a commit in tomdickin/heroku-buildpack-multi
@tomdickin tomdickin Adding env export for next buildpack
This is taken from ddollar#11

I am testing to see if this fixes the collectstatic issue experienced when deploying to heroku (possibly PYTHONPATH not currently set for python buildpack)

Sorry for the delay. If you rebase this I'd be happy to merge.

@ddollar ddollar added the enhancement label

All things being equal between this and #18, I have multiple buildpacks relying on #18's export behavior. (@davidjrice - do you have / know of buildpacks relying on this?)

(I'm slightly partial to the exports living outside bin, as they may be created dynamically; not that bin precludes this though.)


Merged #18

@ddollar ddollar closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 7, 2013
  1. @dspangen

    Update bin/compile

    dspangen authored
  2. @dspangen
  3. @dspangen


    dspangen authored
  4. @dspangen

    pass the dir along

    dspangen authored
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 bin/compile
5 bin/compile
@@ -45,6 +45,11 @@ for BUILDPACK in $(cat $1/.buildpacks); do
$dir/bin/release $1 > $1/last_pack_release.out
+ if [ -f $dir/bin/after_compile ]; then
+ source $dir/bin/after_compile $1
+ fi
+ echo "running next buildpack with environment:"
+ env
Something went wrong with that request. Please try again.