summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2018-09-08 23:53:17 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2018-09-08 23:53:17 +0200
commit84deebeb4d714e5f8a6cac1829fed5ec4aa63418 (patch)
tree5539ace7f45edf6b5a420edc80a03dc548af3a6d /misc
parent1aaa67daf4db00bb3a6e494c40b2fbe375ec4f56 (diff)
downloadcaldr-84deebeb4d714e5f8a6cac1829fed5ec4aa63418.tar.gz
misc: add nix-shell that provides all dependencies
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"
+ '';
+}