even more languages
This commit is contained in:
parent
473c50c421
commit
371831593c
|
@ -1,4 +1,4 @@
|
||||||
FROM ubuntu:rolling
|
FROM ubuntu:focal
|
||||||
|
|
||||||
ARG UID
|
ARG UID
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,29 @@ int main() {
|
||||||
main: "main.clj",
|
main: "main.clj",
|
||||||
run: "clojure -i main.clj -r",
|
run: "clojure -i main.clj -r",
|
||||||
template: `(println "Hello, world!")
|
template: `(println "Hello, world!")
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
coffeescript: {
|
||||||
|
name: "CoffeeScript",
|
||||||
|
monacoLang: "coffee",
|
||||||
|
repl: "coffee",
|
||||||
|
main: "main.coffee",
|
||||||
|
compile: "coffee -b -c main.coffee",
|
||||||
|
run: `node -e '
|
||||||
|
eval.apply(this, [require("fs").readFileSync("main.js", {encoding: "utf-8"})])
|
||||||
|
require("/usr/lib/node_modules/coffeescript/repl").start()
|
||||||
|
'`,
|
||||||
|
template: `console.log "Hello, world!"
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
dart: {
|
||||||
|
name: "Dart",
|
||||||
|
monacoLang: "dart",
|
||||||
|
main: "main.dart",
|
||||||
|
run: "dart main.dart",
|
||||||
|
template: `void main() {
|
||||||
|
print('Hello, world!');
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
elixir: {
|
elixir: {
|
||||||
|
@ -97,6 +120,20 @@ int main() {
|
||||||
main: "main.el",
|
main: "main.el",
|
||||||
run: "emacs --load main.el --eval '(ielm)'",
|
run: "emacs --load main.el --eval '(ielm)'",
|
||||||
template: `(message "Hello, world!")
|
template: `(message "Hello, world!")
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
erlang: {
|
||||||
|
name: "Erlang",
|
||||||
|
monacoLang: "plaintext",
|
||||||
|
repl: "erl",
|
||||||
|
main: "main.erl",
|
||||||
|
compile: "erl -compile main",
|
||||||
|
run: "erl -s main main",
|
||||||
|
template: `-module(main).
|
||||||
|
-export([main/0]).
|
||||||
|
|
||||||
|
main() ->
|
||||||
|
io:fwrite("Hello, world!\n").
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
fish: {
|
fish: {
|
||||||
|
@ -183,6 +220,15 @@ main = putStrLn "Hello, world!"
|
||||||
main: "main.lua",
|
main: "main.lua",
|
||||||
run: "lua -i main.lua",
|
run: "lua -i main.lua",
|
||||||
template: `print("Hello, world!")
|
template: `print("Hello, world!")
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
nim: {
|
||||||
|
name: "Nim",
|
||||||
|
monacoLang: "plaintext",
|
||||||
|
main: "main.nim",
|
||||||
|
compile: "nim compile main.nim",
|
||||||
|
run: "./main",
|
||||||
|
template: `echo "Hello, world!"
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
nodejs: {
|
nodejs: {
|
||||||
|
@ -190,11 +236,22 @@ main = putStrLn "Hello, world!"
|
||||||
monacoLang: "javascript",
|
monacoLang: "javascript",
|
||||||
repl: "node",
|
repl: "node",
|
||||||
main: "main.js",
|
main: "main.js",
|
||||||
suffix: `
|
run: `node -e '
|
||||||
require("repl").start();
|
eval.apply(this, [require("fs").readFileSync("main.js", {encoding: "utf-8"})])
|
||||||
`,
|
require("repl").start()
|
||||||
run: "node main.js",
|
'`,
|
||||||
template: `console.log("Hello, world!")
|
template: `console.log("Hello, world!")
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
php: {
|
||||||
|
name: "PHP",
|
||||||
|
monacoLang: "php",
|
||||||
|
repl: "php -a",
|
||||||
|
main: "main.php",
|
||||||
|
run: "php -d auto_prepend_file=main.php -a",
|
||||||
|
template: `<?php
|
||||||
|
|
||||||
|
echo "Hello, world!\\n";
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
python: {
|
python: {
|
||||||
|
@ -213,6 +270,15 @@ require("repl").start();
|
||||||
main: ".Rprofile",
|
main: ".Rprofile",
|
||||||
run: "R --no-save",
|
run: "R --no-save",
|
||||||
template: `print("Hello, world!")
|
template: `print("Hello, world!")
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
reasonml: {
|
||||||
|
name: "ReasonML",
|
||||||
|
monacoLang: "plaintext",
|
||||||
|
main: "main.re",
|
||||||
|
compile: "bsc main.re > main.js",
|
||||||
|
run: "NODE_PATH=/usr/lib/node_modules node main.js",
|
||||||
|
template: `print_string("Hello, world!\\n")
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
ruby: {
|
ruby: {
|
||||||
|
@ -251,6 +317,15 @@ binding_irb.run(IRB.conf)
|
||||||
template: `(begin
|
template: `(begin
|
||||||
(display "Hello, world!")
|
(display "Hello, world!")
|
||||||
(newline))
|
(newline))
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
sqlite: {
|
||||||
|
name: "SQLite",
|
||||||
|
monacoLang: "sql",
|
||||||
|
repl: "sqlite3",
|
||||||
|
main: "main.sql",
|
||||||
|
run: `sqlite3 -cmd "$(< main.sql)"`,
|
||||||
|
template: `SELECT "Hello, world!"
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
swift: {
|
swift: {
|
||||||
|
@ -260,6 +335,15 @@ binding_irb.run(IRB.conf)
|
||||||
compile: "swiftc main.swift",
|
compile: "swiftc main.swift",
|
||||||
run: "./main",
|
run: "./main",
|
||||||
template: `print("Hello, world!")
|
template: `print("Hello, world!")
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
typescript: {
|
||||||
|
name: "TypeScript",
|
||||||
|
monacoLang: "typescript",
|
||||||
|
repl: "ts-node",
|
||||||
|
main: "main.ts",
|
||||||
|
run: `ts-node -i -e "$(< main.ts)"`,
|
||||||
|
template: `console.log("Hello, world!");
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
vim: {
|
vim: {
|
||||||
|
|
|
@ -12,10 +12,11 @@ uid="$1"
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y apt-transport-https curl gnupg lsb-release
|
apt-get install -y apt-transport-https curl gnupg lsb-release wget
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
||||||
|
curl -sSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
||||||
curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||||
curl -sSL https://keybase.io/crystal/pgp_keys.asc | apt-key add -
|
curl -sSL https://keybase.io/crystal/pgp_keys.asc | apt-key add -
|
||||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
|
||||||
|
@ -26,11 +27,12 @@ dpkg -i packages-microsoft-prod.deb
|
||||||
rm packages-microsoft-prod.deb
|
rm packages-microsoft-prod.deb
|
||||||
|
|
||||||
tee -a /etc/apt/sources.list.d/custom.list >/dev/null <<"EOF"
|
tee -a /etc/apt/sources.list.d/custom.list >/dev/null <<"EOF"
|
||||||
|
deb [arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main
|
||||||
deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
|
deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/
|
||||||
deb https://deb.nodesource.com/node_14.x focal main
|
deb https://deb.nodesource.com/node_14.x focal main
|
||||||
deb https://dist.crystal-lang.org/apt crystal main
|
deb https://dist.crystal-lang.org/apt crystal main
|
||||||
deb https://dl.yarnpkg.com/debian/ stable main
|
deb https://dl.yarnpkg.com/debian/ stable main
|
||||||
deb-src https://deb.nodesource.com/node_14.x
|
deb-src https://deb.nodesource.com/node_14.x focal main
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
packages="
|
packages="
|
||||||
|
@ -40,6 +42,7 @@ bash
|
||||||
git
|
git
|
||||||
make
|
make
|
||||||
nodejs
|
nodejs
|
||||||
|
npm
|
||||||
yarn
|
yarn
|
||||||
|
|
||||||
# Handy utilities
|
# Handy utilities
|
||||||
|
@ -47,6 +50,7 @@ bsdmainutils
|
||||||
curl
|
curl
|
||||||
emacs-nox
|
emacs-nox
|
||||||
git
|
git
|
||||||
|
jq
|
||||||
lsof
|
lsof
|
||||||
make
|
make
|
||||||
man-db
|
man-db
|
||||||
|
@ -71,12 +75,18 @@ clojure
|
||||||
# Crystal
|
# Crystal
|
||||||
crystal
|
crystal
|
||||||
|
|
||||||
|
# Dart
|
||||||
|
dart
|
||||||
|
|
||||||
# Elixir
|
# Elixir
|
||||||
elixir
|
elixir
|
||||||
|
|
||||||
# Emacs Lisp
|
# Emacs Lisp
|
||||||
emacs-nox
|
emacs-nox
|
||||||
|
|
||||||
|
# Erlang
|
||||||
|
erlang
|
||||||
|
|
||||||
# F#
|
# F#
|
||||||
fsharp
|
fsharp
|
||||||
|
|
||||||
|
@ -99,10 +109,16 @@ julia
|
||||||
# Lua
|
# Lua
|
||||||
lua5.3
|
lua5.3
|
||||||
|
|
||||||
|
# Nim
|
||||||
|
nim
|
||||||
|
|
||||||
# Node.js
|
# Node.js
|
||||||
nodejs
|
nodejs
|
||||||
yarn
|
yarn
|
||||||
|
|
||||||
|
# PHP
|
||||||
|
php
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
python3
|
python3
|
||||||
python3-pip
|
python3-pip
|
||||||
|
@ -120,6 +136,9 @@ rustc
|
||||||
# Scheme
|
# Scheme
|
||||||
mit-scheme
|
mit-scheme
|
||||||
|
|
||||||
|
# SQLite
|
||||||
|
sqlite
|
||||||
|
|
||||||
# Swift
|
# Swift
|
||||||
libpython2.7
|
libpython2.7
|
||||||
|
|
||||||
|
@ -136,11 +155,22 @@ apt-get update
|
||||||
apt-get install -y $(grep -v "^#" <<< "$packages")
|
apt-get install -y $(grep -v "^#" <<< "$packages")
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# CoffeeScript
|
||||||
|
npm install -g coffeescript
|
||||||
|
|
||||||
|
# TypeScript
|
||||||
|
npm install -g ts-node typescript
|
||||||
|
|
||||||
|
# ReasonML
|
||||||
|
npm install -g bs-platform
|
||||||
|
|
||||||
|
# Needed for project infrastructure
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -nv https://github.com/watchexec/watchexec/releases/download/1.13.1/watchexec-1.13.1-x86_64-unknown-linux-gnu.deb
|
wget -nv https://github.com/watchexec/watchexec/releases/download/1.13.1/watchexec-1.13.1-x86_64-unknown-linux-gnu.deb
|
||||||
dpkg -i watchexec-*.deb
|
dpkg -i watchexec-*.deb
|
||||||
rm watchexec-*.deb
|
rm watchexec-*.deb
|
||||||
|
|
||||||
|
# Kotlin
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -nv https://github.com/JetBrains/kotlin/releases/download/v1.3.72/kotlin-compiler-1.3.72.zip
|
wget -nv https://github.com/JetBrains/kotlin/releases/download/v1.3.72/kotlin-compiler-1.3.72.zip
|
||||||
unzip kotlin-*.zip
|
unzip kotlin-*.zip
|
||||||
|
@ -148,6 +178,7 @@ cp kotlinc/bin/* /usr/bin/
|
||||||
cp kotlinc/lib/* /usr/lib/
|
cp kotlinc/lib/* /usr/lib/
|
||||||
rm -rf kotlin-*.zip kotlinc
|
rm -rf kotlin-*.zip kotlinc
|
||||||
|
|
||||||
|
# Swift
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget -nv https://swift.org/builds/swift-5.2.4-release/ubuntu2004/swift-5.2.4-RELEASE/swift-5.2.4-RELEASE-ubuntu20.04.tar.gz
|
wget -nv https://swift.org/builds/swift-5.2.4-release/ubuntu2004/swift-5.2.4-RELEASE/swift-5.2.4-RELEASE-ubuntu20.04.tar.gz
|
||||||
mkdir /opt/swift
|
mkdir /opt/swift
|
||||||
|
|
Loading…
Reference in New Issue