{% set version = "0.4.9" %}

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

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

source:
  fn: packrat_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/packrat_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/packrat/packrat_{{ version }}.tar.gz

  sha256: fd5c0135d195ef61271b8fb3d4a6792dce0bc54823e14777790d030e602a17d0

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/rstudio/packrat/
  license: GPL 2.0
  summary: Manage the R packages your project depends on in an isolated, portable, and reproducible
    way.
  license_family: GPL

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
