From 7d0201dfa6c251d8e10adeb36ed750c5ec82cf6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20H=C3=BCrlimann?= Date: Thu, 30 Apr 2026 12:02:11 +0200 Subject: [PATCH] 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. --- pkgs/applications/video/kodi/default.nix | 5 ++--- pkgs/applications/video/kodi/wrapper.nix | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix index 2c74fde9572e..3e2d07e0f941 100644 --- a/pkgs/applications/video/kodi/default.nix +++ b/pkgs/applications/video/kodi/default.nix @@ -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); }; }; }) diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix index 84bfeb469d5c..0bbe5fba8cd1 100644 --- a/pkgs/applications/video/kodi/wrapper.nix +++ b/pkgs/applications/video/kodi/wrapper.nix @@ -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