{% set version = '0.6.0' %}

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

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

source:
  fn: listenv_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/listenv_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/listenv/listenv_{{ version }}.tar.gz
  sha256: a737f08123b8bd67b63bb9843d0b6316408516d831203df8c369f3e32a48d84f

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/HenrikBengtsson/listenv
  license: LGPL (>= 2.1)
  summary: List environments are environments that have list-like properties.  For instance,
    the elements of a list environment are ordered and can be accessed and iterated
    over using index subsetting, e.g. 'x <- listenv(a=1, b=2); for (i in seq_along(x))
    x[[i]] <- x[[i]]^2; y <- as.list(x)'.
  license_family: LGPL

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