From c2a2f68c8c652372fef1afb4a9d9821f6a2db44f Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 9 Oct 2024 14:09:15 +0300 Subject: [PATCH] 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.` --- nixos/tests/openresty-lua.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nixos/tests/openresty-lua.nix b/nixos/tests/openresty-lua.nix index 9e987398f51d..e3629e9ca40a 100644 --- a/nixos/tests/openresty-lua.nix +++ b/nixos/tests/openresty-lua.nix @@ -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";