summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/nix-lua-shell.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/misc/nix-lua-shell.nix b/misc/nix-lua-shell.nix
new file mode 100644
index 0000000..1bf881e
--- /dev/null
+++ b/misc/nix-lua-shell.nix
@@ -0,0 +1,20 @@
+with import <nixpkgs> {};
+with lua53Packages;
+
+let
+ libs = [
+ lua5_3
+ lua53Packages.lpeg
+ lua53Packages.cjson
+ lua53Packages.luaposix
+ ];
+in
+stdenv.mkDerivation rec {
+ name = "lua-env";
+ buildInputs = libs;
+
+ shellHook = ''
+ export LUA_CPATH="${lib.concatStringsSep ";" (map getLuaCPath libs)};./?.so"
+ export LUA_PATH="${lib.concatStringsSep ";" (map getLuaPath libs)};./?.lua"
+ '';
+}