piston nix pkg for lua
This commit is contained in:
parent
54a4acd5da
commit
27e59923f2
|
@ -1,14 +0,0 @@
|
|||
#!/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
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Put 'export' statements here for environment variables
|
||||
export PATH="$PWD/lua-5.4.2/src:$PATH"
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"language": "lua",
|
||||
"version": "5.4.2",
|
||||
"aliases": ["lua"]
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Put instructions to run the runtime
|
||||
lua "$@"
|
|
@ -1 +0,0 @@
|
|||
print("OK")
|
|
@ -34,4 +34,5 @@ args: {
|
|||
"nasm" = import ./nasm.nix args;
|
||||
"nasm-nasm64" = import ./nasm-nasm64.nix args;
|
||||
"mono-csharp" = import ./mono-csharp.nix args;
|
||||
"lua" = import ./lua.nix args;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
pkg = pkgs.lua5_4; # latest lua as of now
|
||||
in piston.mkRuntime {
|
||||
language = "lua";
|
||||
version = pkg.version;
|
||||
aliases = [];
|
||||
|
||||
run = ''
|
||||
${pkg}/bin/lua "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.lua" = ''
|
||||
print("OK")
|
||||
'';
|
||||
};
|
||||
args = [];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.lua";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue