# vim: filetype=yaml sw=2
version: '[% c("var/cbindgen_version") %]'
git_url: https://github.com/eqrion/cbindgen
git_hash: '[% c("var/cbindgen_hash") %]'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'

var:
  cbindgen_version: 0.14.1
  cbindgen_hash: 0761b9bbe48d01ded1bbec45bbeea5544b3b1002
  cbindgen_vendor_hash: 1c500bc1b8de4eb400f90a528c4b5c6b2c7357e401a95c5354469a18fd365dbc
  cbindgen_vendor_people_tpo_user: gk
  container:
    use_container: 1

targets:
  android:
    var:
      cbindgen_version: 0.19.0
      cbindgen_hash: d9e490ce8b836194595bd30611253a7028059da2
      cbindgen_vendor_hash: 7d99c195b180e28ca7499d8744d020b864f952a5ba699716707aec9a06b4ee8b
      cbindgen_vendor_people_tpo_user: boklm

input_files:
  - project: container-image
  - name: rust
    project: rust
  # `cargo vendor vendor` in the `cbindgen` directory has vendored the sources.
  # Use `make cargo_vendor-cbindgen` or `make cargo_vendor-cbindgen-android`
  # (for the Android version) to re-generate the vendor tarball
  - URL: https://people.torproject.org/~[% c('var/cbindgen_vendor_people_tpo_user') %]/mirrors/sources/cbindgen-vendor-[% c('version') %].tar.bz2
    sha256sum: '[% c("var/cbindgen_vendor_hash") %]'

steps:
  cargo_vendor:
    filename: '[% project %]-vendor-[% c("version") %].tar.bz2'
    input_files:
      - project: container-image
        pkg_type: build
