{% set version = "8.11.4" %}

package:
  name: nodejs
  version: {{ version }}

source:
  fn: node-v{{ version }}.tar.gz
  url: https://nodejs.org/dist/v{{ version }}/node-v{{ version }}.tar.gz
  sha256: 459144e361d64ca7362c37cc9717c044ef909d348cb5aa3f2b62538560a6085a
  patches:
    - 0001-macOS-use-MACOSX_DEPLOYMENT_TARGET-10.9.patch

build:
  number: 0
  ignore_prefix_files:
    - bin/node
  missing_dso_whitelist:          # [linux]
    # Required by node_modules/term-size/vendor/macos/term-size
    - /usr/lib/libSystem.B.dylib  # [linux]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    # node's build scripts find and use MSVC 2015, regardless of conda's setting.
    - vs2015_runtime  # [win]
    - python          2.7.*
    - make            # [unix]
  run:
    - vs2015_runtime   # [win]

test:
  commands:
    - node -h
    - node -v
    - npm version
    - npm install -h
    - npm config get prefix -g
    - test $(echo "console.log(1 + 3)" | node) == 4  # [not win]

about:
  home: https://nodejs.org/
  license: MIT
  license_file: LICENSE
  summary: a platform for easily building fast, scalable network applications

extra:
  recipe-maintainers:
    - minrk
    - msarahan
    - pelson
