luarocks: can be embedded with lua.withPackages
lua.withPackages only brings packages that have passthru.luaModule, which was not the case of luarocks (because it's built differently than other lua packages). We call toLuaModule on luarocks so that it is brought in a lua.withPackages call
This commit is contained in:
parent
31c88af5e6
commit
d87a6a99f6
|
@ -89,7 +89,13 @@ rec {
|
|||
, rocksSubdir
|
||||
}: let
|
||||
rocksTrees = lib.imap0
|
||||
(i: dep: { name = "dep-${toString i}"; root = "${dep}"; rocks_dir = "${dep}/${dep.rocksSubdir}"; })
|
||||
(i: dep: {
|
||||
name = "dep-${toString i}";
|
||||
root = "${dep}";
|
||||
# packages built by buildLuaPackage or luarocks doesn't contain rocksSubdir
|
||||
# hence a default here
|
||||
rocks_dir = if dep ? rocksSubdir then "${dep}/${dep.rocksSubdir}" else "${dep.pname}-${dep.version}-rocks";
|
||||
})
|
||||
requiredLuaRocks;
|
||||
|
||||
# Explicitly point luarocks to the relevant locations for multiple-output
|
||||
|
|
|
@ -54,10 +54,10 @@ rec {
|
|||
inherit (pkgs.buildPackages) makeSetupHook makeWrapper;
|
||||
};
|
||||
|
||||
luarocks = callPackage ../development/tools/misc/luarocks/default.nix { };
|
||||
luarocks = toLuaModule (callPackage ../development/tools/misc/luarocks/default.nix { });
|
||||
|
||||
# a fork of luarocks used to generate nix lua derivations from rockspecs
|
||||
luarocks-nix = callPackage ../development/tools/misc/luarocks/luarocks-nix.nix { };
|
||||
luarocks-nix = toLuaModule (callPackage ../development/tools/misc/luarocks/luarocks-nix.nix { });
|
||||
|
||||
lua-resty-core = callPackage ({ fetchFromGitHub }: buildLuaPackage rec {
|
||||
pname = "lua-resty-core";
|
||||
|
|
Loading…
Reference in a new issue