summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2018-07-06 00:28:10 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2018-07-06 00:31:20 +0200
commit0655d2ef47e6388a4d1121da23b0854dd381bbed (patch)
tree45291d7031376b5cebcee00674528d72be21da29
parent8a3fcd0cb865b7c72545fe7a48b3cc06aebdcbdb (diff)
downloadcaldr-0655d2ef47e6388a4d1121da23b0854dd381bbed.tar.gz
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.
-rw-r--r--shell.nix16
1 files changed, 16 insertions, 0 deletions
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 <nixpkgs> {};
+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"
+ '';
+}
+