diff options
Diffstat (limited to 'pkgs/development/interpreters/luajit/default.nix')
-rw-r--r-- | pkgs/development/interpreters/luajit/default.nix | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/development/interpreters/luajit/default.nix b/pkgs/development/interpreters/luajit/default.nix index 6a163c4b562f..ac74610bcce9 100644 --- a/pkgs/development/interpreters/luajit/default.nix +++ b/pkgs/development/interpreters/luajit/default.nix @@ -10,7 +10,7 @@ , extraMeta ? { } , callPackage , self -, packageOverrides ? (self: super: { }) +, packageOverrides ? (final: prev: {}) , enableFFI ? true , enableJIT ? true , enableJITDebugModule ? enableJIT @@ -62,6 +62,15 @@ stdenv.mkDerivation rec { # passed by nixpkgs CC wrapper is insufficient on its own substituteInPlace src/Makefile --replace "#CCDEBUG= -g" "CCDEBUG= -g" fi + + { + echo -e ' + #undef LUA_PATH_DEFAULT + #define LUA_PATH_DEFAULT "./share/lua/${luaversion}/?.lua;./?.lua;./?/init.lua" + #undef LUA_CPATH_DEFAULT + #define LUA_CPATH_DEFAULT "./lib/lua/${luaversion}/?.so;./?.so;./lib/lua/${luaversion}/loadall.so" + ' + } >> src/luaconf.h ''; configurePhase = false; @@ -88,15 +97,10 @@ stdenv.mkDerivation rec { ln -s "$out"/bin/luajit-* "$out"/bin/luajit ''; - LuaPathSearchPaths = [ - "lib/lua/${luaversion}/?.lua" - "share/lua/${luaversion}/?.lua" - "share/lua/${luaversion}/?/init.lua" - "lib/lua/${luaversion}/?/init.lua" - "share/${name}/?.lua" - ]; - LuaCPathSearchPaths = [ "lib/lua/${luaversion}/?.so" "share/lua/${luaversion}/?.so" ]; - setupHook = luaPackages.lua-setup-hook LuaPathSearchPaths LuaCPathSearchPaths; + LuaPathSearchPaths = luaPackages.lib.luaPathList; + LuaCPathSearchPaths = luaPackages.lib.luaCPathList; + + setupHook = luaPackages.lua-setup-hook luaPackages.lib.luaPathList luaPackages.lib.luaCPathList; passthru = rec { buildEnv = callPackage ../lua-5/wrapper.nix { |