diff options
author | Jeremy Fleischman <jeremyfleischman@gmail.com> | 2021-12-29 04:23:56 -0800 |
---|---|---|
committer | Jeremy Fleischman <jeremyfleischman@gmail.com> | 2021-12-30 03:09:48 -0800 |
commit | f99cd3fd08c023aab95ed5ed3cdddae0f81e5e0e (patch) | |
tree | 8abd6dc06210757322be776b967b0e4451795634 /pkgs | |
parent | c1792db42df222b0ec570bd774488f48aa0c91b1 (diff) |
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`](https://github.com/xbmc/xbmc/blob/4ac445c4a9f3080895bfcc34e7115e2de5b66d22/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.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/video/kodi/wrapper.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix index 52b7679a325ea..2380d0023d576 100644 --- a/pkgs/applications/video/kodi/wrapper.nix +++ b/pkgs/applications/video/kodi/wrapper.nix @@ -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 ''; } |