{% set version = '0.2.0' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-reprex
  version: {{ version|replace("-", "_") }}

source:
  fn: reprex_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/reprex_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/reprex/reprex_{{ version }}.tar.gz
  sha256: 69a3fa8ceabb2fa001d91e03a8a28391d2a1af2c2f9b3de694e08d1f65bf84d0

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
  host:
    - r-base
    - r-callr >=2.0.0
    - r-clipr >=0.4.0
    - r-rlang
    - r-rmarkdown
    - r-whisker
    - r-withr
  run:
    - r-base
    - r-callr >=2.0.0
    - r-clipr >=0.4.0
    - r-rlang
    - r-rmarkdown
    - r-whisker
    - r-withr

test:
  commands:
    - $R -e "library('reprex')"           # [not win]
    - "\"%R%\" -e \"library('reprex')\""  # [win]

about:
  home: https://reprex.tidyverse.org, https://github.com/tidyverse/reprex#readme
  license: MIT
  summary: 'Convenience wrapper that uses the ''rmarkdown'' package to render small snippets
    of code to target formats that include both code and output. The goal is to encourage
    the sharing of small, reproducible, and runnable examples on code-oriented websites,
    such as <https://stackoverflow.com> and <https://github.com>, or in email. The user''s
    clipboard is the default source of input code and the default target for rendered
    output. ''reprex'' also extracts clean, runnable R code from various common formats,
    such as copy/paste from an R session. '
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
