mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
generateLuarocksConfig: dont generate rocks_subdir by default
Goal is to make generateLuarocksConfig appropriate in more scenarios, in my case, to generate rocks.nvim luarocks config We override the luarocks default for rocks_subdir to avoid conflicts when creating lua environments but it is not appropriate for other scenarios so let's not default to it in the "lib" function.
This commit is contained in:
parent
520ba7d7b1
commit
29cc0b4a6b
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user