Compare commits
No commits in common. "6d1156188cf6eaa2e2d11fc5049c83e547de4d0f" and "af5036d82c651f7de8c3eb2c615746c7c92116f5" have entirely different histories.
6d1156188c
...
af5036d82c
12
piston
12
piston
|
@ -12,16 +12,16 @@ SUBCOMMAND="$1"
|
|||
shift
|
||||
|
||||
build_base(){
|
||||
CONTAINER_PATH="$(nix build ".#container" --no-link --json | jq '.[0].outputs.out' -r)" || exit 1
|
||||
docker load -i $CONTAINER_PATH || exit 1
|
||||
docker tag "$IMAGE_NAME_DEV:$IMAGE_TAG" "$IMAGE_NAME:$IMAGE_TAG" || exit 1
|
||||
CONTAINER_PATH="$(nix build ".#container" --no-link --json | jq '.[0].outputs.out' -r)"
|
||||
docker load -i $CONTAINER_PATH
|
||||
docker tag "$IMAGE_NAME_DEV:$IMAGE_TAG" "$IMAGE_NAME:$IMAGE_TAG"
|
||||
}
|
||||
|
||||
case "$SUBCOMMAND" in
|
||||
logs) docker logs -f $CONTAINER_NAME;;
|
||||
|
||||
restart) docker restart $CONTAINER_NAME ;;
|
||||
start)
|
||||
start)
|
||||
docker run \
|
||||
-p 2000:2000 \
|
||||
--rm \
|
||||
|
@ -43,7 +43,7 @@ case "$SUBCOMMAND" in
|
|||
./scaffold.sh $1 $2
|
||||
popd > /dev/null
|
||||
;;
|
||||
|
||||
|
||||
build)
|
||||
build_base
|
||||
if [[ ! -z "$1" ]]; then
|
||||
|
@ -56,7 +56,7 @@ case "$SUBCOMMAND" in
|
|||
fi
|
||||
;;
|
||||
|
||||
start-dev)
|
||||
start-dev)
|
||||
build_base
|
||||
docker run \
|
||||
--rm \
|
||||
|
|
|
@ -13,5 +13,4 @@ args: {
|
|||
"elixir" = import ./elixir.nix args;
|
||||
"erlang" = import ./erlang.nix args;
|
||||
"gawk-awk" = import ./gawk-awk.nix args;
|
||||
"openjdk11_headless-java" = import ./openjdk11_headless-java.nix args;
|
||||
}
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
# Put your package here, preferibly from nixpkgs.
|
||||
pkg = pkgs.openjdk11_headless; # this may be incorrect - it is guessed
|
||||
in piston.mkRuntime {
|
||||
# Name of the language implemented by this runtime
|
||||
language = "java";
|
||||
|
||||
# The version of the language
|
||||
# Usually this is specified on the package
|
||||
version = pkg.version;
|
||||
|
||||
# Name of the runtime
|
||||
# This line should be kept if the runtime differs from the language
|
||||
runtime = "openjdk11_headless";
|
||||
|
||||
aliases = [
|
||||
];
|
||||
|
||||
# This is the lines of a shell script to evaluate a file at $1
|
||||
# The remaining arguments are the arguments to launch the application with
|
||||
# The CWD of this script is a temp directory for a job
|
||||
#
|
||||
# If the compile stage is used, $1 still contains the name of the source file.
|
||||
# It is up to your script to determine the filename of the emitted binary
|
||||
#
|
||||
# No shebang needs to be added to this - that is done automatically.
|
||||
run = ''
|
||||
mv $1 $1.java
|
||||
filename=$1.java
|
||||
shift
|
||||
${pkg}/bin/java $filename "$@"
|
||||
'';
|
||||
|
||||
# Specify a list of tests.
|
||||
# These should output "OK" to STDOUT if everything looks good
|
||||
#
|
||||
# Run the following command to test the package:
|
||||
# $ ./piston test openjdk11_headless-java
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.java" = ''
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("OK");
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
args = [];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.java";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue