kodi: copy web assets instead of symlinking

Kodi refuses to follow symlinks that lead outside of a small whitelist
of allowed directories. See
[`CFileUtils::CheckFileAccessAllowed`](4ac445c4a9/xbmc/utils/FileUtils.cpp (L252))
for the relevant code.

This feels like a pretty brittle workaround, but I can't think of a
better solution, so I'm going to say that this fixes
https://github.com/NixOS/nixpkgs/issues/145116.
This commit is contained in:
Jeremy Fleischman 2021-12-29 04:23:56 -08:00
parent c1792db42d
commit f99cd3fd08
No known key found for this signature in database
GPG Key ID: 19319CD8416A642B

View File

@ -35,5 +35,11 @@ buildEnv {
(lib.concatMap
(plugin: plugin.extraRuntimeDependencies or []) addons)}"
done
# makeWrapper just created webinterface.default as a symlink. However,
# kodi's webserver carefully refuses to follow symlinks, so we need to copy
# these assets instead.
rm $out/share/kodi/addons/webinterface.default
cp -r ${kodi}/share/kodi/addons/webinterface.default/ $out/share/kodi/addons/webinterface.default
'';
}