Account for the fact that, when creating a lua package without the "withPackages" helper, we dont get an extra "lua" attribute in the package. Therefore we need to distinguish between the "withPackages" case and the direct ( or "empty" ) lua package. For example with this nixos config: ```nix { services.httpd = { enable = true; package = pkgs.apacheHttpd.override { luaSupport = true; lua5 = pkgs.lua5_3.withPackages (ps: with ps; [ luafilesystem ] ); }; }; } ``` Here we say that we want to have apache to use a lua, packaged with the `luafilesystem` module so that we can `require` that in scripts to render http responses. There, the set that gets assigned to `lua5 ` does not have a `luaversion` attribute, rather it has a `lua` attribute wherein lies a `luaversion` attribute. If we dont package additional modules, then we dont have that `lua` attribute in between and rather directly have to use `luaversion` directly. |
||
---|---|---|
.. | ||
doc | ||
lib | ||
maintainers | ||
modules | ||
tests | ||
COPYING | ||
default.nix | ||
README | ||
release-combined.nix | ||
release-small.nix | ||
release.nix |
*** NixOS *** NixOS is a Linux distribution based on the purely functional package management system Nix. More information can be found at https://nixos.org/nixos and in the manual in doc/manual.