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 }:
|
{ lib, makeWrapper, buildEnv, kodi, addons }:
|
||||||
|
|
||||||
let
|
buildEnv {
|
||||||
drvName = builtins.parseDrvName kodi.name;
|
name = "${kodi.name}-env";
|
||||||
in buildEnv {
|
|
||||||
name = "${drvName.name}-with-addons-${drvName.version}";
|
|
||||||
|
|
||||||
paths = [ kodi ] ++ addons;
|
paths = [ kodi ] ++ addons;
|
||||||
pathsToLink = [ "/share" ];
|
pathsToLink = [ "/share" ];
|
||||||
@@ -22,9 +20,4 @@ in buildEnv {
|
|||||||
(plugin: plugin.extraRuntimeDependencies or []) addons)}"
|
(plugin: plugin.extraRuntimeDependencies or []) addons)}"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = kodi.meta // {
|
|
||||||
description = kodi.meta.description
|
|
||||||
+ " (with addons: ${lib.concatMapStringsSep ", " (x: x.name) addons})";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26227,15 +26227,15 @@ in
|
|||||||
gtk = gtk2;
|
gtk = gtk2;
|
||||||
};
|
};
|
||||||
|
|
||||||
kodiPackages = recurseIntoAttrs (callPackage ../applications/video/kodi/packages.nix {});
|
kodiPackages = recurseIntoAttrs (kodi.packages);
|
||||||
|
|
||||||
kodi = callPackage ../applications/video/kodi/unwrapped.nix { };
|
kodi = callPackage ../applications/video/kodi { };
|
||||||
|
|
||||||
kodi-wayland = callPackage ../applications/video/kodi/unwrapped.nix {
|
kodi-wayland = callPackage ../applications/video/kodi {
|
||||||
useWayland = true;
|
useWayland = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
kodi-gbm = callPackage ../applications/video/kodi/unwrapped.nix {
|
kodi-gbm = callPackage ../applications/video/kodi {
|
||||||
useGbm = true;
|
useGbm = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user