nixpkgs/pkgs/applications/video/kodi/default.nix
Daniel Wagenknecht 2511f48e1c 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.
2024-04-17 19:04:46 +03:00

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);
};
};
})