kodi: introduce kodi.withPackages to replace kodiPackages.kodiWithAddons
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{ callPackage, ... } @ args:
|
||||
let
|
||||
unwrapped = callPackage ./unwrapped.nix (removeAttrs args [ "callPackage" ]);
|
||||
kodiPackages = callPackage ./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);
|
||||
};
|
||||
};
|
||||
})
|
||||
@@ -1,9 +1,7 @@
|
||||
{ lib, makeWrapper, buildEnv, kodi, addons }:
|
||||
|
||||
let
|
||||
drvName = builtins.parseDrvName kodi.name;
|
||||
in buildEnv {
|
||||
name = "${drvName.name}-with-addons-${drvName.version}";
|
||||
buildEnv {
|
||||
name = "${kodi.name}-env";
|
||||
|
||||
paths = [ kodi ] ++ addons;
|
||||
pathsToLink = [ "/share" ];
|
||||
@@ -22,9 +20,4 @@ in buildEnv {
|
||||
(plugin: plugin.extraRuntimeDependencies or []) addons)}"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = kodi.meta // {
|
||||
description = kodi.meta.description
|
||||
+ " (with addons: ${lib.concatMapStringsSep ", " (x: x.name) addons})";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user