{% set version = "0.2.1" %}
{% set posix = 'm2-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/assertthat_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/assertthat/assertthat_{{ version }}.tar.gz
  sha256: 85cf7fcc4753a8c86da9a6f454e46c2a58ffc70c4f47cac4d3e3bcefda2a9e9f

build:
  noarch: generic
  number: 5
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=assertthat
  license: GPL-3.0-only
  summary: assertthat is an extension to stopifnot() that makes it easy to declare the pre and
    post conditions that you code should satisfy, while also producing friendly error
    messages so that your users know what they've done wrong.
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
