Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildKodiAddon,
|
|
fetchFromGitHub,
|
|
kodi,
|
|
inputstreamhelper,
|
|
requests,
|
|
}:
|
|
|
|
buildKodiAddon rec {
|
|
pname = "sendtokodi";
|
|
namespace = "plugin.video.sendtokodi";
|
|
version = "0.9.924";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "firsttris";
|
|
repo = "plugin.video.sendtokodi";
|
|
tag = "v${version}";
|
|
hash = "sha256-ycp5/NbRX2rcRRpbpX6LlplyxdfoIwCw39EyQDcyzOU=";
|
|
};
|
|
|
|
patches = [
|
|
# Use yt-dlp, only. This removes the ability to use youtube_dl, which is
|
|
# unmaintained and considered vulnerable (see CVE-2024-38519).
|
|
./use-yt-dlp-only.patch
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
inputstreamhelper
|
|
requests
|
|
];
|
|
|
|
postPatch = ''
|
|
# Remove youtube-dl, which is unmaintained and vulnerable.
|
|
rm -r lib/youtube_dl lib/youtube_dl_version
|
|
# Replace yt-dlp with our own packaged version thereof.
|
|
rm -r lib/yt_dlp
|
|
echo "${lib.strings.getVersion kodi.pythonPackages.yt-dlp}" >lib/yt_dlp_version
|
|
ln -s ${kodi.pythonPackages.yt-dlp}/${kodi.pythonPackages.python.sitePackages}/yt_dlp lib/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/firsttris/plugin.video.sendtokodi";
|
|
description = "Plays various stream sites on Kodi using yt-dlp";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.pks ];
|
|
teams = [ teams.kodi ];
|
|
};
|
|
}
|