# Hab studio build with private dependencies (without on-prem builder)

**URL:** <https://discourse.chef.io/t/hab-studio-build-with-private-dependencies-without-on-prem-builder/18721>\
**Category:** Habitat Help\
**Created:** [July 6, 2018, 8:04pm UTC](https://discourse.chef.io/t/hab-studio-build-with-private-dependencies-without-on-prem-builder/18721 "2018-07-06T20:04:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdangit](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bdangit/32/1466_2.png) [@bdangit](https://discourse.chef.io/u/bdangit)\
**Post date:** [July 6, 2018, 8:04pm UTC](https://discourse.chef.io/t/hab-studio-build-with-private-dependencies-without-on-prem-builder/18721/1 "2018-07-06T20:04:52Z")

</div>

I have some private harts that have been built locally. They don’t exist in the public builder nor do they exist on an on-prem builder.

On a fresh environment, I am trying to execute “hab studio build /path/to/plan.sh”. It will fail because the `plan.sh` requires those private deps that I just built.

It seems like I need to run “hab pkg install /my/private/harts” before it actually executes a build. I have not seen any flags or switches that allow me to do this.

Anyone able to do this?

---

<div class="post-metadata">

**Author:** ![chrisortman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/chrisortman/32/3015_2.png) [@chrisortman](https://discourse.chef.io/u/chrisortman)\
**Post date:** [July 6, 2018, 8:15pm UTC](https://discourse.chef.io/t/hab-studio-build-with-private-dependencies-without-on-prem-builder/18721/2 "2018-07-06T20:15:21Z")

</div>

I used to have to do something similar, I used an argument to the studio so that it would reuse the same studio and then it could find the harts.

I’m guess ing you’re going to have to do something like

```
do_prepare() {
    for f in $PLAN_CONTEXT/DEPS
    do
            hab pkg install $f
    done
}
```

---

<div class="post-metadata">

**Author:** ![bdangit](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bdangit/32/1466_2.png) [@bdangit](https://discourse.chef.io/u/bdangit)\
**Post date:** [July 9, 2018, 11:29pm UTC](https://discourse.chef.io/t/hab-studio-build-with-private-dependencies-without-on-prem-builder/18721/3 "2018-07-09T23:29:46Z")

</div>

Ahhh. this looks like it would help me – but that kind of mechanism is inside the `plan.sh`. That’s something that I want to avoid.

BTW, I opted to make use of `hab studio run <commands>`. To get packages installed before running the build, I ran this `hab studio run "sh studio-localdepot.sh && build myawesome/plan.sh"`. The `studio-localdepot.sh` contains instructions to just do `hab pkg install whatever.harts`.
