nixpkgs/pkgs/applications/video/kodi/wrapper.nix

25 lines
589 B
Nix
Raw Normal View History

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