Skip to content

Instantly share code, notes, and snippets.

@anxiousmodernman
Last active May 12, 2019 15:57
Show Gist options
  • Save anxiousmodernman/712166713d041ae62cd926c3dc783f28 to your computer and use it in GitHub Desktop.
Save anxiousmodernman/712166713d041ae62cd926c3dc783f28 to your computer and use it in GitHub Desktop.
deno build for Centos 7
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
# Make sure you have the specs for this!
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 4
end
config.vm.provision "shell", inline: <<-SHELL
yum update
yum install -y git glibc-static curl vim gcc clang wget
wget https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.xz
tar --strip-components 1 -xvf node-v* -C /usr/local
SHELL
$script = <<-SHELL
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain \"nightly\"
git clone --recurse-submodules https://github.com/denoland/deno.git
cd deno
sed -i '/default_args/a use_sysroot = false' .gn
SHELL
config.vm.provision "shell", inline: $script, privileged: false
# To build:
# vagrant up
# vagrant ssh
# cd deno
# ./tools/setup.py
# ./tools/build.py
#
# Sometimes I have to run the build twice :(
#
# After a successful build, get the binary out from the host machine:
# scp -i .vagrant/machines/default/virtualbox/private_key -P 2222 vagrant@127.0.0.1:/home/vagrant/deno/target/debug/deno .
end
@anxiousmodernman
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment