Commit c2a2f68c authored by Florian Klink's avatar Florian Klink
Browse files

nixosTests.openresty-lua: simplify

There's no point for the intermediate `getPath` function calling
`getLuaPath` with the "lua" argument.
There's also no other nginx test this copies code from.

We always call `getLuaPath` with "lua", so constant-propagate it in.

Also, camel-case `lualibs` to `luaLibs.`
parent 4fa56ac6
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
import ./make-test-python.nix ({ pkgs, lib, ... }:
  let
    lualibs = [
    luaLibs = [
      pkgs.lua.pkgs.markdown
    ];

    getPath = lib: type: "${lib}/share/lua/${pkgs.lua.luaversion}/?.${type}";
    getLuaPath = lib: getPath lib "lua";
    luaPath = lib.concatStringsSep ";" (map getLuaPath lualibs);
    getLuaPath = lib: "${lib}/share/lua/${pkgs.lua.luaversion}/?.lua";
    luaPath = lib.concatStringsSep ";" (map getLuaPath luaLibs);
  in
  {
    name = "openresty-lua";