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

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

source:
  fn: shinyWidgets_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/shinyWidgets_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/shinyWidgets/shinyWidgets_{{ version }}.tar.gz
  sha256: bd511012e08ba4d42873bd11912128b3805dcc176c757bc25f27f184b7f11e1c

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-htmltools
    - r-jsonlite
    - r-shiny >=0.14
  run:
    - r-base
    - r-htmltools
    - r-jsonlite
    - r-shiny >=0.14

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

about:
  home: https://github.com/dreamRs/shinyWidgets
  license: GPL-3
  summary: Some custom inputs widgets to use in Shiny applications, like a toggle switch to replace
    checkboxes. And other components to pimp your apps.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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