{% set version = '1.3.2' %}

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

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

source:

  git_url: https://github.com/IRkernel/IRkernel
  git_tag: 1.3.2
  patches:
    - 0001-Attempt-to-fix-issues-530-2.patch

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip
  noarch: generic

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: testthat, roxygen2
requirements:
  build:
    - {{ posix }}filesystem        # [win]
    - {{ posix }}git
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-irdisplay >=0.3.0.9999
    - r-crayon
    - r-digest
    - r-evaluate >=0.10
    - r-jsonlite >=0.9.6
    - r-pbdzmq >=0.2_1
    - r-repr >=0.4.99
    - r-uuid

  run:
    - r-base
    - r-irdisplay >=0.3.0.9999
    - r-crayon
    - r-digest
    - r-evaluate >=0.10
    - r-jsonlite >=0.9.6
    - r-pbdzmq >=0.2_1
    - r-repr >=0.4.99
    - r-uuid

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('IRkernel')"           # [not win]
    - "\"%R%\" -e \"library('IRkernel')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://irkernel.github.io
  license: MIT
  summary: The R kernel for the 'Jupyter' environment executes R code which the front-end ('Jupyter
    Notebook' or other front-ends) submits to the kernel via the network.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - ocefpaf
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: IRkernel
# Title: Native R Kernel for the 'Jupyter Notebook'
# Description: The R kernel for the 'Jupyter' environment executes R code which the front-end ('Jupyter Notebook' or other front-ends) submits to the kernel via the network.
# Version: 1.3.2
# Authors@R: c( person('Thomas', 'Kluyver', role = c('aut', 'cph'), email = 'thomas@kluyver.me.uk'), person('Philipp', 'Angerer', role = c('aut', 'cph', 'cre'), email = 'phil.angerer@gmail.com', comment = c(ORCID = "0000-0002-0369-2888")), person('Jan', 'Schulz', role = c('aut', 'cph'), email = 'jasc@gmx.net'), person('Karthik', 'Ram', role = c('aut', 'cph'), email = 'karthik.ram@gmail.com'))
# URL: https://irkernel.github.io
# BugReports: https://github.com/IRkernel/IRkernel/issues/
# Depends: R (>= 3.2.0)
# Suggests: testthat, roxygen2
# SystemRequirements: jupyter, jupyter_kernel_test (Python package for testing)
# License: MIT + file LICENSE
# Encoding: UTF-8
# Imports: repr (>= 0.4.99), methods, evaluate (>= 0.10), IRdisplay (>= 0.3.0.9999), pbdZMQ (>= 0.2-1), crayon, jsonlite (>= 0.9.6), uuid, digest
# Collate: 'class_unions.r' 'logging.r' 'comm_manager.r' 'compat.r' 'completion.r' 'environment_runtime.r' 'environment_shadow.r' 'options.r' 'execution.r' 'handlers.r' 'help.r' 'installspec.r' 'utils.r' 'kernel.r' 'main.r' 'onload.r'
# RoxygenNote: 7.2.3

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
