# Suggested workflow for handling c src dependencies in packages

**URL:** https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899
**Category:** General Usage
**Created:** [August 5, 2021, 4:35pm UTC](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899 "2021-08-05T16:35:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DrPapa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drpapa/32/6835_2.png) [@DrPapa](https://discourse.julialang.org/u/DrPapa)
#### Post date: [August 5, 2021, 4:35pm UTC](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899/1 "2021-08-05T16:35:49Z")

</div>

I have a private package (lets call it MyPkg.jl) that requires wrapping a very minimal c library. This c library provides a small subset of the package’s total capabilities. I have been playing w/ BinaryBuilder and I’ve been able to deploy a \_jll package locally. However, this seems overkill for my needs. If I understand the BinaryBuilder docs correct, it seems like I would need to maintain a URL for the c src and a \_jll repo in addition MyPkg.jl itself. Also, it is not clear of how these all interact. E.g. it seems to assume some upstream CI for building. I would prefer to keep all non-general repository dependencies self-contained in the MyPkg.jl repository.

Is there a recommended workflow for shipping the c source w/ the julia package and automatically building for the specific system?

If using the BinaryBuilder \_jll is recommended, is there a way to deploy to a non GitHub repo, e.g. a private GitLab?

---

<div class="post-metadata">

### Author: ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)
#### Post date: [August 5, 2021, 4:52pm UTC](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899/2 "2021-08-05T16:52:58Z")

</div>

Is [GitHub - JuliaPackaging/Yggdrasil: Collection of builder repositories for BinaryBuilder.jl](https://github.com/JuliaPackaging/Yggdrasil) not an option?

---

<div class="post-metadata">

### Author: ![DrPapa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drpapa/32/6835_2.png) [@DrPapa](https://discourse.julialang.org/u/DrPapa)
#### Post date: [August 5, 2021, 5:08pm UTC](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899/3 "2021-08-05T17:08:44Z")

</div>

No, the source code is private

---

<div class="post-metadata">

### Author: ![danielmatz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielmatz/32/2285_2.png) [@danielmatz](https://discourse.julialang.org/u/danielmatz)
#### Post date: [August 5, 2021, 5:17pm UTC](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899/4 "2021-08-05T17:17:24Z")

</div>

You can just keep the source with the package itself. When you add the package, Julia calls the `deps/build.jl` script, which can just call your makefile. You have to actually be able to build the source on the machines where you add the package, of course.

---

<div class="post-metadata">

### Author: ![DrPapa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drpapa/32/6835_2.png) [@DrPapa](https://discourse.julialang.org/u/DrPapa)
#### Post date: [August 5, 2021, 5:27pm UTC](https://discourse.julialang.org/t/suggested-workflow-for-handling-c-src-dependencies-in-packages/65899/5 "2021-08-05T17:27:30Z")

</div>

Would it make any sense to use `deps/build.jl` to call a BinraryBuilder `build_tarballs.jl` targeting the host platform with something like `platform = [parse(Platform, Base.BinaryPlatforms.host_triplet())]` so to not require build tools explicitly on the host machine?
