easyblock = 'PackedBinary'

name = 'Node-RED'
version = '0.16.2'

homepage = 'http://nodered.org'
description = """Node-RED is a programming tool for wiring together hardware devices, APIs and online services
 in new and interesting ways."""

toolchain = {'name': 'foss', 'version': '2017a'}

source_urls = ['https://github.com/node-red/node-red/releases/download/%(version)s/']
sources = ['%(namelower)s-%(version)s.zip']

dependencies = [
    ('nodejs', '6.10.3'),
]

preinstallopts = 'cd %(namelower)s-%(version)s && '
install_cmd = 'npm install --prefix %(installdir)s -g'

sanity_check_paths = {
    'files': ['bin/%(namelower)s'],
    'dirs': ['lib/node_modules/%(namelower)s'],
}
sanity_check_commands = ['%(namelower)s --help']

moduleclass = 'tools'
