kodi: use passthru packages in withPackages

Previously kodi.withPackages constructed its own kodiPackages set
instead of using the one exposed through kodi.passthru.packages,
preventing the use of overridden kodi packages in kodi.withPackages.

This change package overrides such that they are observed by both addon
selection and wrapper path construction.
This commit is contained in:
Philippe Hürlimann
2026-04-30 12:02:11 +02:00
parent 6ab8a6fd46
commit 7d0201dfa6
2 changed files with 3 additions and 7 deletions
+2 -3
View File
@@ -6,16 +6,15 @@ unwrapped.overrideAttrs (oldAttrs: {
passthru =
let
finalKodi = oldAttrs.passthru.kodi;
kodiPackages = callPackage ../../../top-level/kodi-packages.nix { kodi = finalKodi; };
in
oldAttrs.passthru
// {
packages = kodiPackages;
packages = callPackage ../../../top-level/kodi-packages.nix { kodi = finalKodi; };
withPackages =
func:
callPackage ./wrapper.nix {
kodi = finalKodi;
addons = kodiPackages.requiredKodiAddons (func kodiPackages);
addons = finalKodi.packages.requiredKodiAddons (func finalKodi.packages);
};
};
})
+1 -4
View File
@@ -4,12 +4,9 @@
buildEnv,
kodi,
addons,
callPackage,
}:
let
kodiPackages = callPackage ../../../top-level/kodi-packages.nix { inherit kodi; };
# linux distros are supposed to provide pillow and pycryptodome
requiredPythonPath =
with kodi.pythonPackages;
@@ -26,7 +23,7 @@ let
addonsWithPythonPath = lib.filter (addon: addon ? pythonPath) addons;
in
lib.concatMapStringsSep ":" (
addon: "${addon}${kodiPackages.addonDir}/${addon.namespace}/${addon.pythonPath}"
addon: "${addon}${kodi.packages.addonDir}/${addon.namespace}/${addon.pythonPath}"
) addonsWithPythonPath;
in