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:
@@ -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);
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user