diff --git a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix index 55bd577e46d1..263cd11dd572 100644 --- a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix +++ b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix @@ -134,12 +134,15 @@ let externalDeps = lib.unique (self.externalDeps ++ externalDepsGenerated); local_cache = ""; + # To prevent collisions when creating environments, we install the rock + # files into per-package subdirectories + rocks_subdir = self.rocksSubdir; + # Filter out the lua derivation itself from the Lua module dependency # closure, as it doesn't have a rock tree :) # luaLib.hasLuaModule requiredLuaRocks = lib.filter luaLib.hasLuaModule (lua.pkgs.requiredLuaModules (self.nativeBuildInputs ++ self.propagatedBuildInputs)); - inherit (self) rocksSubdir; }; luarocksConfig' = lib.recursiveUpdate luarocksConfig diff --git a/pkgs/development/lua-modules/lib.nix b/pkgs/development/lua-modules/lib.nix index dc7cbcc5f76e..a527b2e1189f 100644 --- a/pkgs/development/lua-modules/lib.nix +++ b/pkgs/development/lua-modules/lib.nix @@ -93,7 +93,6 @@ rec { externalDeps ? [] # a list of lua derivations , requiredLuaRocks ? [] - , rocksSubdir ? "rocks-subdir" , ... }@args: let rocksTrees = lib.imap0 @@ -125,9 +124,6 @@ rec { generatedConfig = ({ - # To prevent collisions when creating environments, we install the rock - # files into per-package subdirectories - rocks_subdir = rocksSubdir; # first tree is the default target where new rocks are installed, # any other trees in the list are treated as additional sources of installed rocks for matching dependencies.