From 0655d2ef47e6388a4d1121da23b0854dd381bbed Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 6 Jul 2018 00:28:10 +0200 Subject: shell.nix: add nix-shell setup script Beware: make sure your nixpkgs repo contains Lua 5.3 definitions of lua-packages plus lpeg 1.0.1. --- shell.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..295bacb --- /dev/null +++ b/shell.nix @@ -0,0 +1,16 @@ +with import {}; +with lua53Packages; + +let + libs = [lua5_3 lua53Packages.lpeg]; +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