mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
2511f48e1c
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.
19 lines
586 B
Nix
19 lines
586 B
Nix
{ callPackage, ... } @ args:
|
|
let
|
|
unwrapped = callPackage ./unwrapped.nix (removeAttrs args [ "callPackage" ]);
|
|
in
|
|
unwrapped.overrideAttrs (oldAttrs: {
|
|
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);
|
|
};
|
|
};
|
|
})
|