From 8a0c6be4586693dbd008f692de756d3d8c861fbc Mon Sep 17 00:00:00 2001 From: "Matthieu C." <886074+teto@users.noreply.github.com> Date: Thu, 4 Jul 2024 01:43:51 +0200 Subject: [PATCH] generateLuarocksConfig: dont hardcode local_cache I tried using luaLib.generateLuarocksConfig outside nixpkgs, to generate a rocks.nvim config but it adds a `local_cache = ""` configuration line that is painful to remove so let's not add it in the first place, and let the caller set it if needed. --- pkgs/development/interpreters/lua-5/build-luarocks-package.nix | 2 ++ pkgs/development/lua-modules/lib.nix | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix index 6f3342d057bd..55bd577e46d1 100644 --- a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix +++ b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix @@ -132,6 +132,8 @@ let generatedConfig = luaLib.generateLuarocksConfig { externalDeps = lib.unique (self.externalDeps ++ externalDepsGenerated); + local_cache = ""; + # Filter out the lua derivation itself from the Lua module dependency # closure, as it doesn't have a rock tree :) # luaLib.hasLuaModule diff --git a/pkgs/development/lua-modules/lib.nix b/pkgs/development/lua-modules/lib.nix index 5841547073d3..dc7cbcc5f76e 100644 --- a/pkgs/development/lua-modules/lib.nix +++ b/pkgs/development/lua-modules/lib.nix @@ -124,7 +124,6 @@ rec { (lib.filter (lib.isDerivation) externalDeps); generatedConfig = ({ - local_cache = ""; # To prevent collisions when creating environments, we install the rock # files into per-package subdirectories