about summary refs log tree commit diff
path: root/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/lua-5/build-luarocks-package.nix')
-rw-r--r--pkgs/development/interpreters/lua-5/build-luarocks-package.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
index 6f3342d057bd1..263cd11dd5726 100644
--- a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
+++ b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
@@ -132,12 +132,17 @@ let
 
     generatedConfig = luaLib.generateLuarocksConfig {
       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