From c3d1ece81e367dc6b02371f9c0729c7c1ed7e43e Mon Sep 17 00:00:00 2001 From: Dan Vargas Date: Fri, 11 Feb 2022 10:18:22 -0700 Subject: [PATCH] add piston nix pkg for jelly --- packages/jelly/0.1.31/build.sh | 12 ------------ packages/jelly/0.1.31/environment | 1 - packages/jelly/0.1.31/metadata.json | 5 ----- packages/jelly/0.1.31/run | 1 - packages/jelly/0.1.31/test.jelly | 1 - runtimes/default.nix | 1 + runtimes/jelly.nix | 26 ++++++++++++++++++++++++++ 7 files changed, 27 insertions(+), 20 deletions(-) delete mode 100755 packages/jelly/0.1.31/build.sh delete mode 100644 packages/jelly/0.1.31/environment delete mode 100644 packages/jelly/0.1.31/metadata.json delete mode 100644 packages/jelly/0.1.31/run delete mode 100644 packages/jelly/0.1.31/test.jelly create mode 100644 runtimes/jelly.nix diff --git a/packages/jelly/0.1.31/build.sh b/packages/jelly/0.1.31/build.sh deleted file mode 100755 index db57122..0000000 --- a/packages/jelly/0.1.31/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 diff --git a/packages/jelly/0.1.31/environment b/packages/jelly/0.1.31/environment deleted file mode 100644 index bd0ff98..0000000 --- a/packages/jelly/0.1.31/environment +++ /dev/null @@ -1 +0,0 @@ -export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/jelly/0.1.31/metadata.json b/packages/jelly/0.1.31/metadata.json deleted file mode 100644 index 905242e..0000000 --- a/packages/jelly/0.1.31/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "jelly", - "version": "0.1.31", - "aliases": [] -} diff --git a/packages/jelly/0.1.31/run b/packages/jelly/0.1.31/run deleted file mode 100644 index e07c1af..0000000 --- a/packages/jelly/0.1.31/run +++ /dev/null @@ -1 +0,0 @@ -jelly fu "$@" \ No newline at end of file diff --git a/packages/jelly/0.1.31/test.jelly b/packages/jelly/0.1.31/test.jelly deleted file mode 100644 index b32bbcd..0000000 --- a/packages/jelly/0.1.31/test.jelly +++ /dev/null @@ -1 +0,0 @@ -“OK” \ No newline at end of file diff --git a/runtimes/default.nix b/runtimes/default.nix index 993506c..48e2e52 100644 --- a/runtimes/default.nix +++ b/runtimes/default.nix @@ -39,4 +39,5 @@ args: { "sbcl-lisp" = import ./sbcl-lisp.nix args; "jvm-kotlin" = import ./jvm-kotlin.nix args; "julia" = import ./julia.nix args; + "jelly" = import ./jelly.nix args; } diff --git a/runtimes/jelly.nix b/runtimes/jelly.nix new file mode 100644 index 0000000..37b5108 --- /dev/null +++ b/runtimes/jelly.nix @@ -0,0 +1,26 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.jelly; +in piston.mkRuntime { + language = "jelly"; + version = pkg.version; + aliases = []; + + run = '' + ${pkg}/bin/jelly fu "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.jelly" = '' + “OK” + ''; + }; + args = []; + stdin = ""; + packages = []; + main = "test.jelly"; + }) + ]; +} \ No newline at end of file