2018-09-06 22:40:16 +03:00
|
|
|
{ stdenv, lib, makeWrapper, buildEnv, kodi, plugins }:
|
2015-01-20 00:14:36 +03:00
|
|
|
|
2018-09-06 22:40:16 +03:00
|
|
|
buildEnv {
|
|
|
|
name = "kodi-with-plugins-${(builtins.parseDrvName kodi.name).version}";
|
2015-01-20 00:14:36 +03:00
|
|
|
|
2018-09-06 22:40:16 +03:00
|
|
|
paths = [ kodi ] ++ plugins;
|
|
|
|
pathsToLink = [ "/share" ];
|
2015-01-20 00:14:36 +03:00
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2018-09-06 22:40:16 +03:00
|
|
|
postBuild = ''
|
|
|
|
mkdir $out/bin
|
|
|
|
for exe in kodi{,-standalone}
|
2015-01-20 00:14:36 +03:00
|
|
|
do
|
2018-09-06 22:40:16 +03:00
|
|
|
makeWrapper ${kodi}/bin/$exe $out/bin/$exe \
|
|
|
|
--prefix KODI_HOME : $out/share/kodi
|
|
|
|
done
|
2015-01-20 00:14:36 +03:00
|
|
|
'';
|
|
|
|
|
2018-09-06 22:40:16 +03:00
|
|
|
meta = kodi.meta // {
|
|
|
|
description = kodi.meta.description
|
|
|
|
+ " (with plugins: ${lib.concatMapStringsSep ", " (x: x.name) plugins})";
|
2015-01-20 00:14:36 +03:00
|
|
|
};
|
2015-12-01 01:00:09 +03:00
|
|
|
}
|