Skip to content

Commit

Permalink
nixosTests.openresty-lua: simplify
Browse files Browse the repository at this point in the history
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.`
  • Loading branch information
flokli committed Oct 9, 2024
1 parent 4fa56ac commit c2a2f68
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nixos/tests/openresty-lua.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
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";
Expand Down

0 comments on commit c2a2f68

Please sign in to comment.