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

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

source:
  fn: iterators_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/iterators_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/iterators/iterators_{{ version }}.tar.gz
  sha256: cef3075a0930e1408c764e4da56bbadd4f7d14315809df8f38dd51f80ccc677b

build:
  noarch: generic
  merge_build_host: true  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

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

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

about:
  home: https://CRAN.R-project.org/package=iterators
  license: Apache-2.0
  license_file: LICENSE
  summary: Support for iterators, which allow a programmer to traverse through all the elements of a vector, list, or other collection of data.
  license_family: APACHE

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