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.
This commit is contained in:
parent
5935bf4daf
commit
2511f48e1c
@ -1,13 +1,17 @@
|
||||
{ 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 // {
|
||||
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 = unwrapped;
|
||||
kodi = finalKodi;
|
||||
addons = kodiPackages.requiredKodiAddons (func kodiPackages);
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user