Compare commits

..

No commits in common. "04de31b946ccaa15b22eb77e3915d6fb400b1229" and "286fb5741551c54705a3170ba40a7411107c18e3" have entirely different histories.

235 changed files with 1257 additions and 1499 deletions

View file

@ -4,7 +4,6 @@ on:
branches:
- master
- v3
- '!nix-packages'
paths:
- api/**

View file

@ -2,8 +2,6 @@ name: 'Package Pull Requests'
on:
pull_request:
branches:
- '!nix-packages'
types:
- opened
- reopened

View file

@ -5,7 +5,6 @@ on:
branches:
- master
- v3
- '!nix-packages'
paths:
- packages/**

View file

@ -40,7 +40,6 @@ with pkgs; rec {
gnutar
gzip
gnugrep
rename
util-linux
];

View file

@ -237,7 +237,7 @@ class Job {
if (this.runtime.compiled) {
compile = await this.safe_call(
this.runtime.compile,
code_files.map(x => x.name),
this.files.map(x => x.name),
this.timeouts.compile,
this.memory_limits.compile
);

24
packages/emacs/27.1.0/build.sh vendored Executable file
View file

@ -0,0 +1,24 @@
#!/bin/bash
export PATH=$PWD/bin:$PATH
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# Emacs version 27.1 supports Docker builds
# Otherwise, older versions will work too, but you will have to disable `/proc/sys/kernel/randomize_va_space` which is less secure
curl -L "http://ftpmirror.gnu.org/emacs/emacs-27.1.tar.gz" -o emacs.tar.gz
tar xzf emacs.tar.gz --strip-components=1
rm emacs.tar.gz
# Building without all that X11 stuff
./configure --prefix="$PREFIX" --with-x=no --with-x-toolkit=no --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no --with-gnutls=no
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build

4
packages/emacs/27.1.0/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH

5
packages/emacs/27.1.0/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "emacs",
"version": "27.1.0",
"aliases": ["emacs", "el", "elisp"]
}

4
packages/emacs/27.1.0/run vendored Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash
# Put instructions to run the runtime
emacs -Q --script "$@"

1
packages/emacs/27.1.0/test.el vendored Normal file
View file

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

5
packages/freebasic/1.8.0/build.sh vendored Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
curl -L "https://sourceforge.net/projects/fbc/files/FreeBASIC-1.08.0/Binaries-Linux/FreeBASIC-1.08.0-linux-x86_64.tar.gz/download" -o freebasic.tar.gz
tar xf freebasic.tar.gz --strip-components=1
rm freebasic.tar.gz

4
packages/freebasic/1.8.0/compile vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Compile bas files
fbc -lang qb -b "$@" -x out

4
packages/freebasic/1.8.0/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Path to fbc compiler
export PATH=$PWD/bin:$PATH

View file

@ -0,0 +1,5 @@
{
"language": "freebasic",
"version": "1.8.0",
"aliases": ["bas", "fbc", "basic", "qbasic", "quickbasic"]
}

5
packages/freebasic/1.8.0/run vendored Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Run output file from compile with arguments
shift
./out "$@"

1
packages/freebasic/1.8.0/test.bas vendored Normal file
View file

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

26
packages/gcc/10.2.0/build.sh vendored Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Put instructions to build your package in here
[[ -d "bin" ]] && exit 0
PREFIX=$(realpath $(dirname $0))
mkdir -p build obj
cd build
curl "https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.gz" -o gcc.tar.gz
tar xzf gcc.tar.gz --strip-components=1
./contrib/download_prerequisites
cd ../obj
# === autoconf based ===
../build/configure --prefix "$PREFIX" --enable-languages=c,c++,d,fortran --disable-multilib --disable-bootstrap
make -j$(nproc)
make install -j$(nproc)
cd ../
rm -rf build obj

29
packages/gcc/10.2.0/compile vendored Normal file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Put instructions to compile source code, remove this file if the language does not require this stage
case "${PISTON_LANGUAGE}" in
c)
rename 's/$/\.c/' "$@" # Add .c extension
gcc -std=c11 *.c -lm
;;
c++)
rename 's/$/\.cpp/' "$@" # Add .cpp extension
g++ -std=c++17 *.cpp
;;
d)
rename 's/.code$/\.d/' "$@" # Add .d extension
gdc *.d
;;
fortran)
rename 's/.code$/\.f90/' "$@" # Add .f90 extension
gfortran *.f90
;;
*)
echo "How did you get here? (${PISTON_LANGUAGE})"
exit 1
;;
esac
chmod +x a.out

5
packages/gcc/10.2.0/environment vendored Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH="$PWD/lib:$PWD/lib64" # Need this to properly link Fortran

22
packages/gcc/10.2.0/metadata.json vendored Normal file
View file

@ -0,0 +1,22 @@
{
"language": "gcc",
"version": "10.2.0",
"provides": [
{
"language": "c",
"aliases": ["gcc"]
},
{
"language": "c++",
"aliases": ["cpp", "g++"]
},
{
"language": "d",
"aliases": ["gdc"]
},
{
"language": "fortran",
"aliases": ["fortran", "f90"]
}
]
}

6
packages/gcc/10.2.0/run vendored Normal file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
shift # Discard main filename
./a.out "$@"

6
packages/gcc/10.2.0/test.c vendored Normal file
View file

@ -0,0 +1,6 @@
#include <stdio.h>
int main(void) {
printf("OK");
return 0;
}

6
packages/gcc/10.2.0/test.cpp vendored Normal file
View file

@ -0,0 +1,6 @@
#include <iostream>
int main(void) {
printf("OK");
return 0;
}

5
packages/gcc/10.2.0/test.d vendored Normal file
View file

@ -0,0 +1,5 @@
import std.stdio;
void main() {
writeln("OK");
}

3
packages/gcc/10.2.0/test.f90 vendored Normal file
View file

@ -0,0 +1,3 @@
program test
print "(a)", 'OK'
end program test

5
packages/go/1.16.2/build.sh vendored Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
curl -LO https://golang.org/dl/go1.16.2.linux-amd64.tar.gz
tar -xzf go1.16.2.linux-amd64.tar.gz
rm go1.16.2.linux-amd64.tar.gz

2
packages/go/1.16.2/environment vendored Normal file
View file

@ -0,0 +1,2 @@
export PATH=$PWD/go/bin:$PATH
export GOPATH=$PWD/gopath

5
packages/go/1.16.2/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "go",
"version": "1.16.2",
"aliases": ["go", "golang"]
}

7
packages/go/1.16.2/run vendored Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
mv $1 $1.go
#filename=$1.go
filename=*.go
shift
GOCACHE=$PWD go run $filename "$@"

7
packages/go/1.16.2/test.go vendored Normal file
View file

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Println("OK")
}

14
packages/groovy/3.0.7/build.sh vendored Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# Groovy depends on JDK8+
mkdir -p java
cd java
curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz" -o java.tar.gz
tar xzf java.tar.gz --strip-components=1
rm java.tar.gz
cd ..
# Download Groovy binaries
curl -L "https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-3.0.7.zip" -o groovy.zip
unzip -q groovy.zip
rm groovy.zip

17
packages/groovy/3.0.7/compile vendored Normal file
View file

@ -0,0 +1,17 @@
#!/bin/bash
# Compile groovy scripts into a separate "classes" directory
# NOTE: - Main file MUST be a groovy script
# - not supporting object class entry points as of now
groovyc -d classes "$@"
# Create the Manifest and include groovy jars:
# NOTE: - main class will be the first file ('.' becomes '_' and without the extension)
# - groovy lib jars MUST be in the class path in order to work properly
echo "Main-Class: $(sed 's/\./\_/g'<<<${1%.*})
Class-Path: $(echo $GROOVY_HOME/lib/*.jar | sed 's/\s/\n /g')
" > manifest.txt
# Create the jar from the manifest and classes
jar cfm out.jar manifest.txt -C classes .

10
packages/groovy/3.0.7/environment vendored Normal file
View file

@ -0,0 +1,10 @@
#!/bin/bash
# Groovy requires JAVA_HOME to be set
export JAVA_HOME=$PWD/java
# GROOVY_HOME needed to get the groovy libs
export GROOVY_HOME=$PWD/groovy-3.0.7
# Add java and groovy binaries to the path
export PATH=$PWD/java/bin:$PWD/groovy-3.0.7/bin:$PATH

5
packages/groovy/3.0.7/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "groovy",
"version": "3.0.7",
"aliases": ["groovy", "gvy"]
}

5
packages/groovy/3.0.7/run vendored Normal file
View file

@ -0,0 +1,5 @@
#!/bin/bash
# Run the jar created during compile
shift
java -jar out.jar "$@"

1
packages/groovy/3.0.7/test.groovy vendored Normal file
View file

@ -0,0 +1 @@
println 'OK'

19
packages/haskell/9.0.1/build.sh vendored Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# Platform specific because a true source compile would require GHC to be installed already on the latest
curl -L "https://downloads.haskell.org/~ghc/9.0.1/ghc-9.0.1-x86_64-deb10-linux.tar.xz" -o ghc.tar.xz
tar xf ghc.tar.xz --strip-components=1
rm ghc.tar.xz
./configure --prefix="$PREFIX"
make install -j$(nproc)
cd ../
rm -rf build

6
packages/haskell/9.0.1/compile vendored Normal file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Compile haskell file(s)
rename 's/$/\.hs/' "$@" # Add .hs extension
ghc -dynamic -v0 -o out *.hs
chmod +x out

1
packages/haskell/9.0.1/environment vendored Normal file
View file

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

5
packages/haskell/9.0.1/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "haskell",
"version": "9.0.1",
"aliases": ["haskell", "hs"]
}

4
packages/haskell/9.0.1/run vendored Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash
shift # Filename is only used to compile
./out "$@"

1
packages/haskell/9.0.1/test.hs vendored Normal file
View file

@ -0,0 +1 @@
main = putStrLn "OK"

17
packages/iverilog/11.0.0/build.sh vendored Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build/iverilog
cd build/iverilog
curl -L https://github.com/steveicarus/iverilog/archive/refs/tags/v11_0.tar.gz -o iverilog.tar.gz
tar xzf iverilog.tar.gz --strip-components=1
chmod +x ./autoconf.sh
./autoconf.sh
./configure --prefix="$PREFIX"
make -j$(nproc)
make install -j$(nproc)
cd ../../
rm -rf build

4
packages/iverilog/11.0.0/compile vendored Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash
rename 's/$/\.v/' "$@" # Add .v extension
iverilog *.v

2
packages/iverilog/11.0.0/environment vendored Normal file
View file

@ -0,0 +1,2 @@
#!/bin/bash
export PATH=$PWD/bin:$PATH

View file

@ -0,0 +1,5 @@
{
"language": "iverilog",
"version": "11.0.0",
"aliases": ["verilog", "vvp"]
}

4
packages/iverilog/11.0.0/run vendored Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash
shift
vvp a.out "$@"

7
packages/iverilog/11.0.0/test.verilog vendored Normal file
View file

@ -0,0 +1,7 @@
module hello;
initial
begin
$display("OK");
$finish ;
end
endmodule

9
packages/java/15.0.2/build.sh vendored Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Put instructions to build your package in here
curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz" -o java.tar.gz
tar xzf java.tar.gz --strip-components=1
rm java.tar.gz

4
packages/java/15.0.2/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH

5
packages/java/15.0.2/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "java",
"version": "15.0.2",
"aliases": []
}

7
packages/java/15.0.2/run vendored Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
mv $1 $1.java
filename=$1.java
shift
java $filename "$@"

5
packages/java/15.0.2/test.java vendored Normal file
View file

@ -0,0 +1,5 @@
public class HelloWorld {
public static void main(String[] args) {
System.out.println("OK");
}
}

12
packages/jelly/0.1.31/build.sh vendored Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
source ../../python/3.9.1/build.sh
mkdir -p build
git clone -q https://github.com/DennisMitchell/jellylanguage.git build/jelly
cd build/jelly
../../bin/python3.9 setup.py install --optimize=1
cd ../../
rm -rf build

1
packages/jelly/0.1.31/environment vendored Normal file
View file

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

5
packages/jelly/0.1.31/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "jelly",
"version": "0.1.31",
"aliases": []
}

1
packages/jelly/0.1.31/run vendored Normal file
View file

@ -0,0 +1 @@
jelly fu "$@"

1
packages/jelly/0.1.31/test.jelly vendored Normal file
View file

@ -0,0 +1 @@
“OK”

21
packages/julia/1.5.4/build.sh vendored Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Install location
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# Download and extract Julia source
curl -L "https://github.com/JuliaLang/julia/releases/download/v1.5.4/julia-1.5.4.tar.gz" -o julia.tar.gz
tar xzf julia.tar.gz --strip-components=1
# Build
echo "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)
prefix=$PREFIX" > Make.user
make -j$(nproc)
make install -j$(nproc)
# Cleanup
cd ..
rm -rf build

4
packages/julia/1.5.4/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Add Julia binary to path
export PATH=$PWD/bin:$PATH

5
packages/julia/1.5.4/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "julia",
"version": "1.5.4",
"aliases": ["jl"]
}

4
packages/julia/1.5.4/run vendored Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Run without startup or history file
julia --startup-file=no --history-file=no "$@"

1
packages/julia/1.5.4/test.jl vendored Normal file
View file

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

21
packages/julia/1.6.1/build.sh vendored Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Install location
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# Download and extract Julia source
curl -L "https://github.com/JuliaLang/julia/releases/download/v1.6.1/julia-1.6.1.tar.gz" -o julia.tar.gz
tar xzf julia.tar.gz --strip-components=1
# Build
echo "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)
prefix=$PREFIX" > Make.user
make -j$(nproc)
make install -j$(nproc)
# Cleanup
cd ..
rm -rf build

4
packages/julia/1.6.1/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Add Julia binary to path
export PATH=$PWD/bin:$PATH

5
packages/julia/1.6.1/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "julia",
"version": "1.6.1",
"aliases": ["jl"]
}

4
packages/julia/1.6.1/run vendored Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Run without startup or history file
julia --startup-file=no --history-file=no "$@"

1
packages/julia/1.6.1/test.jl vendored Normal file
View file

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

13
packages/kotlin/1.4.31/build.sh vendored Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Download and extract JDK8
curl -L "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz" -o jdk.tar.gz
tar xzf jdk.tar.gz --strip-components=1
rm jdk.tar.gz
# Download and extract Kotlin
curl -L "https://github.com/JetBrains/kotlin/releases/download/v1.4.31/kotlin-compiler-1.4.31.zip" -o kotlin.zip
unzip kotlin.zip
rm kotlin.zip
cp -r kotlinc/* .
rm -rf kotlinc

6
packages/kotlin/1.4.31/compile vendored Normal file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
rename 's/$/\.kt/' "$@" # Add .kt extension
# Compile Kotlin code to a jar file
kotlinc *.kt -include-runtime -d code.jar

4
packages/kotlin/1.4.31/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Add java and kotlinc to path
export PATH=$PWD/bin:$PATH

5
packages/kotlin/1.4.31/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "kotlin",
"version": "1.4.31",
"aliases": ["kt"]
}

5
packages/kotlin/1.4.31/run vendored Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Run jar file
shift
java -jar code.jar "$@"

3
packages/kotlin/1.4.31/test.kt vendored Normal file
View file

@ -0,0 +1,3 @@
fun main() {
println("OK")
}

19
packages/lisp/2.1.2/build.sh vendored Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Put instructions to build your package in here
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# Prebuilt binary install since source compile requires lisp to be installed already
curl -L "http://prdownloads.sourceforge.net/sbcl/sbcl-2.1.2-x86-64-linux-binary.tar.bz2" -o sbcl.tar.bz2
tar xf sbcl.tar.bz2 --strip-components=1
rm sbcl.tar.bz2
INSTALL_ROOT=$PREFIX sh install.sh
cd ../
rm -rf build

4
packages/lisp/2.1.2/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH

5
packages/lisp/2.1.2/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "lisp",
"version": "2.1.2",
"aliases": ["lisp", "cl", "sbcl", "commonlisp"]
}

4
packages/lisp/2.1.2/run vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
sbcl --script "$@"

1
packages/lisp/2.1.2/test.cl vendored Normal file
View file

@ -0,0 +1 @@
(write-line "OK")

18
packages/lolcode/0.11.2/build.sh vendored Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# lolcode release
curl -L "https://github.com/justinmeza/lci/archive/refs/tags/v0.11.2.tar.gz" -o lolcode.tar.gz
tar xzf lolcode.tar.gz --strip-components=1
# Building and installing lolcode
cmake -DCMAKE_INSTALL_PREFIX:STRING="$PREFIX" .
make -j$(nproc)
make install -j$(nproc)
# Cleaning up
cd ../ && rm -rf build

4
packages/lolcode/0.11.2/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH

5
packages/lolcode/0.11.2/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "lolcode",
"version": "0.11.2",
"aliases": ["lol", "lci"]
}

4
packages/lolcode/0.11.2/run vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
lci "$@"

4
packages/lolcode/0.11.2/test.lol vendored Normal file
View file

@ -0,0 +1,4 @@
HAI 1.2
CAN HAS STDIO?
VISIBLE "OK"
KTHXBYE

14
packages/lua/5.4.2/build.sh vendored Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Put instructions to build your package in here
curl -R -O -L http://www.lua.org/ftp/lua-5.4.2.tar.gz
tar zxf lua-5.4.2.tar.gz
rm lua-5.4.2.tar.gz
cd lua-5.4.2
# Building Lua
make linux
# To check that Lua has been built correctly
make test
# Installing Lua
make linux install

4
packages/lua/5.4.2/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH="$PWD/lua-5.4.2/src:$PATH"

5
packages/lua/5.4.2/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "lua",
"version": "5.4.2",
"aliases": ["lua"]
}

4
packages/lua/5.4.2/run vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
lua "$@"

1
packages/lua/5.4.2/test.lua vendored Normal file
View file

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

21
packages/nasm/2.15.5/build.sh vendored Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Put instructions to build your package in here
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl -L "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.gz" -o nasm.tar.gz
tar xzf nasm.tar.gz --strip-components=1
# === autoconf based ===
./configure --prefix "$PREFIX"
make -j$(nproc)
make install -j$(nproc)
cd ../
rm -rf build

21
packages/nasm/2.15.5/compile vendored Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Put instructions to compile source code, remove this file if the language does not require this stage
case "${PISTON_LANGUAGE}" in
nasm)
nasm -f elf32 -o binary.o "$@"
ld -m elf_i386 binary.o -o binary
;;
nasm64)
nasm -f elf64 -o binary.o "$@"
ld -m elf_x86_64 binary.o -o binary
;;
*)
echo "How did you get here? (${PISTON_LANGUAGE})"
exit 1
;;
esac
chmod +x ./binary

4
packages/nasm/2.15.5/environment vendored Normal file
View file

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH

14
packages/nasm/2.15.5/metadata.json vendored Normal file
View file

@ -0,0 +1,14 @@
{
"language": "nasm",
"version": "2.15.5",
"provides": [
{
"language": "nasm",
"aliases": ["asm", "nasm32"]
},
{
"language": "nasm64",
"aliases": ["asm64"]
}
]
}

5
packages/nasm/2.15.5/run vendored Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
shift
./binary "$@"

16
packages/nasm/2.15.5/test.nasm.asm vendored Normal file
View file

@ -0,0 +1,16 @@
SECTION .DATA
good: db 'OK',10
txtlen: equ $-good
SECTION .TEXT
GLOBAL _start
_start:
mov eax,4
mov ebx,1
mov ecx,good
mov edx,txtlen
int 80h
mov eax,1
mov ebx,0
int 80h

18
packages/nasm/2.15.5/test.nasm64.asm vendored Normal file
View file

@ -0,0 +1,18 @@
SECTION .data
good: db "OK", 0x0
txtlen: equ $ - good
SECTION .text
GLOBAL _start
_start:
;sys_write
mov rax, 1
mov rdi, 1
mov rsi, good
mov rdx, txtlen
syscall
;sys_exit
mov rax, 60
mov rdi, 0
syscall

18
packages/nim/1.4.4/build.sh vendored Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
# Prebuilt binary - source *can* be built, but it requires gcc
curl -L "https://nim-lang.org/download/nim-1.4.4-linux_x64.tar.xz" -o nim.tar.xz
tar xf nim.tar.xz --strip-components=1
rm nim.tar.xz
./install.sh "$PREFIX"
cd ../
rm -rf build

5
packages/nim/1.4.4/compile vendored Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Compile nim file(s)
nim --hints:off --out:out --nimcache:./ c "$@"
chmod +x out

1
packages/nim/1.4.4/environment vendored Normal file
View file

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

5
packages/nim/1.4.4/metadata.json vendored Normal file
View file

@ -0,0 +1,5 @@
{
"language": "nim",
"version": "1.4.4",
"aliases": ["nim"]
}

Some files were not shown because too many files have changed in this diff Show more