distributable:
  url: https://github.com/n0-computer/iroh/archive/refs/tags/v{{version}}.tar.gz
  strip-components: 1

versions:
  github: n0-computer/iroh/releases/tags

build:
  dependencies:
    rust-lang.org/cargo: '*'
    rust-lang.org: '^1.70'
  script:
    - run: cargo install --path . --root {{prefix}}
      if: <0.6.0
    - run: cargo install --path . --root {{prefix}}
      working-directory: iroh
      if: '>=0.6.0'

provides:
  - bin/iroh

test: iroh --help
