diff options
author | Daniel Wagenknecht <dwagenk@mailbox.org> | 2023-01-06 23:11:59 +0100 |
---|---|---|
committer | Sergey Kazenyuk <kazenyuk@pm.me> | 2024-04-17 19:04:46 +0300 |
commit | 2511f48e1ccff1c2f7c17b405a861f729aa2b4bf (patch) | |
tree | ef98c13afb222a027974a112167c0879ad02f48b /pkgs/applications/video/kodi | |
parent | 5935bf4daf8b18e937d68400b80974acc03753a6 (diff) |
kodi: make withPackages and overrideAttrs composable
Using withPackage on a kodi derivation that was modified with overrideAttrs lead to the modifications being discarded. With the previous adaptions to the kodi derivation we can now modify the wrapper that allows using both overrideAttrs and withPackage to form a custom kodi derivation with plugins.
Diffstat (limited to 'pkgs/applications/video/kodi')
-rw-r--r-- | pkgs/applications/video/kodi/default.nix | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix index 3f382efff11b9..b028558a61da7 100644 --- a/pkgs/applications/video/kodi/default.nix +++ b/pkgs/applications/video/kodi/default.nix @@ -1,14 +1,18 @@ { callPackage, ... } @ args: let unwrapped = callPackage ./unwrapped.nix (removeAttrs args [ "callPackage" ]); - kodiPackages = callPackage ../../../top-level/kodi-packages.nix { kodi = unwrapped; }; in unwrapped.overrideAttrs (oldAttrs: { - passthru = oldAttrs.passthru // { - packages = kodiPackages; - withPackages = func: callPackage ./wrapper.nix { - kodi = unwrapped; - addons = kodiPackages.requiredKodiAddons (func kodiPackages); - }; - }; + passthru = + let + finalKodi = oldAttrs.passthru.kodi; + kodiPackages = callPackage ../../../top-level/kodi-packages.nix { kodi = finalKodi; }; + in + oldAttrs.passthru // { + packages = kodiPackages; + withPackages = func: callPackage ./wrapper.nix { + kodi = finalKodi; + addons = kodiPackages.requiredKodiAddons (func kodiPackages); + }; + }; }) |