BREAKING: replace custom build scripts with nix

General:
- Switched to yarn to better work with nix-based tooling
- Switched package system to use nix. This stops double dependencies and slow cloud compile times, while providing more compile/runtime support to the Nix project
- Removed container builder in favor of internal container tooling
- Package versions no-longer need to be SemVer compliant
- Removed "piston package spec" files, replaced with nix-flake based runtimes
- Exported nosocket and piston-api as packages within the nix-flake
- Removed repo container
- Switched docker building to nix-based container outputting
- Removed docker compose as this is a single container
- Removed package commands from CLI

Packages:
- Move bash, clojure, cobol, node, python2, python3 to new format
- Remainder of packages still need to be moved

v2 API:
- Removed "version" specifier. To select specific versions, use the v3 api
- Removed "/package" endpoints as this doesn't work with the new nix-based system

v3 API:
- Duplicate of v2 API, except instead of passing in a language name an ID is used intead.
This commit is contained in:
Thomas Hobson 2022-01-30 18:41:24 +13:00
parent e06b59d82c
commit 564da5a7eb
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
110 changed files with 2293 additions and 2793 deletions

View file

@ -1,23 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz" -o python.tar.gz
tar xzf python.tar.gz --strip-components=1
rm python.tar.gz
./configure --prefix "$PREFIX" --with-ensurepip=install
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build
bin/pip2 install -U pip==20.3.*
# Upgrade pip to latest supported version
bin/pip2 install numpy scipy pycrypto whoosh bcrypt passlib

View file

@ -1 +0,0 @@
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "python2",
"version": "2.7.18",
"aliases": ["py2", "python2"]
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
python2.7 "$@"

View file

@ -1 +0,0 @@
print "OK"

View file

@ -1,22 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "https://www.python.org/ftp/python/3.10.0/Python-3.10.0a7.tgz" -o python.tar.gz
tar xzf python.tar.gz --strip-components=1
rm python.tar.gz
./configure --prefix "$PREFIX" --with-ensurepip=install
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build
# This is alpha version, hence most of the libraries are not compatible with python3.10.0
# bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib

View file

@ -1 +0,0 @@
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "python",
"version": "3.10.0-alpha.7",
"aliases": ["py", "py3", "python3"]
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
python3.10 "$@"

View file

@ -1,7 +0,0 @@
working = True
match working:
case True:
print("OK")
case False:
print()

View file

@ -1,21 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "https://www.python.org/ftp/python/3.5.10/Python-3.5.10.tgz" -o python.tar.gz
tar xzf python.tar.gz --strip-components=1
rm python.tar.gz
./configure --prefix "$PREFIX" --with-ensurepip=install
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build
bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib

View file

@ -1 +0,0 @@
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "python",
"version": "3.5.10",
"aliases": ["py", "py3", "python3"]
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
python3.5 "$@"

View file

@ -1 +0,0 @@
print("OK")

View file

@ -1,21 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz" -o python.tar.gz
tar xzf python.tar.gz --strip-components=1
rm python.tar.gz
./configure --prefix "$PREFIX" --with-ensurepip=install
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build
bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib

View file

@ -1 +0,0 @@
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "python",
"version": "3.9.1",
"aliases": ["py", "py3", "python3"]
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
python3.9 "$@"

View file

@ -1 +0,0 @@
print("OK")

View file

@ -1,21 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tgz" -o python.tar.gz
tar xzf python.tar.gz --strip-components=1
rm python.tar.gz
./configure --prefix "$PREFIX" --with-ensurepip=install
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build
bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib sympy

View file

@ -1 +0,0 @@
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "python",
"version": "3.9.4",
"aliases": ["py", "py3", "python3"]
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
python3.9 "$@"

View file

@ -1,18 +0,0 @@
execute = (execute_with := lambda *a, **k: lambda f: f(*a, **k))()
@int
@execute
class n: __int__ = lambda _: 69
@execute
class cout: __lshift__ = print
@execute_with(n)
def output(n):
return "OK"
cout << output