diff options
author | Matthieu Coudron <mcoudron@hotmail.com> | 2021-10-04 00:10:46 +0200 |
---|---|---|
committer | Matthieu Coudron <teto@users.noreply.github.com> | 2021-10-18 19:48:07 +0200 |
commit | 253af9151f69d2a39f0238eab5075e7ede1454a9 (patch) | |
tree | 3c5dbdc802e314f28fc13853c7fed88df3088dde /pkgs/development/lua-modules/lib.nix | |
parent | ecd018bb00495a4c6420e1596f206462a1fb829b (diff) |
luaPackages: update
- luarocks-nix: bumped to pass args too, `package_X = callPackage ...`. It allows to remove the annoying `with self`. This new version disables tests (because broken) and now emits derivation with a callPackage in front. - replaced X.override with lib.overrideLuarocks, it should be used whenever buildInputs/extraVariables is changed since it impacts the generated luarocks config. Once structured attributes are in, it will be easier to have the luarocks config generated by a hook and we probably will be able to replace all overrideLuarocks by overrideAttrs.
Diffstat (limited to 'pkgs/development/lua-modules/lib.nix')
-rw-r--r-- | pkgs/development/lua-modules/lib.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/lua-modules/lib.nix b/pkgs/development/lua-modules/lib.nix index 0d429b3ba6df0..bd952e7b8ce78 100644 --- a/pkgs/development/lua-modules/lib.nix +++ b/pkgs/development/lua-modules/lib.nix @@ -5,8 +5,20 @@ let in unique ([lua] ++ modules ++ concatLists (catAttrs "requiredLuaModules" modules)); # Check whether a derivation provides a lua module. hasLuaModule = drv: drv ? luaModule; + + + /* + Use this to override the arguments passed to buildLuarocksPackage + */ + overrideLuarocks = drv: f: (drv.override (args: args // { + buildLuarocksPackage = drv: (args.buildLuarocksPackage drv).override f; + })) // { + overrideScope = scope: overrideLuarocks (drv.overrideScope scope) f; + }; + in rec { + inherit overrideLuarocks; inherit hasLuaModule requiredLuaModules; luaPathList = [ |