| NODE_RELEASE_BASE_URL = "https://nodejs.org/dist/" |
| "node-v8.1.2-linux-x64.tar.gz":"61a609c83e2d3458cc2301a63b212a97e6b9f809", |
| "node-v8.1.2-darwin-x64.tar.gz":"a8b31fd645480661a8a777d9b4466dca0e6deb33" |
| os = platform.system().lower() |
| file_name = "node-%s-%s-x64" % (version, get_system_arch()) |
| file_fullname = "node-%s-%s-x64.tar.gz" % (version, get_system_arch()) |
| if file_fullname not in NODE_SHA1S: |
| raise Exception("Cannot download %s, architecture or version not supported" % file_name) |
| name = 'node-release-' + version, |
| url = NODE_RELEASE_BASE_URL + version + '/' + file_fullname, |
| sha1 = NODE_SHA1S[file_fullname], |
| name = 'node-bin-' + version, |
| bash = 'tar -xf $(location :node-release-' + version + ') && ' + |
| 'mv ' + file_name + ' $OUT && ' + |
| visibility = [ "PUBLIC" ], |