From 2d7609f5a2e1990b4f0ed6e409c6286e2ee5432c Mon Sep 17 00:00:00 2001 From: Dan Vargas Date: Tue, 8 Feb 2022 13:32:54 -0700 Subject: [PATCH] add piston nix pkg for sbcl-lisp --- packages/lisp/2.1.2/build.sh | 19 ------------------ packages/lisp/2.1.2/environment | 4 ---- packages/lisp/2.1.2/metadata.json | 5 ----- packages/lisp/2.1.2/run | 4 ---- packages/lisp/2.1.2/test.cl | 1 - runtimes/default.nix | 1 + runtimes/sbcl-lisp.nix | 32 +++++++++++++++++++++++++++++++ 7 files changed, 33 insertions(+), 33 deletions(-) delete mode 100755 packages/lisp/2.1.2/build.sh delete mode 100644 packages/lisp/2.1.2/environment delete mode 100644 packages/lisp/2.1.2/metadata.json delete mode 100644 packages/lisp/2.1.2/run delete mode 100644 packages/lisp/2.1.2/test.cl create mode 100644 runtimes/sbcl-lisp.nix diff --git a/packages/lisp/2.1.2/build.sh b/packages/lisp/2.1.2/build.sh deleted file mode 100755 index 37f1f8a..0000000 --- a/packages/lisp/2.1.2/build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/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 diff --git a/packages/lisp/2.1.2/environment b/packages/lisp/2.1.2/environment deleted file mode 100644 index 780b668..0000000 --- a/packages/lisp/2.1.2/environment +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# Put 'export' statements here for environment variables -export PATH=$PWD/bin:$PATH diff --git a/packages/lisp/2.1.2/metadata.json b/packages/lisp/2.1.2/metadata.json deleted file mode 100644 index 185cf9e..0000000 --- a/packages/lisp/2.1.2/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "lisp", - "version": "2.1.2", - "aliases": ["lisp", "cl", "sbcl", "commonlisp"] -} diff --git a/packages/lisp/2.1.2/run b/packages/lisp/2.1.2/run deleted file mode 100644 index 74a5cf3..0000000 --- a/packages/lisp/2.1.2/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -# Put instructions to run the runtime -sbcl --script "$@" diff --git a/packages/lisp/2.1.2/test.cl b/packages/lisp/2.1.2/test.cl deleted file mode 100644 index 1de92b7..0000000 --- a/packages/lisp/2.1.2/test.cl +++ /dev/null @@ -1 +0,0 @@ -(write-line "OK") \ No newline at end of file diff --git a/runtimes/default.nix b/runtimes/default.nix index f97aae1..3b25c62 100644 --- a/runtimes/default.nix +++ b/runtimes/default.nix @@ -36,4 +36,5 @@ args: { "mono-csharp" = import ./mono-csharp.nix args; "lua" = import ./lua.nix args; "lolcode" = import ./lolcode.nix args; + "sbcl-lisp" = import ./sbcl-lisp.nix args; } diff --git a/runtimes/sbcl-lisp.nix b/runtimes/sbcl-lisp.nix new file mode 100644 index 0000000..c331f66 --- /dev/null +++ b/runtimes/sbcl-lisp.nix @@ -0,0 +1,32 @@ +{pkgs, piston, ...}: +let + pkg = pkgs.sbcl; +in piston.mkRuntime { + language = "lisp"; + version = pkg.version; + runtime = "sbcl"; + + aliases = [ + "lisp" + "cl" + "commonlisp" + ]; + + run = '' + ${pkg}/bin/sbcl --script "$@" + ''; + + tests = [ + (piston.mkTest { + files = { + "test.cl" = '' + (write-line "OK") + ''; + }; + args = []; + stdin = ""; + packages = []; + main = "test.cl"; + }) + ]; +} \ No newline at end of file