{% set version = '0.2.2' %}

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

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

source:
  fn: purrr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/purrr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/purrr/purrr_{{ version }}.tar.gz
  sha256: 83756d90075b12d93a5a71aa6e9fc7a5e06eb7a92f2b4e4ad067db310e465a53

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

requirements:
  build:
    - r-base
    - r-bh
    - r-rcpp
    - r-dplyr
    - r-lazyeval >=0.2.0
    - r-magrittr >=1.5
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]
  run:
    - r-base
    - r-bh
    - r-rcpp
    - r-dplyr
    - r-lazyeval >=0.2.0
    - r-magrittr >=1.5
    - libgcc  # [not win]

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

about:
  home: https://github.com/hadley/purrr
  license: GPL-3
  summary: Make your pure functions purr with the 'purrr' package. This package completes R's
    functional programming tools with missing features present in other programming
    languages.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
