add piston nix pkg for sbcl-lisp

This commit is contained in:
Dan Vargas 2022-02-08 13:32:54 -07:00
parent c604863c72
commit 2d7609f5a2
7 changed files with 33 additions and 33 deletions

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

@ -36,4 +36,5 @@ args: {
"mono-csharp" = import ./mono-csharp.nix args; "mono-csharp" = import ./mono-csharp.nix args;
"lua" = import ./lua.nix args; "lua" = import ./lua.nix args;
"lolcode" = import ./lolcode.nix args; "lolcode" = import ./lolcode.nix args;
"sbcl-lisp" = import ./sbcl-lisp.nix args;
} }

32
runtimes/sbcl-lisp.nix Normal file
View File

@ -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";
})
];
}