<commit_before>{% set version = '0.9.1' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/nimble_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/nimble/nimble_{{ version }}.tar.gz
  sha256: ad5e8a171193cb0172e68bf61c4f94432c45c131a150101ad1c5c7318c335757

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-r6
    - r-coda
    - r-igraph
    - libopenblas
    - liblapack
    - libblas
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-r6
    - r-coda
    - r-igraph
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}make

test:
  commands:
    - $R -e "library('nimble'); code <- nimbleCode({ x ~ dnorm(0, 1) }); Rmodel <- nimbleModel(code); try(Cmodel <- compileNimble(Rmodel)); try(Cmodel <- compileNimble(Rmodel, showCompilerOutput = TRUE)); printErrors(); stopifnot(exists('Cmodel'))"           # [not win]
    - "\"%R%\" -e \"library('nimble'); code <- nimbleCode({ x ~ dnorm(0, 1) }); Rmodel <- nimbleModel(code); try(Cmodel <- compileNimble(Rmodel, dirName = '.')); try(Cmodel <- compileNimble(Rmodel, dirName = '.', showCompilerOutput = TRUE)); printErrors(); stopifnot(exists('Cmodel'))\""  # [win]

about:
  home: https://r-nimble.org, https://github.com/nimble-dev/nimble
  license: (BSD-3-Clause OR GPL-2.0-or-later) AND MPL-2.0
  summary: 'A system for writing hierarchical statistical models largely compatible with ''BUGS''
    and ''JAGS'', writing nimbleFunctions to operate models and do basic R-style math,
    and compiling both models and nimbleFunctions via custom- generated C++. ''NIMBLE''
    includes default methods for MCMC, particle filtering, Monte Carlo Expectation Maximization,
    and some other tools. The nimbleFunction system makes it easy to do things like
    implement new MCMC samplers from R, customize the assignment of samplers to different<commit_msg>look in temp dir after failed compile on Windows<commit_after>{% set version = '0.9.1' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/nimble_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/nimble/nimble_{{ version }}.tar.gz
  sha256: ad5e8a171193cb0172e68bf61c4f94432c45c131a150101ad1c5c7318c335757

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-r6
    - r-coda
    - r-igraph
    - libopenblas
    - liblapack
    - libblas
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-r6
    - r-coda
    - r-igraph
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}make

test:
  commands:
    - $R -e "library('nimble'); code <- nimbleCode({ x ~ dnorm(0, 1) }); Rmodel <- nimbleModel(code); try(Cmodel <- compileNimble(Rmodel)); try(Cmodel <- compileNimble(Rmodel, showCompilerOutput = TRUE)); printErrors(); stopifnot(exists('Cmodel'))"           # [not win]
    - "\"%R%\" -e \"library('nimble'); code <- nimbleCode({ x ~ dnorm(0, 1) }); Rmodel <- nimbleModel(code); try(Cmodel <- compileNimble(Rmodel); printErrors(); print(tempdir()); print(list.files(tempdir())); stopifnot(exists('Cmodel'))\""  # [win]

about:
  home: https://r-nimble.org, https://github.com/nimble-dev/nimble
  license: (BSD-3-Clause OR GPL-2.0-or-later) AND MPL-2.0
  summary: 'A system for writing hierarchical statistical models largely compatible with ''BUGS''
    and ''JAGS'', writing nimbleFunctions to operate models and do basic R-style math,
    and compiling both models and nimbleFunctions via custom- generated C++. ''NIMBLE''
    includes default methods for MCMC, particle filtering, Monte Carlo Expectation Maximization,
    and some other tools. The nimbleFunction system makes it easy to do things like
    implement new MCMC samplers from R, customize the assignment of samplers to different
{'fraction_non_alphanumeric': 0.16706487777981988, 'fraction_numerical': 0.027936041168902775, 'mean_word_length': 2.508704061895551, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '487107', 'n_tokens_mistral': 2028, 'n_tokens_neox': 1908, 'n_words': 465}