{% set version = "1.1.0" %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}
{% set cran_mirror = 'https://cran.r-project.org' %}

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

source:
  fn: sessioninfo_1.0.0.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/sessioninfo_1.0.0.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sessioninfo/sessioninfo_1.0.0.tar.gz
  sha256: b30d2426da82951bd9a88b921a03180ba753862dd6814327fb52b230f7a2e301

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

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

requirements:
  build:

  host:
    - r-base
    - r-clisymbols
    - r-withr

  run:
    - r-base
    - r-clisymbols
    - r-withr

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

about:
  home: https://github.com/r-lib/sessioninfo#readme
  license: GPL-2
  summary: Query and print information about the current R session. It is similar to 'utils::sessionInfo()',
    but includes more information about packages, and where they were installed from.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - roryk
