Daniel Nagy 7c121e60c5
nixos/httpd: fix lua paths
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.
2021-02-11 11:56:06 +01:00
..
2020-11-24 12:42:06 -05:00
2021-02-10 10:36:00 +01:00
2021-01-26 12:33:59 +01:00
2021-01-31 13:52:46 +01:00
2020-08-15 16:59:58 +02:00
2021-01-28 14:30:23 -08:00
2020-10-21 00:05:48 +09:00
2020-08-27 10:11:45 -05:00
2021-02-11 11:56:06 +01:00