{% set version = '1.0.0' %}

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

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

source:
  fn: crosstalk_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/crosstalk_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/crosstalk/crosstalk_{{ version }}.tar.gz
  sha256: b31eada24cac26f24c9763d9a8cbe0adfd87b264cf57f8725027fe0c7742ca51

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

requirements:
  build:
    - r-base
    - r-r6
    - r-ggplot2
    - r-htmltools >=0.3.5
    - r-jsonlite
    - r-lazyeval
    - r-shiny >=0.11
  run:
    - r-base
    - r-r6
    - r-ggplot2
    - r-htmltools >=0.3.5
    - r-jsonlite
    - r-lazyeval
    - r-shiny >=0.11

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

about:
  home: https://rstudio.github.io/crosstalk/
  license: MIT
  summary: |
    Provides building blocks for allowing HTML widgets to communicate with each other,
    with Shiny or without (i.e. static .html files). Currently supports linked brushing
    and filtering.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
