distributable:
  url: https://github.com/o2sh/onefetch/archive/refs/tags/{{ version }}.tar.gz
  strip-components: 1

provides:
  - bin/onefetch

versions:
  github: o2sh/onefetch
  strip: /v/

dependencies:
  libgit2.org: ~1.7 # links to libgit2.so.1.7

build:
  dependencies:
    cmake.org: ^3
    rust-lang.org: '>=1.56'
    rust-lang.org/cargo: '*'
  script: cargo install --locked --path . --root {{prefix}}

test:
  script:
    - test "$(onefetch --version)" = "onefetch {{version}}"
