about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/kodi/wrapper.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/video/kodi/wrapper.nix')
-rw-r--r--nixpkgs/pkgs/applications/video/kodi/wrapper.nix22
1 files changed, 10 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/applications/video/kodi/wrapper.nix b/nixpkgs/pkgs/applications/video/kodi/wrapper.nix
index 80a36df3de74..86164682138d 100644
--- a/nixpkgs/pkgs/applications/video/kodi/wrapper.nix
+++ b/nixpkgs/pkgs/applications/video/kodi/wrapper.nix
@@ -1,11 +1,14 @@
-{ lib, makeWrapper, buildEnv, kodi, plugins }:
+{ lib, makeWrapper, buildEnv, kodi, addons }:
 
 let
-  drvName = builtins.parseDrvName kodi.name;
-in buildEnv {
-  name = "${drvName.name}-with-plugins-${drvName.version}";
+  # linux distros are supposed to provide pillow and pycryptodome
+  requiredPythonPackages = with kodi.pythonPackages; [ pillow pycryptodome] ++ addons;
+in
 
-  paths = [ kodi ] ++ plugins;
+buildEnv {
+  name = "${kodi.name}-env";
+
+  paths = [ kodi ] ++ addons;
   pathsToLink = [ "/share" ];
 
   buildInputs = [ makeWrapper ];
@@ -15,16 +18,11 @@ in buildEnv {
     for exe in kodi{,-standalone}
     do
       makeWrapper ${kodi}/bin/$exe $out/bin/$exe \
-        --prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath plugins} \
+        --prefix PYTHONPATH : ${kodi.pythonPackages.makePythonPath requiredPythonPackages} \
         --prefix KODI_HOME : $out/share/kodi \
         --prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
           (lib.concatMap
-            (plugin: plugin.extraRuntimeDependencies or []) plugins)}"
+            (plugin: plugin.extraRuntimeDependencies or []) addons)}"
     done
   '';
-
-  meta = kodi.meta // {
-    description = kodi.meta.description
-                + " (with plugins: ${lib.concatMapStringsSep ", " (x: x.name) plugins})";
-  };
 }