From 84deebeb4d714e5f8a6cac1829fed5ec4aa63418 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 8 Sep 2018 23:53:17 +0200 Subject: misc: add nix-shell that provides all dependencies --- misc/nix-lua-shell.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 misc/nix-lua-shell.nix 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 {}; +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" + ''; +} -- cgit v1.2.3